When using glpsol (GLPSOL: GLPK LP/MIP Solver, v4.65) for the attached .mod file thus
glpsol -m simple_max.mod --wfreemps simple_max.mps I get the (correct) output * 0: obj = -0.000000000e+00 inf = 0.000e+00 (2) * 2: obj = 1.000000000e+01 inf = 0.000e+00 (0) OPTIMAL LP SOLUTION FOUND but the (attached) MPS file is set up for the default sense (minimization). Thus, when running glpsol simple_max.mps I get the output * 0: obj = 0.000000000e+00 inf = 0.000e+00 (0) OPTIMAL LP SOLUTION FOUND The same happens if --wmps is used. When writing out the MPS file glpsol must either * Use the OBJSENSE section (preferably) OBJSENSE MAX * Negate the objective coefficients - although this yields the wrong sign of the objective function and duals How can this bug in glpsol be fixed? Thanks, Julian -- Dr. J. A. Julian Hall, Reader, School of Mathematics, University of Edinburgh, James Clerk Maxwell Building, Peter Guthrie Tait Road, EDINBURGH, EH9 3FD, UK. Room: 5418 Phone: [+44](131) 650 5075 Email: [email protected]<mailto:[email protected]> Web: https://www.maths.ed.ac.uk/school-of-mathematics/people/a-z?person=47 [HiGHS]<http://www.highs.dev> My working hours may not be your working hours. Do not feel pressure to reply to this email outside your working hours. The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336. Is e buidheann carthannais a th’ ann an Oilthigh Dhùn Èideann, clàraichte an Alba, àireamh clàraidh SC005336.
simple_max.mod
Description: audio/mod
* Problem: simple_max * Class: LP * Rows: 3 * Columns: 2 * Non-zeros: 6 * Format: Free MPS * NAME simple_max ROWS L Constraint1 L Constraint2 N Objective COLUMNS x Constraint1 1 Constraint2 3 x Objective 1 y Constraint1 2 Constraint2 1 y Objective 1 RHS RHS1 Constraint1 15 Constraint2 20 ENDATA
* Problem: simple_max * Class: LP * Rows: 3 * Columns: 2 * Non-zeros: 6 * Format: Free MPS * NAME simple_max OBJSENSE MAX ROWS L Constraint1 L Constraint2 N Objective COLUMNS x Constraint1 1 Constraint2 3 x Objective 1 y Constraint1 2 Constraint2 1 y Objective 1 RHS RHS1 Constraint1 15 Constraint2 20 ENDATA
