Skip to content

Commit

Permalink
Add test check LP files
Browse files Browse the repository at this point in the history
  • Loading branch information
brynpickering committed Aug 16, 2024
1 parent cea9b25 commit 5f50418
Show file tree
Hide file tree
Showing 2 changed files with 94 additions and 0 deletions.
43 changes: 43 additions & 0 deletions tests/common/lp_files/cost_var.lp
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
\* Source Pyomo model name=None *\

min
objectives(foo)(0):
+0.1 variables(flow_out)(a__test_conversion__heat__2005_01_01_00_00)
+0.1 variables(flow_out)(a__test_conversion__heat__2005_01_01_01_00)
+1.0 variables(flow_out)(a__test_conversion_plus__electricity__2005_01_01_00_00)
+2.0 variables(flow_out)(a__test_conversion_plus__heat__2005_01_01_00_00)
+4.0 variables(flow_in)(a__test_conversion_plus__gas__2005_01_01_00_00)
+1.0 variables(flow_out)(a__test_conversion_plus__electricity__2005_01_01_01_00)
+2.0 variables(flow_out)(a__test_conversion_plus__heat__2005_01_01_01_00)
+4.0 variables(flow_in)(a__test_conversion_plus__gas__2005_01_01_01_00)
+0.1 variables(flow_out)(a__test_supply_coal__coal__2005_01_01_00_00)
+0.1 variables(flow_out)(a__test_supply_coal__coal__2005_01_01_01_00)
+0.1 variables(flow_out)(a__test_supply_elec__electricity__2005_01_01_00_00)
+0.1 variables(flow_out)(a__test_supply_elec__electricity__2005_01_01_01_00)
+0.1 variables(flow_out)(a__test_supply_gas__gas__2005_01_01_00_00)
+0.1 variables(flow_out)(a__test_supply_gas__gas__2005_01_01_01_00)

s.t.

c_e_ONE_VAR_CONSTANT:
+1 ONE_VAR_CONSTANT
= 1

bounds
1 <= ONE_VAR_CONSTANT <= 1
0 <= variables(flow_out)(a__test_conversion__heat__2005_01_01_00_00) <= +inf
0 <= variables(flow_out)(a__test_conversion__heat__2005_01_01_01_00) <= +inf
0 <= variables(flow_out)(a__test_conversion_plus__electricity__2005_01_01_00_00) <= +inf
0 <= variables(flow_out)(a__test_conversion_plus__heat__2005_01_01_00_00) <= +inf
0 <= variables(flow_in)(a__test_conversion_plus__gas__2005_01_01_00_00) <= +inf
0 <= variables(flow_out)(a__test_conversion_plus__electricity__2005_01_01_01_00) <= +inf
0 <= variables(flow_out)(a__test_conversion_plus__heat__2005_01_01_01_00) <= +inf
0 <= variables(flow_in)(a__test_conversion_plus__gas__2005_01_01_01_00) <= +inf
0 <= variables(flow_out)(a__test_supply_coal__coal__2005_01_01_00_00) <= +inf
0 <= variables(flow_out)(a__test_supply_coal__coal__2005_01_01_01_00) <= +inf
0 <= variables(flow_out)(a__test_supply_elec__electricity__2005_01_01_00_00) <= +inf
0 <= variables(flow_out)(a__test_supply_elec__electricity__2005_01_01_01_00) <= +inf
0 <= variables(flow_out)(a__test_supply_gas__gas__2005_01_01_00_00) <= +inf
0 <= variables(flow_out)(a__test_supply_gas__gas__2005_01_01_01_00) <= +inf
end

51 changes: 51 additions & 0 deletions tests/common/lp_files/cost_var_with_export.lp
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
\* Source Pyomo model name=None *\

