Enum FirstSolutionStrategy.Value

  • All Implemented Interfaces:
    com.google.protobuf.Internal.EnumLite, com.google.protobuf.ProtocolMessageEnum, java.io.Serializable, java.lang.Comparable<FirstSolutionStrategy.Value>
    Enclosing class:
    FirstSolutionStrategy

    public static enum FirstSolutionStrategy.Value
    extends java.lang.Enum<FirstSolutionStrategy.Value>
    implements com.google.protobuf.ProtocolMessageEnum
    Protobuf enum operations_research.FirstSolutionStrategy.Value
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      ALL_UNPERFORMED
      --- Path insertion heuristics --- Make all nodes inactive.
      AUTOMATIC
      Lets the solver detect which strategy to use according to the model being solved.
      BEST_INSERTION
      Iteratively build a solution by inserting the cheapest node at its cheapest position; the cost of insertion is based on the global cost function of the routing model.
      CHRISTOFIDES
      Christofides algorithm (actually a variant of the Christofides algorithm using a maximal matching instead of a maximum matching, which does not guarantee the 3/2 factor of the approximation on a metric travelling salesman).
      EVALUATOR_STRATEGY
      Same as PATH_CHEAPEST_ARC, except that arc costs are evaluated using the function passed to RoutingModel::SetFirstSolutionEvaluator() (cf.
      FIRST_UNBOUND_MIN_VALUE
      Select the first node with an unbound successor and connect it to the first available node.
      GLOBAL_CHEAPEST_ARC
      --- Variable-based heuristics --- Iteratively connect two nodes which produce the cheapest route segment.
      LOCAL_CHEAPEST_ARC
      Select the first node with an unbound successor and connect it to the node which produces the cheapest route segment.
      LOCAL_CHEAPEST_COST_INSERTION
      Same as LOCAL_CHEAPEST_INSERTION except that the cost of insertion is based on the routing model cost function instead of arc costs only.
      LOCAL_CHEAPEST_INSERTION
      Iteratively build a solution by inserting each node at its cheapest position; the cost of insertion is based on the arc cost function.
      PARALLEL_CHEAPEST_INSERTION
      Iteratively build a solution by inserting the cheapest node at its cheapest position; the cost of insertion is based on the arc cost function.
      PATH_CHEAPEST_ARC
      --- Path addition heuristics --- Starting from a route "start" node, connect it to the node which produces the cheapest route segment, then extend the route by iterating on the last node added to the route.
      PATH_MOST_CONSTRAINED_ARC
      Same as PATH_CHEAPEST_ARC, but arcs are evaluated with a comparison-based selector which will favor the most constrained arc first.
      SAVINGS
      Savings algorithm (Clarke & Wright).
      SEQUENTIAL_CHEAPEST_INSERTION
      Iteratively build a solution by constructing routes sequentially, for each route inserting the cheapest node at its cheapest position until the route is completed; the cost of insertion is based on the arc cost function.
      SWEEP
      Sweep algorithm (Wren & Holliday).
      UNRECOGNIZED  
      UNSET
      See the homonymous value in LocalSearchMetaheuristic.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int ALL_UNPERFORMED_VALUE
      --- Path insertion heuristics --- Make all nodes inactive.
      static int AUTOMATIC_VALUE
      Lets the solver detect which strategy to use according to the model being solved.
      static int BEST_INSERTION_VALUE
      Iteratively build a solution by inserting the cheapest node at its cheapest position; the cost of insertion is based on the global cost function of the routing model.
      static int CHRISTOFIDES_VALUE
      Christofides algorithm (actually a variant of the Christofides algorithm using a maximal matching instead of a maximum matching, which does not guarantee the 3/2 factor of the approximation on a metric travelling salesman).
      static int EVALUATOR_STRATEGY_VALUE
      Same as PATH_CHEAPEST_ARC, except that arc costs are evaluated using the function passed to RoutingModel::SetFirstSolutionEvaluator() (cf.
      static int FIRST_UNBOUND_MIN_VALUE_VALUE
      Select the first node with an unbound successor and connect it to the first available node.
      static int GLOBAL_CHEAPEST_ARC_VALUE
      --- Variable-based heuristics --- Iteratively connect two nodes which produce the cheapest route segment.
      static int LOCAL_CHEAPEST_ARC_VALUE
      Select the first node with an unbound successor and connect it to the node which produces the cheapest route segment.
      static int LOCAL_CHEAPEST_COST_INSERTION_VALUE
      Same as LOCAL_CHEAPEST_INSERTION except that the cost of insertion is based on the routing model cost function instead of arc costs only.
      static int LOCAL_CHEAPEST_INSERTION_VALUE
      Iteratively build a solution by inserting each node at its cheapest position; the cost of insertion is based on the arc cost function.
      static int PARALLEL_CHEAPEST_INSERTION_VALUE
      Iteratively build a solution by inserting the cheapest node at its cheapest position; the cost of insertion is based on the arc cost function.
      static int PATH_CHEAPEST_ARC_VALUE
      --- Path addition heuristics --- Starting from a route "start" node, connect it to the node which produces the cheapest route segment, then extend the route by iterating on the last node added to the route.
      static int PATH_MOST_CONSTRAINED_ARC_VALUE
      Same as PATH_CHEAPEST_ARC, but arcs are evaluated with a comparison-based selector which will favor the most constrained arc first.
      static int SAVINGS_VALUE
      Savings algorithm (Clarke & Wright).
      static int SEQUENTIAL_CHEAPEST_INSERTION_VALUE
      Iteratively build a solution by constructing routes sequentially, for each route inserting the cheapest node at its cheapest position until the route is completed; the cost of insertion is based on the arc cost function.
      static int SWEEP_VALUE
      Sweep algorithm (Wren & Holliday).
      static int UNSET_VALUE
      See the homonymous value in LocalSearchMetaheuristic.
    • Enum Constant Detail

      • AUTOMATIC

        public static final FirstSolutionStrategy.Value AUTOMATIC
         Lets the solver detect which strategy to use according to the model being
         solved.
         
        AUTOMATIC = 15;
      • PATH_CHEAPEST_ARC

        public static final FirstSolutionStrategy.Value PATH_CHEAPEST_ARC
         --- Path addition heuristics ---
         Starting from a route "start" node, connect it to the node which produces
         the cheapest route segment, then extend the route by iterating on the
         last node added to the route.
         
        PATH_CHEAPEST_ARC = 3;
      • PATH_MOST_CONSTRAINED_ARC

        public static final FirstSolutionStrategy.Value PATH_MOST_CONSTRAINED_ARC
         Same as PATH_CHEAPEST_ARC, but arcs are evaluated with a comparison-based
         selector which will favor the most constrained arc first. To assign a
         selector to the routing model, see
         RoutingModel::ArcIsMoreConstrainedThanArc() in routing.h for details.
         
        PATH_MOST_CONSTRAINED_ARC = 4;
      • EVALUATOR_STRATEGY

        public static final FirstSolutionStrategy.Value EVALUATOR_STRATEGY
         Same as PATH_CHEAPEST_ARC, except that arc costs are evaluated using the
         function passed to RoutingModel::SetFirstSolutionEvaluator()
         (cf. routing.h).
         
        EVALUATOR_STRATEGY = 5;
      • SAVINGS

        public static final FirstSolutionStrategy.Value SAVINGS
         Savings algorithm (Clarke & Wright).
         Reference: Clarke, G. & Wright, J.W.:
         "Scheduling of Vehicles from a Central Depot to a Number of Delivery
         Points", Operations Research, Vol. 12, 1964, pp. 568-581
         
        SAVINGS = 10;
      • SWEEP

        public static final FirstSolutionStrategy.Value SWEEP
         Sweep algorithm (Wren & Holliday).
         Reference: Anthony Wren & Alan Holliday: Computer Scheduling of Vehicles
         from One or More Depots to a Number of Delivery Points Operational
         Research Quarterly (1970-1977),
         Vol. 23, No. 3 (Sep., 1972), pp. 333-344
         
        SWEEP = 11;
      • CHRISTOFIDES

        public static final FirstSolutionStrategy.Value CHRISTOFIDES
         Christofides algorithm (actually a variant of the Christofides algorithm
         using a maximal matching instead of a maximum matching, which does
         not guarantee the 3/2 factor of the approximation on a metric travelling
         salesman). Works on generic vehicle routing models by extending a route
         until no nodes can be inserted on it.
         Reference: Nicos Christofides, Worst-case analysis of a new heuristic for
         the travelling salesman problem, Report 388, Graduate School of
         Industrial Administration, CMU, 1976.
         
        CHRISTOFIDES = 13;
      • ALL_UNPERFORMED

        public static final FirstSolutionStrategy.Value ALL_UNPERFORMED
         --- Path insertion heuristics ---
         Make all nodes inactive. Only finds a solution if nodes are optional (are
         element of a disjunction constraint with a finite penalty cost).
         
        ALL_UNPERFORMED = 6;
      • BEST_INSERTION

        public static final FirstSolutionStrategy.Value BEST_INSERTION
         Iteratively build a solution by inserting the cheapest node at its
         cheapest position; the cost of insertion is based on the global cost
         function of the routing model. As of 2/2012, only works on models with
         optional nodes (with finite penalty costs).
         
        BEST_INSERTION = 7;
      • PARALLEL_CHEAPEST_INSERTION

        public static final FirstSolutionStrategy.Value PARALLEL_CHEAPEST_INSERTION
         Iteratively build a solution by inserting the cheapest node at its
         cheapest position; the cost of insertion is based on the arc cost
         function. Is faster than BEST_INSERTION.
         
        PARALLEL_CHEAPEST_INSERTION = 8;
      • SEQUENTIAL_CHEAPEST_INSERTION

        public static final FirstSolutionStrategy.Value SEQUENTIAL_CHEAPEST_INSERTION
         Iteratively build a solution by constructing routes sequentially, for
         each route inserting the cheapest node at its cheapest position until the
         route is completed; the cost of insertion is based on the arc cost
         function. Is faster than PARALLEL_CHEAPEST_INSERTION.
         
        SEQUENTIAL_CHEAPEST_INSERTION = 14;
      • LOCAL_CHEAPEST_INSERTION

        public static final FirstSolutionStrategy.Value LOCAL_CHEAPEST_INSERTION
         Iteratively build a solution by inserting each node at its cheapest
         position; the cost of insertion is based on the arc cost function.
         Differs from PARALLEL_CHEAPEST_INSERTION by the node selected for
         insertion; here nodes are considered in decreasing order of distance to
         the start/ends of the routes, i.e. farthest nodes are inserted first.
         Is faster than SEQUENTIAL_CHEAPEST_INSERTION.
         
        LOCAL_CHEAPEST_INSERTION = 9;
      • LOCAL_CHEAPEST_COST_INSERTION

        public static final FirstSolutionStrategy.Value LOCAL_CHEAPEST_COST_INSERTION
         Same as LOCAL_CHEAPEST_INSERTION except that the cost of insertion is
         based on the routing model cost function instead of arc costs only.
         
        LOCAL_CHEAPEST_COST_INSERTION = 16;
      • GLOBAL_CHEAPEST_ARC

        public static final FirstSolutionStrategy.Value GLOBAL_CHEAPEST_ARC
         --- Variable-based heuristics ---
         Iteratively connect two nodes which produce the cheapest route segment.
         
        GLOBAL_CHEAPEST_ARC = 1;
      • LOCAL_CHEAPEST_ARC

        public static final FirstSolutionStrategy.Value LOCAL_CHEAPEST_ARC
         Select the first node with an unbound successor and connect it to the
         node which produces the cheapest route segment.
         
        LOCAL_CHEAPEST_ARC = 2;
      • FIRST_UNBOUND_MIN_VALUE

        public static final FirstSolutionStrategy.Value FIRST_UNBOUND_MIN_VALUE
         Select the first node with an unbound successor and connect it to the
         first available node.
         This is equivalent to the CHOOSE_FIRST_UNBOUND strategy combined with
         ASSIGN_MIN_VALUE (cf. constraint_solver.h).
         
        FIRST_UNBOUND_MIN_VALUE = 12;
    • Field Detail

      • UNSET_VALUE

        public static final int UNSET_VALUE
         See the homonymous value in LocalSearchMetaheuristic.
         
        UNSET = 0;
        See Also:
        Constant Field Values
      • AUTOMATIC_VALUE

        public static final int AUTOMATIC_VALUE
         Lets the solver detect which strategy to use according to the model being
         solved.
         
        AUTOMATIC = 15;
        See Also:
        Constant Field Values
      • PATH_CHEAPEST_ARC_VALUE

        public static final int PATH_CHEAPEST_ARC_VALUE
         --- Path addition heuristics ---
         Starting from a route "start" node, connect it to the node which produces
         the cheapest route segment, then extend the route by iterating on the
         last node added to the route.
         
        PATH_CHEAPEST_ARC = 3;
        See Also:
        Constant Field Values
      • PATH_MOST_CONSTRAINED_ARC_VALUE

        public static final int PATH_MOST_CONSTRAINED_ARC_VALUE
         Same as PATH_CHEAPEST_ARC, but arcs are evaluated with a comparison-based
         selector which will favor the most constrained arc first. To assign a
         selector to the routing model, see
         RoutingModel::ArcIsMoreConstrainedThanArc() in routing.h for details.
         
        PATH_MOST_CONSTRAINED_ARC = 4;
        See Also:
        Constant Field Values
      • EVALUATOR_STRATEGY_VALUE

        public static final int EVALUATOR_STRATEGY_VALUE
         Same as PATH_CHEAPEST_ARC, except that arc costs are evaluated using the
         function passed to RoutingModel::SetFirstSolutionEvaluator()
         (cf. routing.h).
         
        EVALUATOR_STRATEGY = 5;
        See Also:
        Constant Field Values
      • SAVINGS_VALUE

        public static final int SAVINGS_VALUE
         Savings algorithm (Clarke & Wright).
         Reference: Clarke, G. & Wright, J.W.:
         "Scheduling of Vehicles from a Central Depot to a Number of Delivery
         Points", Operations Research, Vol. 12, 1964, pp. 568-581
         
        SAVINGS = 10;
        See Also:
        Constant Field Values
      • SWEEP_VALUE

        public static final int SWEEP_VALUE
         Sweep algorithm (Wren & Holliday).
         Reference: Anthony Wren & Alan Holliday: Computer Scheduling of Vehicles
         from One or More Depots to a Number of Delivery Points Operational
         Research Quarterly (1970-1977),
         Vol. 23, No. 3 (Sep., 1972), pp. 333-344
         
        SWEEP = 11;
        See Also:
        Constant Field Values
      • CHRISTOFIDES_VALUE

        public static final int CHRISTOFIDES_VALUE
         Christofides algorithm (actually a variant of the Christofides algorithm
         using a maximal matching instead of a maximum matching, which does
         not guarantee the 3/2 factor of the approximation on a metric travelling
         salesman). Works on generic vehicle routing models by extending a route
         until no nodes can be inserted on it.
         Reference: Nicos Christofides, Worst-case analysis of a new heuristic for
         the travelling salesman problem, Report 388, Graduate School of
         Industrial Administration, CMU, 1976.
         
        CHRISTOFIDES = 13;
        See Also:
        Constant Field Values
      • ALL_UNPERFORMED_VALUE

        public static final int ALL_UNPERFORMED_VALUE
         --- Path insertion heuristics ---
         Make all nodes inactive. Only finds a solution if nodes are optional (are
         element of a disjunction constraint with a finite penalty cost).
         
        ALL_UNPERFORMED = 6;
        See Also:
        Constant Field Values
      • BEST_INSERTION_VALUE

        public static final int BEST_INSERTION_VALUE
         Iteratively build a solution by inserting the cheapest node at its
         cheapest position; the cost of insertion is based on the global cost
         function of the routing model. As of 2/2012, only works on models with
         optional nodes (with finite penalty costs).
         
        BEST_INSERTION = 7;
        See Also:
        Constant Field Values
      • PARALLEL_CHEAPEST_INSERTION_VALUE

        public static final int PARALLEL_CHEAPEST_INSERTION_VALUE
         Iteratively build a solution by inserting the cheapest node at its
         cheapest position; the cost of insertion is based on the arc cost
         function. Is faster than BEST_INSERTION.
         
        PARALLEL_CHEAPEST_INSERTION = 8;
        See Also:
        Constant Field Values
      • SEQUENTIAL_CHEAPEST_INSERTION_VALUE

        public static final int SEQUENTIAL_CHEAPEST_INSERTION_VALUE
         Iteratively build a solution by constructing routes sequentially, for
         each route inserting the cheapest node at its cheapest position until the
         route is completed; the cost of insertion is based on the arc cost
         function. Is faster than PARALLEL_CHEAPEST_INSERTION.
         
        SEQUENTIAL_CHEAPEST_INSERTION = 14;
        See Also:
        Constant Field Values
      • LOCAL_CHEAPEST_INSERTION_VALUE

        public static final int LOCAL_CHEAPEST_INSERTION_VALUE
         Iteratively build a solution by inserting each node at its cheapest
         position; the cost of insertion is based on the arc cost function.
         Differs from PARALLEL_CHEAPEST_INSERTION by the node selected for
         insertion; here nodes are considered in decreasing order of distance to
         the start/ends of the routes, i.e. farthest nodes are inserted first.
         Is faster than SEQUENTIAL_CHEAPEST_INSERTION.
         
        LOCAL_CHEAPEST_INSERTION = 9;
        See Also:
        Constant Field Values
      • LOCAL_CHEAPEST_COST_INSERTION_VALUE

        public static final int LOCAL_CHEAPEST_COST_INSERTION_VALUE
         Same as LOCAL_CHEAPEST_INSERTION except that the cost of insertion is
         based on the routing model cost function instead of arc costs only.
         
        LOCAL_CHEAPEST_COST_INSERTION = 16;
        See Also:
        Constant Field Values
      • GLOBAL_CHEAPEST_ARC_VALUE

        public static final int GLOBAL_CHEAPEST_ARC_VALUE
         --- Variable-based heuristics ---
         Iteratively connect two nodes which produce the cheapest route segment.
         
        GLOBAL_CHEAPEST_ARC = 1;
        See Also:
        Constant Field Values
      • LOCAL_CHEAPEST_ARC_VALUE

        public static final int LOCAL_CHEAPEST_ARC_VALUE
         Select the first node with an unbound successor and connect it to the
         node which produces the cheapest route segment.
         
        LOCAL_CHEAPEST_ARC = 2;
        See Also:
        Constant Field Values
      • FIRST_UNBOUND_MIN_VALUE_VALUE

        public static final int FIRST_UNBOUND_MIN_VALUE_VALUE
         Select the first node with an unbound successor and connect it to the
         first available node.
         This is equivalent to the CHOOSE_FIRST_UNBOUND strategy combined with
         ASSIGN_MIN_VALUE (cf. constraint_solver.h).
         
        FIRST_UNBOUND_MIN_VALUE = 12;
        See Also:
        Constant Field Values
    • Method Detail

      • values

        public static FirstSolutionStrategy.Value[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (FirstSolutionStrategy.Value c : FirstSolutionStrategy.Value.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static FirstSolutionStrategy.Value valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • getNumber

        public final int getNumber()
        Specified by:
        getNumber in interface com.google.protobuf.Internal.EnumLite
        Specified by:
        getNumber in interface com.google.protobuf.ProtocolMessageEnum
      • valueOf

        @Deprecated
        public static FirstSolutionStrategy.Value valueOf​(int value)
        Deprecated.
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        value - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • forNumber

        public static FirstSolutionStrategy.Value forNumber​(int value)
        Parameters:
        value - The numeric wire value of the corresponding enum entry.
        Returns:
        The enum associated with the given numeric wire value.
      • getValueDescriptor

        public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor()
        Specified by:
        getValueDescriptor in interface com.google.protobuf.ProtocolMessageEnum
      • getDescriptorForType

        public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType()
        Specified by:
        getDescriptorForType in interface com.google.protobuf.ProtocolMessageEnum
      • getDescriptor

        public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor()
      • valueOf

        public static FirstSolutionStrategy.Value valueOf​(com.google.protobuf.Descriptors.EnumValueDescriptor desc)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        desc - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null