Forum Discussion
FICO
5 months agoCommunity Manager
MIP solution status
Hello, I've been using code like this to get the solution status of a MIP: case getprobstat of XPRS_OPT: status:="Optimum found" XPRS_UNF: status:="Unfinished" XPRS_INF: status:="Infeasib...
FICO
4 months agoCommunity Manager
Here is a piece of Mosel code that captures all values for MIPSTATUS in a similar way as your example:
case getparam("XPRS_MIPSTATUS") of
XPRS_MIP_NOT_LOADED: status:="Problem has not been loaded"
XPRS_MIP_LP_NOT_OPTIMAL: status:="MIP search incomplete - LP not solved, no integer solution"
XPRS_MIP_LP_OPTIMAL: status:="MIP search incomplete - LP solved, no integer solution"
XPRS_MIP_NO_SOL_FOUND: status:="MIP search incomplete - no integer solution"
XPRS_MIP_SOLUTION: status:="MIP search incomplete - integer solution found"
XPRS_MIP_INFEAS: status:="MIP search complete - no integer solution found"
XPRS_MIP_OPTIMAL: status:="MIP search complete - integer solution found"
XPRS_MIP_UNBOUNDED: status:="MIP search incomplete - initial continuous relaxation is unbounded"
else status:="Unkonwn status value"
end-case Status information provided through MIPSTATUS, LPSTATUS etc depends on the problem type that is being solved, whereas the more recently introduced generic status values SOLVESTATUS and SOLSTATUS work with all problem types supported by Xpress Solver, similarly to Mosel's 'getprobstat'. Here is another piece of Mosel code to show their possible values and meaning:
declarations
SolStat, SolvStat: array(integer) of string ! Status messages
end-declarations
SolvStat:: ([XPRS_SOLVESTATUS_UNSTARTED, XPRS_SOLVESTATUS_STOPPED,
XPRS_SOLVESTATUS_FAILED, XPRS_SOLVESTATUS_COMPLETED])
["The solve has not been started.", "Optimization has been interrupted.",
"Optimization has run into a nonrecoverable problem and failed.",
"Search completed."]
SolStat:: ([XPRS_SOLSTATUS_NOTFOUND, XPRS_SOLSTATUS_OPTIMAL,
XPRS_SOLSTATUS_FEASIBLE, XPRS_SOLSTATUS_INFEASIBLE, XPRS_SOLSTATUS_UNBOUNDED])
["No solution available.", "An optimal solution has been found.",
"A solution that is not proven optimal is found.",
"No solution exists.", "The problem is unbounded, if feasible."]
writeln("Problem solve status: ", SolvStat(getparam("XPRS_SOLVESTATUS")),
" Solution status: ", SolStat(getparam("XPRS_SOLSTATUS")))Related Content
Related Content
How can I use ODH for solving a MIP model using Xpress Python API?
Hi everyone, I want to play a bit with ODH for Xpress Solver. I did run ODH from the command line but now I want to integrate it in the whole pipeline of a Python program. What should I import? What...1 month agoPlace FICO® Xpress Optimization ForumFICO® Xpress Optimization Forum2 unread comments2 unread4Views0likes2CommentsHow to load a MIP solution?
Dear all, Currently, I am trying to provide an initial solution to my IP that has three multidimensional (binary) decision variables (x(N), y(N,M) and z(M)). I know that there are the two functions ...7 years agoPlace FICO® Xpress Optimization ForumFICO® Xpress Optimization Forum5 unread comments5 unread0Views0likes5CommentsLoading an MIP solution
I'm having trouple loading an existing MIP solution into XPRESS using C++. The documentation for "load MIP solution" has the following example based on C: XPRBprob expl2;double vals[] = {1.5, 1, 0...14 years agoPlace FICO® Xpress Optimization ForumFICO® Xpress Optimization Forum1 unread comment1 unread0Views0likes1Comment