Originally posted by: SystemAdmin
[EdKlotz said:]
I am using Callable Library and C to solve a transportation problem (LP).
The primal form is infeasible (I can tell from my data). So the dual is unbounded (from my data, I can also tell).
When I solve the dual form, I use the following sentences:
status1 = CPXprimopt(...,...);
status2 = CPXgetstat(...,...);
CPXsolninfo(...,...,NULL,&solutiontype,NULL,NULL);
The results I get are:
status1=0
status2=4
solutiontype=CPX_NO_SOLN.
From status2, I can tell that the problem is unbounded or infeasible, but why solutiontype says there does not exist a solution (from the data, I can tell there exists a solution, and this solution can drive the objective to be unbounded)? If solutiontype = CPX_NO_SOLN, then why status2 is unbounded or infeasible (instead of infeasible)?
In the following, I also add the following function to recover the solution:
CPXsolution(...)
But I also can't get any feasible solution.
What could be wrong?
CPLEX's presolve often detects infeasibility or unboundedness before the subsequently
invoked algorithm does. In such cases, no solution is available. So, check the iteration
log of the run on the model in question. If no simplex method iterations occurred, then
this explains what you saw. Given that you indicated that you can tell from your data
that the primal is infeasible, the odds are good that presolve will figure out the infeasibility
or unboundedness as well.
You can turn presolve off if you absolutely need to see the solution associated with the conclusion
of infeasibility or unboundness. However, if you are building an application that will run on
numerous models, many of which are feasible, always turning presolve off may cause you to
miss out on the significant performance improvement presolve offers. So, you may want to only
turn presolve off after your initial run has a CPXgetstat() result of 3 or 4, and a CPXsolninfo result
of CPX_NO_SOLN.
#CPLEXOptimizers#DecisionOptimization