You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/MOI_wrapper/MOI_wrapper.jl
+111-88
Original file line number
Diff line number
Diff line change
@@ -1517,110 +1517,133 @@ function _raw_simplex_string(status::Int32)
1517
1517
MOI.INFEASIBLE,
1518
1518
"The LP problem instance has no primal feasible solution (only if the LP presolver is used).",
1519
1519
)
1520
-
elseif status == GLP_ENODFS
1520
+
else
1521
+
@assert status == GLP_ENODFS
1521
1522
return (
1522
1523
MOI.DUAL_INFEASIBLE,
1523
1524
"The LP problem instance has no dual feasible solution (only if the LP presolver is used).",
1524
1525
)
1526
+
end
1527
+
end
1528
+
1529
+
function_raw_exact_string(status::Int32)
1530
+
if status == GLP_EBADB
1531
+
return (
1532
+
MOI.INVALID_MODEL,
1533
+
"Unable to start the search, because the initial basis specified in the problem object is invalid—the number of basic (auxiliary and structural) variables is not the same as the number of rows in the problem object.",
1534
+
)
1535
+
elseif status == GLP_ESING
1536
+
return (
1537
+
MOI.NUMERICAL_ERROR,
1538
+
"Unable to start the search, because the basis matrix corresponding to the initial basis is exactly singular.",
1539
+
)
1540
+
elseif status == GLP_EBOUND
1541
+
return (
1542
+
MOI.INVALID_MODEL,
1543
+
"Unable to start the search, because some double-bounded (auxiliary or structural) variables have incorrect bounds.",
1544
+
)
1545
+
elseif status == GLP_EFA
1546
+
(MOI.INVALID_MODEL, "The problem instance has no rows/columns.")
1547
+
elseif status == GLP_EITLIM
1548
+
return (
1549
+
MOI.ITERATION_LIMIT,
1550
+
"The search was prematurely terminated, because the simplex iteration limit has been exceeded.",
"Unable to start the search, because the initial basis specified in the problem object is invalid—the number of basic (auxiliary and structural) variables is not the same as the number of rows in the problem object.",
1534
-
),
1535
-
GLP_ESING => (
1536
-
MOI.NUMERICAL_ERROR,
1537
-
"Unable to start the search, because the basis matrix corresponding to the initial basis is exactly singular.",
1538
-
),
1539
-
GLP_EBOUND => (
1540
-
MOI.INVALID_MODEL,
1541
-
"Unable to start the search, because some double-bounded (auxiliary or structural) variables have incorrect bounds.",
1542
-
),
1543
-
GLP_EFAIL =>
1544
-
(MOI.INVALID_MODEL, "The problem instance has no rows/columns."),
1545
-
GLP_EITLIM => (
1546
-
MOI.ITERATION_LIMIT,
1547
-
"The search was prematurely terminated, because the simplex iteration limit has been exceeded.",
1548
-
),
1549
-
GLP_ETMLIM => (
1550
-
MOI.TIME_LIMIT,
1551
-
"The search was prematurely terminated, because the time limit has been exceeded.",
1552
-
),
1553
-
)
1553
+
@assert status == GLP_ETMLIM
1554
+
return (
1555
+
MOI.TIME_LIMIT,
1556
+
"The search was prematurely terminated, because the time limit has been exceeded.",
"Unable to start the search, because some double-bounded (auxiliary or structural) variables have incorrect bounds.",
1572
-
),
1573
-
GLP_ENOPFS => (
1574
-
MOI.INFEASIBLE,
1575
-
"Unable to start the search, because LP relaxation of the MIP problem instance has no primal feasible solution. (This code may appear only if the presolver is enabled.)",
1576
-
),
1577
-
GLP_ENODFS => (
1578
-
MOI.DUAL_INFEASIBLE,
1579
-
"Unable to start the search, because LP relaxation of the MIP problem instance has no dual feasible solution. In other word, this code means that if the LP relaxation has at least one primal feasible solution, its optimal solution is unbounded, so if the MIP problem has at least one integer feasible solution, its (integer) optimal solution is also unbounded. (This code may appear only if the presolver is enabled.)",
1580
-
),
1581
-
GLP_EFAIL => (
1582
-
MOI.INVALID_MODEL,
1583
-
"The search was prematurely terminated due to the solver failure.",
1584
-
),
1585
-
GLP_EMIPGAP => (
1586
-
MOI.OPTIMAL,
1587
-
"The search was prematurely terminated, because the relative mip gap tolerance has been reached.",
1588
-
),
1589
-
GLP_ETMLIM => (
1590
-
MOI.TIME_LIMIT,
1591
-
"The search was prematurely terminated, because the time limit has been exceeded.",
1592
-
),
1593
-
GLP_ESTOP => (
1594
-
MOI.INTERRUPTED,
1595
-
"The search was prematurely terminated by application. (This code may appear only if the advanced solver interface is used.)",
1596
-
),
1597
-
)
1577
+
function_raw_intopt_string(status::Int32)
1578
+
if status == GLP_EBOUND
1579
+
return (
1580
+
MOI.INVALID_MODEL,
1581
+
"Unable to start the search, because some double-bounded (auxiliary or structural) variables have incorrect bounds.",
1582
+
)
1583
+
elseif status == GLP_ENOPFS
1584
+
return (
1585
+
MOI.INFEASIBLE,
1586
+
"Unable to start the search, because LP relaxation of the MIP problem instance has no primal feasible solution. (This code may appear only if the presolver is enabled.)",
1587
+
)
1588
+
elseif status == GLP_ENODFS
1589
+
return (
1590
+
MOI.DUAL_INFEASIBLE,
1591
+
"Unable to start the search, because LP relaxation of the MIP problem instance has no dual feasible solution. In other word, this code means that if the LP relaxation has at least one primal feasible solution, its optimal solution is unbounded, so if the MIP problem has at least one integer feasible solution, its (integer) optimal solution is also unbounded. (This code may appear only if the presolver is enabled.)",
1592
+
)
1593
+
elseif status == GLP_EFAIL
1594
+
return (
1595
+
MOI.INVALID_MODEL,
1596
+
"The search was prematurely terminated due to the solver failure.",
1597
+
)
1598
+
elseif status == GLP_EMIPGAP
1599
+
return (
1600
+
MOI.OPTIMAL,
1601
+
"The search was prematurely terminated, because the relative mip gap tolerance has been reached.",
1602
+
)
1603
+
elseif status == GLP_ETMLIM
1604
+
return (
1605
+
MOI.TIME_LIMIT,
1606
+
"The search was prematurely terminated, because the time limit has been exceeded.",
1607
+
)
1608
+
else
1609
+
@assert status == GLP_ESTOP
1610
+
return (
1611
+
MOI.INTERRUPTED,
1612
+
"The search was prematurely terminated by application. (This code may appear only if the advanced solver interface is used.)",
0 commit comments