Skip to content

Commit 08f64db

Browse files
authored
Merge pull request #35 from oemof/fix/chp-investment
Constraint tests for CHP investment
2 parents b66cc66 + ff82083 commit 08f64db

5 files changed

+650
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
\* Source Pyomo model name=Model *\
2+
3+
min
4+
objective:
5+
+50 InvestmentFlow_invest(backpressure_electricity)
6+
+0.59999999999999998 flow(fuel_backpressure_0)
7+
+0.59999999999999998 flow(fuel_backpressure_1)
8+
+0.59999999999999998 flow(fuel_backpressure_2)
9+
10+
s.t.
11+
12+
c_e_Bus_balance(electricity_0)_:
13+
+1 flow(backpressure_electricity_0)
14+
= 0
15+
16+
c_e_Bus_balance(electricity_1)_:
17+
+1 flow(backpressure_electricity_1)
18+
= 0
19+
20+
c_e_Bus_balance(electricity_2)_:
21+
+1 flow(backpressure_electricity_2)
22+
= 0
23+
24+
c_e_Bus_balance(fuel_0)_:
25+
+1 flow(fuel_backpressure_0)
26+
= 0
27+
28+
c_e_Bus_balance(fuel_1)_:
29+
+1 flow(fuel_backpressure_1)
30+
= 0
31+
32+
c_e_Bus_balance(fuel_2)_:
33+
+1 flow(fuel_backpressure_2)
34+
= 0
35+
36+
c_e_Bus_balance(heat_0)_:
37+
+1 flow(backpressure_heat_0)
38+
= 0
39+
40+
c_e_Bus_balance(heat_1)_:
41+
+1 flow(backpressure_heat_1)
42+
= 0
43+
44+
c_e_Bus_balance(heat_2)_:
45+
+1 flow(backpressure_heat_2)
46+
= 0
47+
48+
c_e_Transformer_relation(backpressure_fuel_electricity_0)_:
49+
-1 flow(backpressure_electricity_0)
50+
+0.40000000000000002 flow(fuel_backpressure_0)
51+
= 0
52+
53+
c_e_Transformer_relation(backpressure_fuel_electricity_1)_:
54+
-1 flow(backpressure_electricity_1)
55+
+0.40000000000000002 flow(fuel_backpressure_1)
56+
= 0
57+
58+
c_e_Transformer_relation(backpressure_fuel_electricity_2)_:
59+
-1 flow(backpressure_electricity_2)
60+
+0.40000000000000002 flow(fuel_backpressure_2)
61+
= 0
62+
63+
c_e_Transformer_relation(backpressure_fuel_heat_0)_:
64+
-1 flow(backpressure_heat_0)
65+
+0.34999999999999998 flow(fuel_backpressure_0)
66+
= 0
67+
68+
c_e_Transformer_relation(backpressure_fuel_heat_1)_:
69+
-1 flow(backpressure_heat_1)
70+
+0.34999999999999998 flow(fuel_backpressure_1)
71+
= 0
72+
73+
c_e_Transformer_relation(backpressure_fuel_heat_2)_:
74+
-1 flow(backpressure_heat_2)
75+
+0.34999999999999998 flow(fuel_backpressure_2)
76+
= 0
77+
78+
c_u_InvestmentFlow_max(backpressure_electricity_0)_:
79+
-1 InvestmentFlow_invest(backpressure_electricity)
80+
+1 flow(backpressure_electricity_0)
81+
<= 1000
82+
83+
c_u_InvestmentFlow_max(backpressure_electricity_1)_:
84+
-1 InvestmentFlow_invest(backpressure_electricity)
85+
+1 flow(backpressure_electricity_1)
86+
<= 1000
87+
88+
c_u_InvestmentFlow_max(backpressure_electricity_2)_:
89+
-1 InvestmentFlow_invest(backpressure_electricity)
90+
+1 flow(backpressure_electricity_2)
91+
<= 1000
92+
93+
c_e_ONE_VAR_CONSTANT:
94+
ONE_VAR_CONSTANT = 1.0
95+
96+
bounds
97+
0 <= flow(backpressure_electricity_0) <= +inf
98+
0 <= flow(backpressure_electricity_1) <= +inf
99+
0 <= flow(backpressure_electricity_2) <= +inf
100+
0 <= flow(backpressure_heat_0) <= +inf
101+
0 <= flow(backpressure_heat_1) <= +inf
102+
0 <= flow(backpressure_heat_2) <= +inf
103+
0 <= flow(fuel_backpressure_0) <= +inf
104+
0 <= flow(fuel_backpressure_1) <= +inf
105+
0 <= flow(fuel_backpressure_2) <= +inf
106+
0 <= InvestmentFlow_invest(backpressure_electricity) <= +inf
107+
end
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
\* Source Pyomo model name=Model *\
2+
3+
min
4+
objective:
5+
+50 InvestmentFlow_invest(backpressure_electricity)
6+
+0.59999999999999998 flow(fuel_backpressure_0)
7+
+0.59999999999999998 flow(fuel_backpressure_1)
8+
+0.59999999999999998 flow(fuel_backpressure_2)
9+
10+
s.t.
11+
12+
c_e_Bus_balance(electricity_0)_:
13+
+1 flow(backpressure_electricity_0)
14+
= 0
15+
16+
c_e_Bus_balance(electricity_1)_:
17+
+1 flow(backpressure_electricity_1)
18+
= 0
19+
20+
c_e_Bus_balance(electricity_2)_:
21+
+1 flow(backpressure_electricity_2)
22+
= 0
23+
24+
c_e_Bus_balance(fuel_0)_:
25+
+1 flow(fuel_backpressure_0)
26+
= 0
27+
28+
c_e_Bus_balance(fuel_1)_:
29+
+1 flow(fuel_backpressure_1)
30+
= 0
31+
32+
c_e_Bus_balance(fuel_2)_:
33+
+1 flow(fuel_backpressure_2)
34+
= 0
35+
36+
c_e_Bus_balance(heat_0)_:
37+
+1 flow(backpressure_heat_0)
38+
= 0
39+
40+
c_e_Bus_balance(heat_1)_:
41+
+1 flow(backpressure_heat_1)
42+
= 0
43+
44+
c_e_Bus_balance(heat_2)_:
45+
+1 flow(backpressure_heat_2)
46+
= 0
47+
48+
c_e_Transformer_relation(backpressure_fuel_electricity_0)_:
49+
-1 flow(backpressure_electricity_0)
50+
+0.40000000000000002 flow(fuel_backpressure_0)
51+
= 0
52+
53+
c_e_Transformer_relation(backpressure_fuel_electricity_1)_:
54+
-1 flow(backpressure_electricity_1)
55+
+0.40000000000000002 flow(fuel_backpressure_1)
56+
= 0
57+
58+
c_e_Transformer_relation(backpressure_fuel_electricity_2)_:
59+
-1 flow(backpressure_electricity_2)
60+
+0.40000000000000002 flow(fuel_backpressure_2)
61+
= 0
62+
63+
c_e_Transformer_relation(backpressure_fuel_heat_0)_:
64+
-1 flow(backpressure_heat_0)
65+
+0.34999999999999998 flow(fuel_backpressure_0)
66+
= 0
67+
68+
c_e_Transformer_relation(backpressure_fuel_heat_1)_:
69+
-1 flow(backpressure_heat_1)
70+
+0.34999999999999998 flow(fuel_backpressure_1)
71+
= 0
72+
73+
c_e_Transformer_relation(backpressure_fuel_heat_2)_:
74+
-1 flow(backpressure_heat_2)
75+
+0.34999999999999998 flow(fuel_backpressure_2)
76+
= 0
77+
78+
c_u_InvestmentFlow_max(backpressure_electricity_0)_:
79+
-1 InvestmentFlow_invest(backpressure_electricity)
80+
+1 flow(backpressure_electricity_0)
81+
<= 0
82+
83+
c_u_InvestmentFlow_max(backpressure_electricity_1)_:
84+
-1 InvestmentFlow_invest(backpressure_electricity)
85+
+1 flow(backpressure_electricity_1)
86+
<= 0
87+
88+
c_u_InvestmentFlow_max(backpressure_electricity_2)_:
89+
-1 InvestmentFlow_invest(backpressure_electricity)
90+
+1 flow(backpressure_electricity_2)
91+
<= 0
92+
93+
c_e_ONE_VAR_CONSTANT:
94+
ONE_VAR_CONSTANT = 1.0
95+
96+
bounds
97+
0 <= flow(backpressure_electricity_0) <= +inf
98+
0 <= flow(backpressure_electricity_1) <= +inf
99+
0 <= flow(backpressure_electricity_2) <= +inf
100+
0 <= flow(backpressure_heat_0) <= +inf
101+
0 <= flow(backpressure_heat_1) <= +inf
102+
0 <= flow(backpressure_heat_2) <= +inf
103+
0 <= flow(fuel_backpressure_0) <= +inf
104+
0 <= flow(fuel_backpressure_1) <= +inf
105+
0 <= flow(fuel_backpressure_2) <= +inf
106+
0 <= InvestmentFlow_invest(backpressure_electricity) <= +inf
107+
end
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
\* Source Pyomo model name=Model *\
2+
3+
min
4+
objective:
5+
+50 InvestmentFlow_invest(extraction_electricity)
6+
+0.59999999999999998 flow(gas_extraction_0)
7+
+0.59999999999999998 flow(gas_extraction_1)
8+
+0.59999999999999998 flow(gas_extraction_2)
9+
10+
s.t.
11+
12+
c_e_Bus_balance(electricity_0)_:
13+
+1 flow(extraction_electricity_0)
14+
= 0
15+
16+
c_e_Bus_balance(electricity_1)_:
17+
+1 flow(extraction_electricity_1)
18+
= 0
19+
20+
c_e_Bus_balance(electricity_2)_:
21+
+1 flow(extraction_electricity_2)
22+
= 0
23+
24+
c_e_Bus_balance(gas_0)_:
25+
+1 flow(gas_extraction_0)
26+
= 0
27+
28+
c_e_Bus_balance(gas_1)_:
29+
+1 flow(gas_extraction_1)
30+
= 0
31+
32+
c_e_Bus_balance(gas_2)_:
33+
+1 flow(gas_extraction_2)
34+
= 0
35+
36+
c_e_Bus_balance(heat_0)_:
37+
+1 flow(extraction_heat_0)
38+
= 0
39+
40+
c_e_Bus_balance(heat_1)_:
41+
+1 flow(extraction_heat_1)
42+
= 0
43+
44+
c_e_Bus_balance(heat_2)_:
45+
+1 flow(extraction_heat_2)
46+
= 0
47+
48+
c_u_InvestmentFlow_max(extraction_electricity_0)_:
49+
-1 InvestmentFlow_invest(extraction_electricity)
50+
+1 flow(extraction_electricity_0)
51+
<= 1000
52+
53+
c_u_InvestmentFlow_max(extraction_electricity_1)_:
54+
-1 InvestmentFlow_invest(extraction_electricity)
55+
+1 flow(extraction_electricity_1)
56+
<= 1000
57+
58+
c_u_InvestmentFlow_max(extraction_electricity_2)_:
59+
-1 InvestmentFlow_invest(extraction_electricity)
60+
+1 flow(extraction_electricity_2)
61+
<= 1000
62+
63+
c_e_ExtractionTurbineCHPBlock_input_output_relation(extraction_0)_:
64+
-2 flow(extraction_electricity_0)
65+
-0.57142857142857129 flow(extraction_heat_0)
66+
+1 flow(gas_extraction_0)
67+
= 0
68+
69+
c_e_ExtractionTurbineCHPBlock_input_output_relation(extraction_1)_:
70+
-2 flow(extraction_electricity_1)
71+
-0.57142857142857129 flow(extraction_heat_1)
72+
+1 flow(gas_extraction_1)
73+
= 0
74+
75+
c_e_ExtractionTurbineCHPBlock_input_output_relation(extraction_2)_:
76+
-2 flow(extraction_electricity_2)
77+
-0.57142857142857129 flow(extraction_heat_2)
78+
+1 flow(gas_extraction_2)
79+
= 0
80+
81+
c_u_ExtractionTurbineCHPBlock_out_flow_relation(extraction_0)_:
82+
-1 flow(extraction_electricity_0)
83+
+1.142857142857143 flow(extraction_heat_0)
84+
<= 0
85+
86+
c_u_ExtractionTurbineCHPBlock_out_flow_relation(extraction_1)_:
87+
-1 flow(extraction_electricity_1)
88+
+1.142857142857143 flow(extraction_heat_1)
89+
<= 0
90+
91+
c_u_ExtractionTurbineCHPBlock_out_flow_relation(extraction_2)_:
92+
-1 flow(extraction_electricity_2)
93+
+1.142857142857143 flow(extraction_heat_2)
94+
<= 0
95+
96+
c_e_ONE_VAR_CONSTANT:
97+
ONE_VAR_CONSTANT = 1.0
98+
99+
bounds
100+
0 <= flow(extraction_electricity_0) <= +inf
101+
0 <= flow(extraction_electricity_1) <= +inf
102+
0 <= flow(extraction_electricity_2) <= +inf
103+
0 <= flow(extraction_heat_0) <= +inf
104+
0 <= flow(extraction_heat_1) <= +inf
105+
0 <= flow(extraction_heat_2) <= +inf
106+
0 <= flow(gas_extraction_0) <= +inf
107+
0 <= flow(gas_extraction_1) <= +inf
108+
0 <= flow(gas_extraction_2) <= +inf
109+
0 <= InvestmentFlow_invest(extraction_electricity) <= +inf
110+
end

0 commit comments

Comments
 (0)