Changeset 536


Ignore:
Timestamp:
Oct 11, 2005 11:41:26 AM (15 years ago)
Author:
andreasw
Message:

Added detection of diverging iterates and corresponding new return code
and EXIT message.

Location:
branches/dev/Algorithm
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/dev/Algorithm/IpConvCheck.hpp

    r501 r536  
    3838      CONVERGED_TO_ACCEPTABLE_POINT,
    3939      MAXITER_EXCEEDED,
     40      DIVERGING,
    4041      FAILED
    4142    };
  • branches/dev/Algorithm/IpIpoptAlg.cpp

    r529 r536  
    217217        return SUCCESS;
    218218      }
    219       if (conv_status == ConvergenceCheck::CONVERGED_TO_ACCEPTABLE_POINT) {
     219      else if (conv_status == ConvergenceCheck::CONVERGED_TO_ACCEPTABLE_POINT) {
    220220        return STOP_AT_ACCEPTABLE_POINT;
    221221      }
    222222      else if (conv_status == ConvergenceCheck::MAXITER_EXCEEDED) {
    223223        return MAXITER_EXCEEDED;
     224      }
     225      else if (conv_status == ConvergenceCheck::DIVERGING) {
     226        return DIVERGING_ITERATES;
    224227      }
    225228    }
  • branches/dev/Algorithm/IpOptErrorConvCheck.cpp

    r493 r536  
    9393      "requires that the (unscaled) complementarity is less than this "
    9494      "threshold; see also acceptable_tol.");
     95    roptions->AddLowerBoundedNumberOption(
     96      "diverging_iterates_tol",
     97      "Threshold for maximal value of primal iterate.",
     98      0.0, true, 1e20,
     99      "If any component of the primal iterates exceeded this value (in "
     100      "absolute terms), the optimization is abort with the exit message that "
     101      "the iterates are diverging.");
    95102  }
    96103
     
    108115    options.GetNumericValue("acceptable_constr_viol_tol", acceptable_constr_viol_tol_, prefix);
    109116    options.GetNumericValue("acceptable_compl_inf_tol", acceptable_compl_inf_tol_, prefix);
     117    options.GetNumericValue("diverging_iterates_tol", diverging_iterates_tol_, prefix);
    110118    acceptable_counter_ = 0;
    111119
     
    145153    }
    146154
     155    if (IpData().curr()->x()->Amax() > diverging_iterates_tol_) {
     156      return ConvergenceCheck::DIVERGING;
     157    }
     158
    147159    return ConvergenceCheck::CONTINUE;
    148160  }
  • branches/dev/Algorithm/IpOptErrorConvCheck.hpp

    r501 r536  
    7070    /** Acceptable tolerance on unscaled complementarity */
    7171    Number acceptable_compl_inf_tol_;
     72    /** Threshold for primal iterates for divergence test */
     73    Number diverging_iterates_tol_;
    7274    //@}
    7375
Note: See TracChangeset for help on using the changeset viewer.