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

Allow tracking energy use for non-moving objects #51

Closed AnneHommelberg closed 5 years ago

AnneHommelberg commented 5 years ago

We should allow a loading / unloading crane to check its energy use. The constructor requires us to define an energy_use_sailing in this case, even though the object is not Movable and this function is therefore never called.

Restructures the initialization of the kwargs in Simulation to define a dummy energy_use_sailing function in this case.

AnneHommelberg commented 5 years ago

@uijl This fixes the simulations we will want to run from the wizard, so I'm merging this to get the wizard up and running. However, this is more of a quick band-aid for now. It might be worthwhile to look into making the constructor for EnergyUse more flexible in the future, allowing you to only specify energy_use_sailing, energy_use_loading and energy_use_unloading when applicable.