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

Bug/loading unloading rate #34

Closed AnneHommelberg closed 5 years ago

AnneHommelberg commented 5 years ago

The loading / unloading rate typically depend on the current level of the container. To allow a loading_func or unloading_func which depends on the current level, the signature of these methods needed to be changed to passing a current_level and desired_level instead of simply passing the amount of content that is being processed. To determine from which container the current level is used, the signature the of Processor.process method must be changed as well. The process method is now given a ship (from which the current_level is used and which will contain the desired_level after processing), desired_level and site (to or from which the necessary materials are shifted to obtain the desired level in the ship).

AnneHommelberg commented 5 years ago

I've already updated the notebooks and unit tests to the new signatures, so everything should be working correctly. Also note that model.py now contains a get_loading_func and get_unloading_func method which can be passed a fixed rate (floating point number) to obtain a simple (un)loading_func.