-------- Forwarded Message -------- From: Andrew Makhorin <m...@gnu.org> To: Harald Mumm <harald.m...@hs-wismar.de> Subject: Re: GLPK Dualprices Date: Sun, 29 May 2022 19:36:20 +0300
> Hi Harald, > > > On Sun, 2022-05-29 at 08:39 +0200, Harald Mumm wrote: > > Hallo Andrew, > > > > is it possible, that GLPK sometimes calculates wrong dual prices? > > > > I send you an example in the attachment, where CPLEX calculates > > > > other dual prices than GLPK. > > Please note that LP may have multiple optimal solutions (in degenerate > cases). This means that some constraint which happen to be active at > one > optimum point may be inactive at other optimum point. > > I solved your LP with glpsol: > > > GLPSOL--GLPK LP/MIP Solver 5.0 > Parameter(s) specified in the command line: > --lp masterg.lp > Reading problem data from 'masterg.lp'... > 46 rows, 17 columns, 62 non-zeros > 77 lines were read > GLPK Simplex Optimizer 5.0 > 46 rows, 17 columns, 62 non-zeros > Preprocessing... > ~ 0: obj = 3.527760000e+03 infeas = 0.000e+00 > OPTIMAL SOLUTION FOUND BY LP PREPROCESSOR > Time used: 0.0 secs > Memory used: 0.0 Mb (45669 bytes) > > > Since the optimal objective value is the same as for cplex, there is > no > error. You also may see this from KKT optimality conditions: > > > Karush-Kuhn-Tucker optimality conditions: > > KKT.PE: max.abs.err = 0.00e+00 on row 0 > max.rel.err = 0.00e+00 on row 0 > High quality > > KKT.PB: max.abs.err = 0.00e+00 on row 0 > max.rel.err = 0.00e+00 on row 0 > High quality > > KKT.DE: max.abs.err = 0.00e+00 on column 0 > max.rel.err = 0.00e+00 on column 0 > High quality > > KKT.DB: max.abs.err = 0.00e+00 on row 0 > max.rel.err = 0.00e+00 on row 0 > High quality > > > Best, > > Andrew Makhorin > > > > > > Sincerely yours > > > > Harald, University of Applied Sciences, Wismar Germany > > > > > > PS CPLEX Dualprices: > > > > Dual simplex - Optimal: Objective = 3.5277600000e+03 > > Solution time = 0.02 sec. Iterations = 0 (0) > > Deterministic time = 0.02 ticks (1.47 ticks/sec) > > > > CPLEX> display solution dual * > > Constraint Name Dual Price > > c1 141.550000 > > c2 330.530000 > > c3 318.280000 > > c5 201.940000 > > c7 237.010000 > > c8 283.710000 > > c9 143.440000 > > c10 221.820000 > > c11 130.990000 > > c12 210.350000 > > c13 205.530000 > > c14 175.150000 > > c15 231.340000 > > c17 155.250000 > > c21 192.060000 > > c25 204.170000 > > c41 144.640000 > > All other dual prices matching '*' are 0. > > > > PS GLPK Dualprices > > > > c1 = 0.0 > > c2 = 0.0 > > c3 = 0.0 > > c4 = 0.0 > > c5 = 0.0 > > c6 = 0.0 > > c7 = 0.0 > > c8 = 0.0 > > c9 = 0.0 > > c10 = 0.0 > > c11 = 0.0 > > c12 = 0.0 > > c13 = 0.0 > > c14 = 0.0 > > c15 = 0.0 > > c16 = 0.0 > > c17 = 0.0 > > c18 = 0.0 > > c19 = 0.0 > > c20 = 0.0 > > c21 = 0.0 > > c22 = 0.0 > > c23 = 0.0 > > c24 = 0.0 > > c25 = 0.0 > > c26 = 0.0 > > c27 = 0.0 > > c28 = 0.0 > > c29 = 0.0 > > c30 = 0.0 > > c31 = 0.0 > > c32 = 0.0 > > c33 = 0.0 > > c34 = 0.0 > > c35 = 0.0 > > c36 = 0.0 > > c37 = 0.0 > > c38 = 0.0 > > c39 = 0.0 > > c40 = 0.0 > > c41 = 0.0 > > c42 = 0.0 > > c43 = 0.0 > > c44 = 0.0 > > c45 = 0.0 > > c46 = 330.53