new

Create a new P2Simulation object and link it to a P2Schedule object.

Any change to the P2Schedule object is not taken into account by the P2Simulation object. Therefore, the simulation object should be created just before the start of a simulation run, and should be deleted each time the schedule object has changed. An alternative to this approach is to call the P2Simulator:reset_simulation_object function before the start of each simulation run.

Parameters: 
I/O Type Name Description
input schedule baseline the baseline P2Schedule object
output simulation simulation a new P2Simulation object
Example: 
function ()
        io.write('\n')
end
Class: 
P2Simulator