Commit 755444ac authored by Ontje Lünsdorf's avatar Ontje Lünsdorf
Browse files

Documentation fixes.

parent 8ed6d597
......@@ -8,14 +8,14 @@
Performing the simulation of an environment
===========================================
.. autofunction:: peek
.. autofunction:: step
.. autofunction:: simulate
.. autoclass:: Environment
.. autoattribute:: active_process
.. autoattribute:: now
.. automethod:: step
.. automethod:: peek
.. automethod:: simulate
.. automethod:: exit
.. method:: event(self)
......
......@@ -90,8 +90,8 @@ The :class:`Process` returned by :meth:`~Environment.start()` can be used for
process interactions (we will cover that in the next section, so we will ignore
it for now).
Finally, we start the simulation by calling :func:`simulate()` and passing the
environment as well as an end time to it.
Finally, we start the simulation by calling meth:`Environment.simulate()` and
passing the environment as well as an end time to it.
What's Next?
......
......@@ -57,7 +57,7 @@ returns, the ``run`` process starts waiting for it to finish::
... yield self.env.timeout(duration)
Starting the simulation is straight forward again: We create an environment,
one (or more) cars and finally call :func:`simulate()`.
one (or more) cars and finally call meth:`~Environment.simulate()`.
::
......
......@@ -569,9 +569,9 @@ class BaseEnvironment(object):
raise StopIteration(value)
def step(env):
"""Get and process the next event for the Environment ``env``.
"""Process the next event for the Environment ``env``.
Raise an :exc:`IndexError` if no valid event is on the heap.
Raise an :exc:`EmptySchedule` if no valid event is on the heap.
"""
event = env.pop()
......
......@@ -24,8 +24,8 @@ class RealtimeScheduler(Scheduler):
A simulation time step will take *factor* seconds of real time (one second
by default), e.g. if you simulate from ``0`` until ``3`` with
``factor=0.5``, the :func:`~simpy.core.simulate()` call will take at least
1.5 seconds.
``factor=0.5``, the :meth:`~simpy.core.Environment.simulate()` call will
take at least 1.5 seconds.
If the processing of the events for a time step takes too long,
a :exc:`RuntimeError` is raised by :meth:`pop()`. You can disable this
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment