Skip to content

Commit

Permalink
update mpc tests for 'pv'->'renewable' change
Browse files Browse the repository at this point in the history
  • Loading branch information
ahalev committed Dec 16, 2022
1 parent 956c18c commit 3be5eb1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/control/test_mpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def test_run_with_load_pv_battery_grid(self):
pv = RenewableModule(time_series=pv_const*np.ones(100))
load = LoadModule(time_series=load_const*np.ones(100))

microgrid = get_modular_microgrid(remove_modules=["pv", "load", "genset"], additional_modules=[pv, load])
microgrid = get_modular_microgrid(remove_modules=["renewable", "load", "genset"], additional_modules=[pv, load])

mpc = ModelPredictiveControl(microgrid)
mpc_output = mpc.run_mpc_on_microgrid(forecast_steps=forecast_steps)
Expand All @@ -42,7 +42,7 @@ def test_run_with_load_pv_battery_genset(self):
pv = RenewableModule(time_series=pv_const*np.ones(100))
load = LoadModule(time_series=load_const*np.ones(100))

microgrid = get_modular_microgrid(remove_modules=["pv", "load", "grid"], additional_modules=[pv, load])
microgrid = get_modular_microgrid(remove_modules=["renewable", "load", "grid"], additional_modules=[pv, load])

mpc = ModelPredictiveControl(microgrid)
mpc_output = mpc.run_mpc_on_microgrid(forecast_steps=forecast_steps)
Expand All @@ -62,7 +62,7 @@ def test_run_twice_with_load_pv_battery_genset(self):
pv = RenewableModule(time_series=pv_const*np.ones(100))
load = LoadModule(time_series=load_const*np.ones(100))

microgrid = get_modular_microgrid(remove_modules=["pv", "load", "grid"], additional_modules=[pv, load])
microgrid = get_modular_microgrid(remove_modules=["renewable", "load", "grid"], additional_modules=[pv, load])

mpc = ModelPredictiveControl(microgrid)
mpc_output = mpc.run_mpc_on_microgrid(forecast_steps=forecast_steps)
Expand All @@ -88,7 +88,7 @@ def test_run_with_load_pv_battery_grid_different_names(self):
pv = RenewableModule(time_series=pv_const*np.ones(100))
load = LoadModule(time_series=load_const*np.ones(100))

microgrid = get_modular_microgrid(remove_modules=["pv", "load", "genset"],
microgrid = get_modular_microgrid(remove_modules=["renewable", "load", "genset"],
additional_modules=[("pv_with_name", pv), ("load_with_name", load)])

mpc = ModelPredictiveControl(microgrid)
Expand Down

0 comments on commit 3be5eb1

Please sign in to comment.