min
objectives(foo)(0):
+0.1 variables(flow_out)(a__test_conversion__heat__2005_01_01_00_00)
+0.1 variables(flow_out)(a__test_conversion__heat__2005_01_01_01_00)
+1.0 variables(flow_out)(a__test_conversion_plus__electricity__2005_01_01_00_00)
+2.0 variables(flow_out)(a__test_conversion_plus__heat__2005_01_01_00_00)
+3.0 variables(flow_export)(a__test_conversion_plus__heat__2005_01_01_00_00)
+4.0 variables(flow_in)(a__test_conversion_plus__gas__2005_01_01_00_00)
+1.0 variables(flow_out)(a__test_conversion_plus__electricity__2005_01_01_01_00)
+2.0 variables(flow_out)(a__test_conversion_plus__heat__2005_01_01_01_00)
+3.0 variables(flow_export)(a__test_conversion_plus__heat__2005_01_01_01_00)
+4.0 variables(flow_in)(a__test_conversion_plus__gas__2005_01_01_01_00)
+0.1 variables(flow_out)(a__test_supply_coal__coal__2005_01_01_00_00)
+0.1 variables(flow_out)(a__test_supply_coal__coal__2005_01_01_01_00)
+5.0 variables(flow_export)(a__test_supply_elec__electricity__2005_01_01_00_00)
+0.1 variables(flow_out)(a__test_supply_elec__electricity__2005_01_01_00_00)
+5.0 variables(flow_export)(a__test_supply_elec__electricity__2005_01_01_01_00)
+0.1 variables(flow_out)(a__test_supply_elec__electricity__2005_01_01_01_00)
+0.1 variables(flow_out)(a__test_supply_gas__gas__2005_01_01_00_00)
+0.1 variables(flow_out)(a__test_supply_gas__gas__2005_01_01_01_00)

s.t.

c_e_ONE_VAR_CONSTANT:
+1 ONE_VAR_CONSTANT
= 1

bounds
1 <= ONE_VAR_CONSTANT <= 1
0 <= variables(flow_out)(a__test_conversion__heat__2005_01_01_00_00) <= +inf
0 <= variables(flow_out)(a__test_conversion__heat__2005_01_01_01_00) <= +inf
0 <= variables(flow_out)(a__test_conversion_plus__electricity__2005_01_01_00_00) <= +inf
0 <= variables(flow_out)(a__test_conversion_plus__heat__2005_01_01_00_00) <= +inf
0 <= variables(flow_export)(a__test_conversion_plus__heat__2005_01_01_00_00) <= +inf
0 <= variables(flow_in)(a__test_conversion_plus__gas__2005_01_01_00_00) <= +inf
0 <= variables(flow_out)(a__test_conversion_plus__electricity__2005_01_01_01_00) <= +inf
0 <= variables(flow_out)(a__test_conversion_plus__heat__2005_01_01_01_00) <= +inf
0 <= variables(flow_export)(a__test_conversion_plus__heat__2005_01_01_01_00) <= +inf
0 <= variables(flow_in)(a__test_conversion_plus__gas__2005_01_01_01_00) <= +inf
0 <= variables(flow_out)(a__test_supply_coal__coal__2005_01_01_00_00) <= +inf
0 <= variables(flow_out)(a__test_supply_coal__coal__2005_01_01_01_00) <= +inf
0 <= variables(flow_export)(a__test_supply_elec__electricity__2005_01_01_00_00) <= +inf
0 <= variables(flow_out)(a__test_supply_elec__electricity__2005_01_01_00_00) <= +inf
0 <= variables(flow_export)(a__test_supply_elec__electricity__2005_01_01_01_00) <= +inf
0 <= variables(flow_out)(a__test_supply_elec__electricity__2005_01_01_01_00) <= +inf
0 <= variables(flow_out)(a__test_supply_gas__gas__2005_01_01_00_00) <= +inf
0 <= variables(flow_out)(a__test_supply_gas__gas__2005_01_01_01_00) <= +inf
end

0 comments on commit 5f50418

Please sign in to comment.