Skip to content

Commit

Permalink
Add test for storage costs
Browse files Browse the repository at this point in the history
  • Loading branch information
p-snft committed Aug 1, 2023
1 parent d8c0cb0 commit 91636ef
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions tests/constraint_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,7 @@ def test_storage(self):
},
nominal_storage_capacity=1e5,
loss_rate=0.13,
storage_costs=0.1,
inflow_conversion_factor=0.97,
outflow_conversion_factor=0.86,
initial_storage_level=0.4,
Expand Down
5 changes: 5 additions & 0 deletions tests/lp_files/storage.lp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

min
objective:
+4000.0 ONE_VAR_CONSTANT
+0.1 GenericStorageBlock_storage_content(storage_no_invest_1)
+0.1 GenericStorageBlock_storage_content(storage_no_invest_2)
+0.1 GenericStorageBlock_storage_content(storage_no_invest_3)
+56 flow(electricityBus_storage_no_invest_0_0)
+56 flow(electricityBus_storage_no_invest_0_1)
+56 flow(electricityBus_storage_no_invest_0_2)
Expand Down Expand Up @@ -51,6 +55,7 @@ c_e_GenericStorageBlock_balanced_cstr(storage_no_invest)_:
= 40000.0

bounds
+1 <= ONE_VAR_CONSTANT <= 1
0 <= flow(electricityBus_storage_no_invest_0_0) <= 16667
0 <= flow(electricityBus_storage_no_invest_0_1) <= 16667
0 <= flow(electricityBus_storage_no_invest_0_2) <= 16667
Expand Down

0 comments on commit 91636ef

Please sign in to comment.