Changeset 1999


Ignore:
Timestamp:
Jun 7, 2012 9:00:03 AM (7 years ago)
Author:
stefan
Message:

add solution status USER_INTERRUPT

Location:
trunk/Bonmin/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Bonmin/src/CbcBonmin/BonCbc.cpp

    r1998 r1999  
    624624        mipStatus_ = Feasible;
    625625      }
     626      else {
     627        mipStatus_ = NoSolutionKnown;
     628      }
    626629    }
    627630    else if (model_.status() == 0) {
     
    641644    }
    642645    else if (model_.status() == 1 || model_.status() == 5) {
    643       status = TMINLP::LIMIT_EXCEEDED;
     646      status = model_.status() == 1 ? TMINLP::LIMIT_EXCEEDED : TMINLP::USER_INTERRUPT;
    644647      if (bestSolution_) {
    645648        mipStatus_ = Feasible;
  • trunk/Bonmin/src/Interfaces/Ampl/BonAmplTMINLP.cpp

    r1926 r1999  
    732732      solve_result_num = 300;
    733733    }
    734     else if (status == TMINLP::LIMIT_EXCEEDED) {
     734    else if (status == TMINLP::LIMIT_EXCEEDED || status == TMINLP::USER_INTERRUPT) {
    735735      status_str = "\t\"Not finished\"";
    736       message = "\n" + appName_ + ": Optimization interupted on limit.";
     736      message = "\n" + appName_ + ": Optimization interrupted " + (status == TMINLP::LIMIT_EXCEEDED ? "on limit." : "by user.");
    737737      if(x)
    738         solve_result_num = 421; /* Limit reached with integer feasible solution.*/
     738        solve_result_num = 421; /* Limit reached or user interrupt with integer feasible solution.*/
    739739      else
    740         solve_result_num = 410; /* Limit reached without solution.*/
     740        solve_result_num = 410; /* Limit reached or user interrupt without solution.*/
    741741    }
    742742    else if (status == TMINLP::MINLP_ERROR) {
  • trunk/Bonmin/src/Interfaces/Ampl/BonAmplTMINLP.hpp

    r1926 r1999  
    174174      * <tr> <td> 3 </td> <td> Integer optimal </td> </tr>
    175175      * <tr> <td> 220 </td> <td> problem is proven infeasible. </td> </tr>
    176       * <tr> <td> 421 </td> <td> limit reached with integer feasible solution found. </td> </tr>
    177       * <tr> <td> 410 </td> <td> limit reached without any integer feasible solution. </td> </tr>
     176      * <tr> <td> 421 </td> <td> limit reached or user interrupt with integer feasible solution found. </td> </tr>
     177      * <tr> <td> 410 </td> <td> limit reached or user interrupt without any integer feasible solution. </td> </tr>
    178178      * <tr> <td> 500 </td> <td> error. </td> </tr>
    179179      * <caption> Status codes for optimization. </caption>
  • trunk/Bonmin/src/Interfaces/BonTMINLP.hpp

    r1922 r1999  
    6767      CONTINUOUS_UNBOUNDED,
    6868      LIMIT_EXCEEDED,
     69      USER_INTERRUPT,
    6970      MINLP_ERROR};
    7071    /** Class to store sos constraints for model */
Note: See TracChangeset for help on using the changeset viewer.