Class ModelStrategy.DefaultStrategy

    • Field Detail

      • myIterationPoint

        private Access1D<?> myIterationPoint
        The latest found integer solution.
      • mySignificances

        private final double[] mySignificances
        Try to keep track of how different values of integer variables relates to the objective function value.
    • Method Detail

      • addSignificance

        private void addSignificance​(int idx,
                                     double significance)
      • isDirect

        protected boolean isDirect​(NodeKey node,
                                   boolean found)
        Description copied from class: ModelStrategy
        This method will be called twice when branching – once for each of the new nodes created by branching. In most cases you only want to return true for (at most) one of those new branches. Always returning true for both the new nodes will cause excessive memory consumption.
        Specified by:
        isDirect in class ModelStrategy
        Parameters:
        node - The node to check
        found - Is an integer solution already found?
        Returns:
        true if this node should be evaluated directly (not deferred)
      • markInfeasible

        protected void markInfeasible​(NodeKey key,
                                      boolean found)
        Description copied from class: ModelStrategy
        Called everytime a node/subproblem is found to be infeasible
        Specified by:
        markInfeasible in class ModelStrategy
      • toComparable

        protected double toComparable​(int idx,
                                      double displacement,
                                      boolean found)
        If not yet found integer solution then compare the remaining/reversed (larger) fraction, otherwise the fraction scaled by the significance.
        Specified by:
        toComparable in class ModelStrategy
        Parameters:
        idx - Integer variable index
        displacement - variable's fractional value
        found - Is an integer solution already found?
        Returns:
        Value used to compare variables when determining which to branch on. Larger value means more likelyn to branch on this.
        See Also:
        ModelStrategy.toComparable(int, double, boolean)