Skip to content

Commit 300f0f2

Browse files
committed
update docs now that the simulation's ending 'current time' reflects the true end of the simulation run
1 parent 1d126a2 commit 300f0f2

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

docs/Guides/Services/processor-sharing.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,14 @@ Though it looks like service times are much longer than in a regular FIFO queue,
4343

4444
>>> ps_time_to_process_1000 = Q.current_time
4545
>>> ps_time_to_process_1000
46-
254.0556420...
46+
254.0454918...
4747

4848
>>> ciw.seed(0) # same seed
4949
>>> Q = ciw.Simulation(N) # regular FIFO queue
5050
>>> Q.simulate_until_max_customers(1000)
5151
>>> fifo_time_to_process_1000 = Q.current_time
5252
>>> fifo_time_to_process_1000
53-
254.0556420...
53+
254.0454918...
5454

5555
In Ciw two different generalisations of processor sharing are available: limited processor sharing, and capacitated processor sharing, described below. Systems exhibiting both these behaviours simultaneously can be simulated.
5656

docs/Guides/Simulation/sim_maxtime.rst

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44
How to Simulate For a Certain Amount of Time
55
============================================
66

7-
Once the simulation object has been created, it can be simulated unil a certain amount of simulation-time has passed. This is done with the :code:`simulate_until_max_time` method, which takes in the :code:`max_simulation_time` positional keyword::
7+
Once the simulation object has been created, it can be simulated until a certain amount of simulation-time has passed. This is done with the :code:`simulate_until_max_time` method, which takes in the :code:`max_simulation_time` positional keyword::
88

99
>>> Q.simulate_until_max_time(max_simulation_time=100.0) # doctest:+SKIP
1010

1111
Notes
1212
~~~~~
1313

14-
Note that the simulation does not finish at exactly this time. It will finish as soon as the time of the next scheduled event is after the :code:`max_simulation_time`. The clock will reach this nect event date, but not carry out the event. E.g. consider the following system with sparce events::
14+
Note that the simulation will finish as soon as the time of the next scheduled event is after the :code:`max_simulation_time`. The clock will reach this nect event date, but not carry out the event. E.g. consider the following system with sparce events::
1515

1616
>>> import ciw
1717
>>> N = ciw.create_network(
@@ -23,11 +23,13 @@ Note that the simulation does not finish at exactly this time. It will finish as
2323
>>> Q = ciw.Simulation(N)
2424
>>> Q.simulate_until_max_time(22.0)
2525

26-
We will see there there have been three arrivals at dates 7, 14 and 21, but only two completed services at dates 9 and 16, with the next scheduled event at date 23::
26+
We will see there there have been three arrivals at dates 7, 14 and 21, but only two completed services at dates 9 and 16, Next scheduled event for the arrival node is at date 28.0, the next scheduled event for the single service node is at date 23.0, and the next scheduled event date for the exit node is set if infinity.::
2727

2828
>>> recs = Q.get_all_records() # Completed records
2929
>>> [r.arrival_date for r in recs]
3030
[7.0, 14.0]
3131
>>> Q.current_time
32-
23.0
32+
22.0
33+
>>> [nd.next_event_date for nd in Q.nodes]
34+
[28.0, 23.0, inf]
3335

0 commit comments

Comments
 (0)