Uses of Package
com.google.ortools.constraintsolver
Packages that use com.google.ortools.constraintsolver
-
Classes in com.google.ortools.constraintsolver used by com.google.ortools.constraintsolverClassDescriptionAcceptance strategy in which a solution is accepted only if it has less absences than the reference solution (see Slack Induction by String Removals for Vehicle Routing Problems" Christiaens and Vanden Berghe, Transportation Science 2020).Acceptance strategy in which a solution is accepted only if it has less absences than the reference solution (see Slack Induction by String Removals for Vehicle Routing Problems" Christiaens and Vanden Berghe, Transportation Science 2020).Determines when a candidate solution replaces another one.Determines when a candidate solution replaces another one.Acceptance strategy in which a solution is accepted only if all nodes are performed.Acceptance strategy in which a solution is accepted only if all nodes are performed.An Assignment is a variable -> domains mapping, used
to report solutions to the user.This is the base class for building an Lns operator.A BaseObject is the root of all reversibly allocated objects.
A DebugString method and the associated <invalid input: '<' operator are implemented
as a convenience.A structure meant to store soft bounds and associated violation constants.
It is 'Simple' because it has one BoundCost per element,
in contrast to 'Multiple'.Cast constraints are special channeling constraints designed
to keep a variable in sync with an expression.Defines operators which change the value of variables;
each neighbor corresponds to *one* modified variable.
Sub-classes have to define ModifyValue which determines what the new
variable value is going to be (given the current value and the variable).A constraint is the main modeling object.Solver parameters.Solver parameters.Internal parameters of the solver.Statistics on the search in the constraint solver.Statistics on the search in the constraint solver.The cooling schedule strategy defines how to compute the current simulated annealing temperature t given - the initial temperature t0 - the final temperature t1 - the current search progress 0 <= p <= 1 The value of t0 and t1 is defined by the initial_temperature and final_temperature in SimulatedAnnealingParameters, respectively.The cooling schedule strategy defines how to compute the current simulated annealing temperature t given - the initial temperature t0 - the final temperature t1 - the current search progress 0 <= p <= 1 The value of t0 and t1 is defined by the initial_temperature and final_temperature in SimulatedAnnealingParameters, respectively.Protobuf enumoperations_research.CoolingScheduleStrategy.ValueA Decision represents a choice point in the search tree.A DecisionBuilder is responsible for creating the search tree.A DecisionVisitor is used to inspect a decision.
It contains virtual methods for all type of 'declared' decisions.This struct holds all parameters for the default search.
DefaultPhaseParameters is only used by Solver::MakeDefaultPhase
methods.A Demon is the base element of a propagation queue.First solution strategies, used as starting point of local search.First solution strategies, used as starting point of local search.Protobuf enumoperations_research.FirstSolutionStrategy.ValueParameters used to configure global cheapest insertion heuristics.Parameters used to configure global cheapest insertion heuristics.Acceptance strategy in which only improving solutions are accepted.Acceptance strategy in which only improving solutions are accepted.Interval variables are often used in scheduling.The class IntExpr is the base of all integer expressions in
constraint programming.
It contains the basic protocol for an expression:
- setting and modifying its bound
- querying if it is bound
- listening to events modifying its bounds
- casting it into a variable (instance of IntVar)Represents a function that accepts two int-valued arguments and produces a long-valued result.The class IntVar is a subset of IntExpr.The class Iterator has two direct subclasses.Specialization of LocalSearchOperator built from an array of IntVars
which specifies the scope of the operator.
This class also takes care of storing current variable values in Start(),
keeps track of changes done by the operator and builds the delta.
The Deactivate() method can be used to perform Large Neighborhood Search.Specifies the behavior of a search based on ILS.Specifies the behavior of a search based on ILS.Parameters used to configure local cheapest insertion heuristics.Parameters used to configure local cheapest insertion heuristics.Properties used to select in which order nodes or node pairs are considered in insertion heuristics.In insertion-based heuristics, describes what positions must be considered when inserting a pickup/delivery pair, and in what order they are considered.Local Search Filters are used for fast neighbor pruning.
Filtering a move is done in several phases:
- in the Relax phase, filters determine which parts of their internals
will be changed by the candidate, and modify intermediary State
- in the Accept phase, filters check that the candidate is feasible,
- if the Accept phase succeeds, the solver may decide to trigger a
Synchronize phase that makes filters change their internal representation
to the last candidate,
- otherwise (Accept fails or the solver does not want to synchronize),
a Revert phase makes filters erase any intermediary State generated by the
Relax and Accept phases.
A given filter has phases called with the following pattern:
(Relax.Accept.Synchronize | Relax.Accept.Revert | Relax.Revert)*.
Filters's Revert() is always called in the reverse order their Accept() was
called, to allow late filters to use state done/undone by early filters'
Accept()/Revert().Filter manager: when a move is made, filters are executed to decide whether
the solution is feasible and compute parts of the new cost.Local search metaheuristics used to guide the search.Local search metaheuristics used to guide the search.Protobuf enumoperations_research.LocalSearchMetaheuristic.ValueThe base class for all local search operators.
A local search operator is an object that defines the neighborhood of a
solution.Statistics on local search.Statistics on local search.First solution statistics collected during search.First solution statistics collected during search.Statistics on local search filters called during the search.Statistics on local search filters called during the search.Statistics on local search operators called during the search.Statistics on local search operators called during the search.Represents an operation upon threelong-valued operands and producing along-valued result.Represents a predicate (boolean-valued function) uppon threelong-valued operands.Implements a complete cache for model elements: expressions and
constraints.Model visitor.Acceptance strategy in which a solution is accepted only if it performs at least one more node than the reference solution.Acceptance strategy in which a solution is accepted only if it performs at least one more node than the reference solution.This class encapsulates an objective.Defines how a reference solution is perturbed.Defines how a reference solution is perturbed.Protobuf enumoperations_research.PerturbationStrategy.ValueNOLINT
The PropagationBaseObject is a subclass of BaseObject that is also
friend to the Solver class.Ruin strategy that removes a number of nodes by performing a random walk on the underlying routing solution.Ruin strategy that removes a number of nodes by performing a random walk on the underlying routing solution.Parameters to customize a recreate strategy.Parameters to customize a recreate strategy.Strategy defining how a solution is recreated.Strategy defining how a solution is recreated.Usual limit based on wall_time, number of explored branches and
number of failures in the search treeA search limit The default values for int64 fields is the maxima value, i.e., 2^63-1A search limit The default values for int64 fields is the maxima value, i.e., 2^63-1This class adds reversibility to a POD type.
It contains the stamp optimization. i.e. the SaveValue call is done
only once per node of the search tree.This class adds reversibility to a POD type.
It contains the stamp optimization. i.e. the SaveValue call is done
only once per node of the search tree.This class adds reversibility to a POD type.
It contains the stamp optimization. i.e. the SaveValue call is done
only once per node of the search tree.----- RevPartialSequence -----Dimensions represent quantities accumulated at nodes along the routes.Manager for any NodeIndex <-> variable index conversion.
The routing solver uses variable indices internally and through
its API.
These variable indices are tricky to manage directly because one Node can
correspond to a multitude of variables, depending on the number of times
they appear in the model, and if they're used as start and/or end points.
This class aims to simplify variable index usage, allowing users to use
NodeIndex instead.
Usage:
auto starts_ends = ...; /// These are NodeIndex. RoutingIndexManager manager(10, 4, starts_ends); // 10 nodes, 4 vehicles. RoutingModel model(manager);
Then, use 'manager.NodeToIndex(node)' whenever model requires a variable
index.
Note: the mapping between node indices and variables indices is subject to
change so no assumption should be made on it.The position of a node in the set of pickup and delivery pairs.A ResourceGroup defines a set of available Resources with attributes on
one or multiple dimensions.
For every ResourceGroup in the model, each (used) vehicle in the solution
which requires a resource (see NotifyVehicleRequiresResource()) from this
group must be assigned to exactly 1 resource, and each resource can in
turn be assigned to at most 1 vehicle requiring it.Attributes for a dimension.A Resource sets attributes (costs/constraints) for a set of dimensions.Class used to solve a secondary model within a first solution strategy.Struct used to store a variable value.Struct used to sort and store vehicles by their type.Parameters which have to be set when creating a RoutingModel.Parameters which have to be set when creating a RoutingModel.Routing model visitor.Parameters defining the search used to solve vehicle routing problems.Parameters defining the search used to solve vehicle routing problems.Parameters required for the improvement search limit.Parameters required for the improvement search limit.Local search neighborhood operators used to build a solutions neighborhood.Local search neighborhood operators used to build a solutions neighborhood.Underlying solver to use in dimension scheduling, respectively for continuous and mixed models.Used by `RoutingModel` to report the status of the search for a solution.Used by `RoutingModel` to report the status of the search for a solution.Protobuf enumoperations_research.RoutingSearchStatus.ValueThe ruin composition strategies specifies how ruin are selected at every ILS iteration.The ruin composition strategies specifies how ruin are selected at every ILS iteration.Protobuf enumoperations_research.RuinCompositionStrategy.ValueParameters to configure a perturbation based on a ruin and recreate approach.Parameters to configure a perturbation based on a ruin and recreate approach.Ruin strategies, used in perturbation based on ruin and recreate approaches.Ruin strategies, used in perturbation based on ruin and recreate approaches.Parameters used to configure savings heuristics.Parameters used to configure savings heuristics.Base class of all search limits.The base class of all search logs that periodically outputs information when
the search is running.A search monitor is a simple set of callbacks to monitor all search eventsSearch statistics.Search statistics.A sequence variable is a variable whose domain is a set of possible
orderings of the interval variables.The SequenceVarElement stores a partial representation of ranked
interval variables in the underlying sequence variable.
This representation consists of three vectors:
- the forward sequence.Acceptance strategy in which solutions are accepted with a probability that depends on its quality and on the current state of the search.Acceptance strategy in which solutions are accepted with a probability that depends on its quality and on the current state of the search.Ruin strategy based on the "Slack Induction by String Removals for Vehicle Routing Problems" by Jan Christiaens and Greet Vanden Berghe, Transportation Science 2020.Ruin strategy based on the "Slack Induction by String Removals for Vehicle Routing Problems" by Jan Christiaens and Greet Vanden Berghe, Transportation Science 2020.This class is the root class of all solution collectors.
It implements a basic query API to be used independently
of the collector used.This class is used to manage a pool of solutions.Solver Class.
A solver represents the main computation engine.This exceptions signal that a failure has been raised in the C++ world.Holds semantic information stating that the 'expression' has been
cast into 'variable' using the Var() method, and that
'maintainer' is responsible for maintaining the equality between
'variable' and 'expression'.Ruin strategy that removes a number of spatially close routes.Ruin strategy that removes a number of spatially close routes.Statistics on sub-solvers.Statistics on sub-solvers.A symmetry breaker is an object that will visit a decision and
create the 'symmetrical' decision in return.
Each symmetry breaker represents one class of symmetry.Checker for type incompatibilities.The following constraint ensures that incompatibilities and requirements
between types are respected.
It verifies both "hard" and "temporal" incompatibilities.
Two nodes with hard incompatible types cannot be served by the same vehicle
at all, while with a temporal incompatibility they can't be on the same
route at the same time.
The VisitTypePolicy of a node determines how visiting it impacts the type
count on the route.
For example, for
- three temporally incompatible types T1 T2 and T3
- 2 pairs of nodes a1/r1 and a2/r2 of type T1 and T2 respectively, with
- a1 and a2 of VisitTypePolicy TYPE_ADDED_TO_VEHICLE
- r1 and r2 of policy ADDED_TYPE_REMOVED_FROM_VEHICLE
- 3 nodes A, UV and AR of type T3, respectively with type policies
TYPE_ADDED_TO_VEHICLE, TYPE_ON_VEHICLE_UP_TO_VISIT and
TYPE_SIMULTANEOUSLY_ADDED_AND_REMOVED
the configurations
UV --> a1 --> r1 --> a2 --> r2, a1 --> r1 --> a2 --> r2 --> A and
a1 --> r1 --> AR --> a2 --> r2 are acceptable, whereas the configurations
a1 --> a2 --> r1 --> ..., or A --> a1 --> r1 --> ..., or
a1 --> r1 --> UV --> ... are not feasible.
It also verifies same-vehicle and temporal type requirements.
A node of type T_d with a same-vehicle requirement for type T_r needs to be
served by the same vehicle as a node of type T_r.
Temporal requirements, on the other hand, can take effect either when the
dependent type is being added to the route or when it's removed from it,
which is determined by the dependent node's VisitTypePolicy.
In the above example:
- If T3 is required on the same vehicle as T1, A, AR or UV must be on the
same vehicle as a1.
- If T2 is required when adding T1, a2 must be visited *before* a1, and if
r2 is also visited on the route, it must be *after* a1, i.e.Checker for type requirements.