Hi Mao,
I am trying to use GLPK (version 4.13) to model a simple supply chain
network model to be solved as a linear program. The duals I am getting
for this linear program are not correct for a corner case (when demand
is equal to supply). I cross checked with cplex solver to see the
right dual/reduced costs for those variables and indeed cplex is
giving me the expected answer.
Please find attached the lp file (cplexlp.lp in cplex format) that you
can use with interactive cplex and glpsol both. The variables in
question are: Res1T1, Res1T2, Res1T3, Res1T4. The reduced costs of
these variables is not correct. Similarly the duals on rows Res1R1,
Res1R2, Res1R3, Res1R4 is also not correct. Please find attached the
solution files out of cplex (cplexsol.txt) and glpk 4.13 (glpsol.txt)
with this mail.
Use of correct duals and reduced costs is important for my project.
Please help! Lastly I do appreciate your work and effort for the
freeware implementation of a lp solver. This really is great work for
the open source community!
Thanks,
Anurag
\* Problem: Unknown *\
Maximize
obj: - 0.01 Dev1T2 + 0.1 Dev1_DT4 - 0.01 Dev1T1 - 0.01 Dev1T0
- 0.01 Dev1T3 - 0.01 Dev1T4
Subject To
Res1R4: - Res1T4 + OP1T4 = 0
Dev1R3: - Dev1T3 + OP1T3 + Dev1T2 = 0
Res1R1: + OP1T1 - Res1T1 = 0
Dev1R1: - Dev1T1 + Dev1T0 + OP1T1 = 0
Dev1R0: - Dev1T0 + OP1T0 = 0
Dev1R4: - Dev1T4 - Dev1_DT4 + Dev1T3 + OP1T4 = 0
Res1R3: + OP1T3 - Res1T3 = 0
Res1R2: - Res1T2 + OP1T2 = 0
Dev1R2: + OP1T2 + Dev1T1 - Dev1T2 = 0
Res1R0: - Res1T0 + OP1T0 = 0
Bounds
Res1T1 <= 250
Res1T0 <= 250
Dev1_DT4 <= 1000
Res1T3 <= 250
Res1T4 <= 250
Res1T2 <= 250
End
PROBLEM NAME cplexlp.lp
DATA NAME
OBJECTIVE VALUE 85
STATUS OPTIMAL SOLN
ITERATION 6
OBJECTIVE obj (MAX)
RHS
RANGES
BOUNDS
SECTION 1 - ROWS
NUMBER ......ROW....... AT ...ACTIVITY... SLACK ACTIVITY ..LOWER LIMIT.
..UPPER LIMIT. .DUAL ACTIVITY
1 obj BS 85 -85 NONE
NONE 1
2 Res1R4 EQ 0 0 0
0 -0.04
3 Dev1R3 EQ 0 0 0
0 0.03
4 Res1R1 EQ 0 0 0
0 -0.01
5 Dev1R1 EQ 0 0 0
0 0.01
A 6 Dev1R0 EQ 0 0 0
0 0
7 Dev1R4 EQ 0 0 0
0 0.04
8 Res1R3 EQ 0 0 0
0 -0.03
9 Res1R2 EQ 0 0 0
0 -0.02
10 Dev1R2 EQ 0 0 0
0 0.02
A 11 Res1R0 EQ 0 0 0
0 0
SECTION 2 - COLUMNS
NUMBER .....COLUMN..... AT ...ACTIVITY... ..INPUT COST.. ..LOWER LIMIT.
..UPPER LIMIT. .REDUCED COST.
12 Dev1T2 BS 500 -0.01 0
NONE 0
13 Dev1_DT4 UL 1000 0.1 0
1000 0.06
14 Dev1T1 BS 250 -0.01 0
NONE 0
15 Dev1T0 BS 0 -0.01 0
NONE 0
16 Dev1T3 BS 750 -0.01 0
NONE 0
17 Dev1T4 LL 0 -0.01 0
NONE -0.05
18 Res1T4 UL 250 0 0
250 0.04
19 OP1T4 BS 250 0 0
NONE 0
20 OP1T3 BS 250 0 0
NONE 0
21 OP1T1 BS 250 0 0
NONE 0
22 Res1T1 UL 250 0 0
250 0.01
23 OP1T0 BS 0 0 0
NONE 0
24 Res1T3 UL 250 0 0
250 0.03
25 Res1T2 UL 250 0 0
250 0.02
26 OP1T2 BS 250 0 0
NONE 0
27 Res1T0 BS 0 0 0
250 0
Problem:
Rows: 10
Columns: 16
Non-zeros: 25
Status: OPTIMAL
Objective: obj = 85 (MAXimum)
No. Row name St Activity Lower bound Upper bound Marginal
------ ------------ -- ------------- ------------- ------------- -------------
1 Res1R4 NS 0 0 = 0.03
2 Dev1R3 NS 0 0 = -0.02
3 Res1R1 NS 0 0 = < eps
4 Dev1R1 NS 0 0 = < eps
5 Dev1R0 NS 0 0 = < eps
6 Dev1R4 NS 0 0 = -0.03
7 Res1R3 NS 0 0 = 0.02
8 Res1R2 NS 0 0 = 0.01
9 Dev1R2 NS 0 0 = -0.01
10 Res1R0 NS 0 0 = < eps
No. Column name St Activity Lower bound Upper bound Marginal
------ ------------ -- ------------- ------------- ------------- -------------
1 Dev1T2 B 500 0
2 Dev1_DT4 NU 1000 0 1000 0.07
3 Dev1T1 B 250 0
4 Dev1T0 NL 0 0 -0.01
5 Dev1T3 B 750 0
6 Dev1T4 NL 0 0 -0.04
7 Res1T4 NU 250 0 250 0.03
8 OP1T4 B 250 0
9 OP1T3 B 250 0
10 OP1T1 B 250 0
11 Res1T1 B 250 0 250
12 OP1T0 B 0 0
13 Res1T3 NU 250 0 250 0.02
14 Res1T2 NU 250 0 250 0.01
15 OP1T2 B 250 0
16 Res1T0 B 0 0 250
Karush-Kuhn-Tucker optimality conditions:
KKT.PE: max.abs.err. = 0.00e+000 on row 0
max.rel.err. = 0.00e+000 on row 0
High quality
KKT.PB: max.abs.err. = 0.00e+000 on row 0
max.rel.err. = 0.00e+000 on row 0
High quality
KKT.DE: max.abs.err. = 1.73e-018 on column 1
max.rel.err. = 1.72e-018 on column 1
High quality
KKT.DB: max.abs.err. = 0.00e+000 on row 0
max.rel.err. = 0.00e+000 on row 0
High quality
End of output
_______________________________________________
Bug-glpk mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-glpk