TUDelft-CITG / OpenCLSim

Rule driven scheduling of cyclic activities for in-depth comparison of alternative operating strategies.
https://openclsim.readthedocs.io
MIT License
14 stars 17 forks source link

Feature/event conditions #57

Closed AnneHommelberg closed 5 years ago

AnneHommelberg commented 5 years ago

Changes the Activity and Simulation classes to use the events provided by simpy for there start and stop conditions. Also adds a reservation system to the container used by HasContainer, replacing the total_requested field with a more robust system.

Changes to the Activity class: The Condition classes have been removed, as well as the start_condition and stop_condition parameters. These parameters have been replaced with a start_event and stop_event. To get an even similar to the "LevelCondition", use the new "container.empty_event" and "container.full_event" properties on a HasContainer object. To get an event similar to the "TimeCondition", the simpy built-in Timeout event can be used (can be obtained through "env.timeout(...)"). Several events can be combined through the simpy built-in AllOf or AnyOf events (can be obtained through "env.any_of(events=[event1, event2, ...])" or "env.all_of(events=[event1, event2, ...])").

todo:

AnneHommelberg commented 5 years ago

todo @uijl :

AnneHommelberg commented 5 years ago

todo for me: