Class ModelStrategy.DefaultStrategy

java.lang.Object
org.ojalgo.optimisation.integer.ModelStrategy
org.ojalgo.optimisation.integer.ModelStrategy.DefaultStrategy
All Implemented Interfaces:
IntegerStrategy
Enclosing class:
ModelStrategy

static final class ModelStrategy.DefaultStrategy extends ModelStrategy
  • Field Details

    • DEFAULT_INFEASIBLE_PENALTY

      private static final double DEFAULT_INFEASIBLE_PENALTY
    • RELIABILITY_MIN

      private static final int RELIABILITY_MIN
      See Also:
    • ROUGHLY

      private static final NumberContext ROUGHLY
    • myCutFailedStreak

      private volatile int myCutFailedStreak
      Adaptive cut generation state
    • myCutLastDepth

      private volatile int myCutLastDepth
      Adaptive cut generation state
    • myCutNodesSinceLastSuccess

      private volatile long myCutNodesSinceLastSuccess
      Adaptive cut generation state
    • myLowerCount

      private final int[] myLowerCount
    • myLowerPseudoWeight

      private final double[] myLowerPseudoWeight
      Pseudo-costs when down
    • myUpperCount

      private final int[] myUpperCount
    • myUpperPseudoWeight

      private final double[] myUpperPseudoWeight
      Pseudo-costs when up
  • Constructor Details

  • Method Details

    • productScore

      private static double productScore(double wDown, double wUp, double distDn, double distUp)
    • updatePseudo

      private void updatePseudo(int idx, boolean upper, double observation)
    • initialise

      protected ModelStrategy initialise(MultiaryFunction.TwiceDifferentiable<Double> function, Access1D<?> point)
      Initialise the integer significances, based on the objective function gradient.
      Specified by:
      initialise in class ModelStrategy
    • isCutRatherThanBranch

      protected boolean isCutRatherThanBranch(NodeKey nodeKey, int branchIntegerIndex, double variableValue, double nodeValue, Optimisation.Result bestResultSoFar)
      Description copied from class: ModelStrategy
      Decide if cuts should be attempted at this node.
      Specified by:
      isCutRatherThanBranch in class ModelStrategy
    • markInfeasible

      protected void markInfeasible(NodeKey key, boolean found, double incumbentValue)
      scale-aware infeasible update using any available cutoff (incumbent or best bound)
      Specified by:
      markInfeasible in class ModelStrategy
    • markInteger

      protected void markInteger(NodeKey key, Optimisation.Result result)
      Specified by:
      markInteger in class ModelStrategy
    • onCutFailure

      protected void onCutFailure()
      Called after a failed cut generation attempt (no cuts added). Original behaviour was to disable.
      Specified by:
      onCutFailure in class ModelStrategy
    • onCutSuccess

      protected void onCutSuccess(NodeKey nodeKey)
      Called after a successful cut generation attempt.
      Specified by:
      onCutSuccess in class ModelStrategy
    • onNodeSolved

      protected void onNodeSolved(NodeKey key, Optimisation.Result result, double objective, boolean minimisation)
      Description copied from class: ModelStrategy
      Hook to update pseudo-costs after a node is solved.
      Specified by:
      onNodeSolved in class ModelStrategy
    • scoreBranch

      protected double scoreBranch(int idx, double distanceDown, double distanceUp, boolean found)
      Specified by:
      scoreBranch in class ModelStrategy
    • scoreBranchDown

      protected double scoreBranchDown(int idx, double distanceDown, boolean found)
      Specified by:
      scoreBranchDown in class ModelStrategy
    • scoreBranchUp

      protected double scoreBranchUp(int idx, double distanceUp, boolean found)
      Specified by:
      scoreBranchUp in class ModelStrategy