Commit dc55ad60 authored by Stefan Scherfke's avatar Stefan Scherfke
Browse files

Fixed some doctests.

parent 7a4934c6
......@@ -42,8 +42,8 @@ each step::
...
>>> env = simpy.Environment()
>>> env.start(clock(env))
Process(clock)
>>> simpy.simulate(env, until=3)
<Process(clock) object at 0x...>
>>> env.run(until=3)
0
1
2
......
......@@ -71,7 +71,7 @@ it and see how it behaves::
>>> env = simpy.Environment()
>>> env.start(car(env))
<Process(car) object at 0x...>
>>> simpy.simulate(env, until=15)
>>> env.run(until=15)
Start parking at 0
Start driving at 5
Start parking at 7
......
......@@ -64,7 +64,7 @@ one (or more) cars and finally call meth:`~Environment.simulate()`.
>>> import simpy
>>> env = simpy.Environment()
>>> car = Car(env)
>>> simpy.simulate(env, until=15)
>>> env.run(until=15)
Start parking and charging at 0
Start driving at 5
Start parking and charging at 7
......@@ -124,7 +124,7 @@ you'll notice that the car now starts driving at time ``3`` instead of ``5``::
>>> car = Car(env)
>>> env.start(driver(env, car))
<Process(driver) object at 0x...>
>>> simpy.simulate(env, until=15)
>>> env.run(until=15)
Start parking and charging at 0
Was interrupted. Hope, the battery is full enough ...
Start driving at 3
......
......@@ -72,7 +72,7 @@ Finally, we can start the simulation. Since the car processes all terminate on
their own in this simulation, we don't need to specify an *until* time---the
simulation will automatically stop when there are no more events left::
>>> simpy.simulate(env)
>>> env.run()
Car 0 arriving at 0
Car 0 starting to charge at 0
Car 1 arriving at 2
......
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