You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I try to run examples/optimization/hybrid_sizing_problem.py as in the draft pull request from jaredthomas68/branch:setter_bug, it appears that the setter for maximum_power in the PowerStorageDispatch class is not being called. I tried making sure the PowerStorageDispatch class was inheriting from object ultimately, but that did not seem to help.
Traceback (most recent call last): File "hybrid_sizing_problem.py", line 72, in <module> hybrid_plant.battery.dispatch.set_fixed_dispatch(fixed_dispatch, grid_limit=np.ones(len(fixed_dispatch))) File "/HOPP/hopp/simulation/technologies/dispatch/power_storage/simple_battery_dispatch_heuristic.py", line 50, in set_fixed_dispatch self._set_power_fraction_limits(gen, grid_limit) File "/HOPP/hopp/simulation/technologies/dispatch/power_storage/simple_battery_dispatch_heuristic.py", line 67, in _set_power_fraction_limits self.max_charge_fraction[t] = self.enforce_power_fraction_simple_bounds(gen[t] / self.maximum_power) File "/HOPP/hopp/simulation/technologies/dispatch/power_storage/power_storage_dispatch.py", line 319, in maximum_power return self.blocks[t].maximum_power.value File "/opt/anaconda3/envs/hopp/lib/python3.8/site-packages/pyomo/core/base/param.py", line 212, in value return self() File "/opt/anaconda3/envs/hopp/lib/python3.8/site-packages/pyomo/core/base/param.py", line 867, in __call__ return super(ScalarParam, self).__call__(exception=exception) File "/opt/anaconda3/envs/hopp/lib/python3.8/site-packages/pyomo/core/base/param.py", line 199, in __call__ raise ValueError( ValueError: Error evaluating Param value (heuristic_battery[0].maximum_power): The Param value is currently set to an invalid value. This is typically from a scalar Param or mutable Indexed Param without
The text was updated successfully, but these errors were encountered:
When I try to run
examples/optimization/hybrid_sizing_problem.py
as in the draft pull request from jaredthomas68/branch:setter_bug, it appears that the setter formaximum_power
in thePowerStorageDispatch
class is not being called. I tried making sure thePowerStorageDispatch
class was inheriting fromobject
ultimately, but that did not seem to help.Traceback (most recent call last): File "hybrid_sizing_problem.py", line 72, in <module> hybrid_plant.battery.dispatch.set_fixed_dispatch(fixed_dispatch, grid_limit=np.ones(len(fixed_dispatch))) File "/HOPP/hopp/simulation/technologies/dispatch/power_storage/simple_battery_dispatch_heuristic.py", line 50, in set_fixed_dispatch self._set_power_fraction_limits(gen, grid_limit) File "/HOPP/hopp/simulation/technologies/dispatch/power_storage/simple_battery_dispatch_heuristic.py", line 67, in _set_power_fraction_limits self.max_charge_fraction[t] = self.enforce_power_fraction_simple_bounds(gen[t] / self.maximum_power) File "/HOPP/hopp/simulation/technologies/dispatch/power_storage/power_storage_dispatch.py", line 319, in maximum_power return self.blocks[t].maximum_power.value File "/opt/anaconda3/envs/hopp/lib/python3.8/site-packages/pyomo/core/base/param.py", line 212, in value return self() File "/opt/anaconda3/envs/hopp/lib/python3.8/site-packages/pyomo/core/base/param.py", line 867, in __call__ return super(ScalarParam, self).__call__(exception=exception) File "/opt/anaconda3/envs/hopp/lib/python3.8/site-packages/pyomo/core/base/param.py", line 199, in __call__ raise ValueError( ValueError: Error evaluating Param value (heuristic_battery[0].maximum_power): The Param value is currently set to an invalid value. This is typically from a scalar Param or mutable Indexed Param without
The text was updated successfully, but these errors were encountered: