Skip to content

Commit

Permalink
apply same change to initial_lp_solve() and solve_hotstart()
Browse files Browse the repository at this point in the history
  • Loading branch information
yuxies committed Mar 16, 2024
1 parent cdd7c04 commit 6341c2c
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions src/LP/lp_solver.c
Original file line number Diff line number Diff line change
Expand Up @@ -2598,6 +2598,12 @@ int initial_lp_solve (LPdata *lp_data, int *iterd)
}else if (si->isIterationLimitReached()){
term = LP_D_ITLIM;
#ifdef __OSI_CLP__
// YX: reset term if needed; Clp may return ITLIM at timeout
int itlim_chk = -1;
retval = si->getIntParam(OsiMaxNumIteration, itlim_chk);
if (si->getIterationCount() < itlim_chk){
term = LP_TIME_LIMIT;
}
/* If max iterations and had switched to primal, bound is no good */
if (si->getModelPtr()->secondaryStatus() == 10){
term = LP_ABANDONED;
Expand Down Expand Up @@ -2825,9 +2831,17 @@ int solve_hotstart(LPdata *lp_data, int *iterd)
term = LP_D_OBJLIM;
else if (si->isProvenOptimal())
term = LP_OPTIMAL;
else if (si->isIterationLimitReached())
else if (si->isIterationLimitReached()){
term = LP_D_ITLIM;
else if (si->isAbandoned())
#ifdef __OSI_CLP__
// YX: reset term if needed; Clp may return ITLIM at timeout
int itlim_chk = -1;
retval = si->getIntParam(OsiMaxNumIteration, itlim_chk);
if (si->getIterationCount() < itlim_chk){
term = LP_TIME_LIMIT;
}
#endif
}else if (si->isAbandoned())
term = LP_ABANDONED;

/* if(term == D_UNBOUNDED){
Expand Down

0 comments on commit 6341c2c

Please sign in to comment.