Generated on: Thu Mar 29 07:46:58 PDT 2012 for custom file set
// doxy/ or-tools/ src/ constraint_solver/

operations_research Namespace Reference

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. More...


Classes

class  Queue
 namespace More...
struct  StateInfo
 StateMarker / StateInfo struct. More...
struct  StateMarker
struct  Trail
class  Search
 Search class. More...
class  Trace
 Trace. More...
struct  SolverParameters
 This struct holds all parameters for the Solver object. More...
struct  DefaultPhaseParameters
 This struct holds all parameters for the default search. More...
class  Solver
 Solver Class. More...
class  BaseObject
 Useful Search and Modeling Objects. More...
class  PropagationBaseObject
 The PropagationBaseObject is a subclass of BaseObject that is also friend to the Solver class. More...
class  Decision
 A Decision represents a choice point in the search tree. More...
class  DecisionVisitor
 A DecisionVisitor is used to inspect a decision. More...
class  DecisionBuilder
 A DecisionBuilder is responsible for creating the search tree. More...
class  Demon
 A Demon is the base element of a propagation queue. More...
class  Action
 An action is the base callback method. More...
class  ModelVisitor
 Model visitor. More...
class  Constraint
 A constraint is the main modeling object. More...
class  CastConstraint
 Cast constraints are special channeling constraints the goal of which is to keep a variable in sync with an expression. More...
class  SearchMonitor
 A search monitor is a simple set of callbacks to monitor all search events. More...
class  Rev
 This class adds reversibility to a POD type. More...
class  NumericalRev
 Subclass of Rev<T> which adds numerical operations. More...
class  RevArray
 Reversible array of POD types. More...
class  NumericalRevArray
 Subclass of RevArray<T> which adds numerical operations. More...
class  IntExpr
 The class IntExpr is the base of all integer expressions in constraint programming. More...
class  IntVarIterator
 The class Iterator has two direct subclasses. More...
class  IntVar
 The class IntVar is a subset of IntExpr. More...
class  SolutionCollector
 Solution Collectors. More...
class  OptimizeVar
 This class encapsulate an objective. More...
class  SearchLimit
 Search Limits. More...
class  NoGood
 NoGood Recorder. More...
class  NoGoodManager
 Base class of no good manager. More...
class  IntervalVar
 Interval Var. More...
class  SequenceVar
 SequenceVar. More...
class  AssignmentElement
 Assignments. More...
class  IntVarElement
 IntVarElement. More...
class  IntervalVarElement
 IntervalVarElement. More...
class  SequenceVarElement
 SequenceVarElement. More...
class  AssignmentContainer
 Assignment element container. More...
class  Assignment
 Assignment. More...
class  Pack
 Pack Constraint. More...
class  SolutionPool
 SolutionPool. More...
class  BaseIntExpr
 This is the base class for all expressions that are not variables. More...
class  SimpleRevFIFO
 utility classes More...
class  RevImmutableMultiMap
 Immutable Multi Map. More...
class  RevSwitch
 A reversible switch that can switch once from false to true. More...
class  SmallRevBitSet
 This class represents a small reversible bitset (size <= 64). More...
class  RevBitSet
 This class represents a reversible bitset. More...
class  RevBitMatrix
 Matrix version of the RevBitSet class. More...
class  CallMethod0
 Demon proxy to a method on the constraint with no arguments. More...
class  CallMethod1
 Demon proxy to a method on the constraint with one argument. More...
class  CallMethod2
 Demon proxy to a method on the constraint with two arguments. More...
class  DelayedCallMethod0
 Low-priority demon proxy to a method on the constraint with no arguments. More...
class  DelayedCallMethod1
 Low-priority demon proxy to a method on the constraint with one argument. More...
class  DelayedCallMethod2
 Low-priority demon proxy to a method on the constraint with two arguments. More...
class  LocalSearchOperator
 < !defined(SWIG) More...
class  IntVarLocalSearchOperator
 Base operator class for operators manipulating IntVars. More...
class  SequenceVarLocalSearchOperator
 SequenceVarLocalSearchOperator. More...
class  BaseLNS
 Base Large Neighborhood Search operator class. More...
class  ChangeValue
 ChangeValue Operators. More...
class  PathOperator
 Path-based Operators. More...
class  LocalSearchFilter
 Local Search Filters. More...
class  IntVarLocalSearchFilter
 IntVarLocalSearchFilter. More...
class  PropagationMonitor
 PropagationMonitor. More...
class  SymmetryBreaker
 A symmetry breaker is an object that will visit a decision and create the 'symmetrical' decision in return. More...
class  SearchLog
 Search Log. More...
class  ModelCache
 Implements a complete cache for model elements: expressions and constraints. More...
class  DependencyGraph
class  ArgumentHolder
 Argument Holder: useful when visiting a model. More...
class  ModelParser
 Model Parser. More...
class  DemonProfiler
 DemonProfiler manages the profiling of demons and allows access to gathered data. More...
struct  Arc
 Outgoing dependency from a node (destination, offset). More...
class  DependencyGraphNode
 A node in the dependency graph. More...
class  CPModelLoader
 CPModelLoader. More...
class  FindOneNeighbor
 Finds a neighbor of the assignment passed. More...
class  LocalSearchPhaseParameters
 Local Search Phase Parameters. More...
class  NoGoodTerm
 Base class for NoGood terms. More...
class  Dimension
 Dimension. More...
class  MakePairActiveOperator
 Pair-based neighborhood operators, designed to move nodes by pairs (pairs are static and given). More...
class  PairRelocateOperator
 Operator which moves a pair of nodes to another position. More...
class  RoutingCache
 Cached callbacks. More...
class  FastOnePathBuilder
 Decision builder building a solution with a single path without propagating. More...
class  AllUnperformed
 Decision builder to build a solution with all nodes inactive. More...
class  RoutingModel
class  SymmetryManager
 Symmetry Breaking. More...
struct  NaturalLess
 String comparator that compares strings naturally, even those including integer numbers. More...

Typedefs

typedef std::vector< ArcArcs
typedef hash_map< const
IntExpr *, MPVariable * > 
ExprTranslation
 Automatic Linearization.
typedef IndexedTask
< DisjunctiveTask > 
DisjunctiveIndexedTask
typedef IndexedTask
< CumulativeTask > 
CumulativeIndexedTask
typedef std::pair< int64, int64 > Arc
 Guided Local Search.

Enumerations

enum  VarTypes {
  UNSPECIFIED, DOMAIN_INT_VAR, BOOLEAN_VAR, CONST_VAR,
  VAR_ADD_CST, DOMAIN_INT_VAR_ADD_CST, VAR_TIMES_POS_CST, BOOLEAN_VAR_TIMES_POS_CST,
  CST_SUB_VAR, OPP_VAR, TRACE_VAR
}
 This enum is used internally to do dynamic typing on subclasses of integer variables. More...

Functions

void PathSet (int start, int end, int to, int *const tree)
int PathMin (const int *const tree, int index)
int PathMax (const int *const tree, int index)
template<class V, class E>
void IdToElementMap (AssignmentContainer< V, E > *container, hash_map< string, E * > *id_to_element_map)
template<class E, class P>
void LoadElement (const hash_map< string, E * > &id_to_element_map, const P &proto)
template<class Var, class Element, class Proto, class Container>
void RealLoad (const AssignmentProto &assignment_proto, Container *const container, int(AssignmentProto::*GetSize)() const, const Proto &(AssignmentProto::*GetElem)(int) const)
template<class Var, class Element, class Proto, class Container>
void RealSave (AssignmentProto *const assignment_proto, const Container &container, Proto *(AssignmentProto::*Add)())
template<class Container, class Element>
void RealDebugString (const Container &container, string *const out)
std::ostream & operator<< (std::ostream &out, const Assignment &assignment)
 NOLINT.
DemonProfilerBuildDemonProfiler (Solver *const solver)
 Forward Declarations and Profiling Support.
void DeleteDemonProfiler (DemonProfiler *const monitor)
void InstallDemonProfiler (DemonProfiler *const monitor)
 Exported Functions.
void RestoreBoolValue (IntVar *const var)
 namespace
void InternalSaveBooleanVarValue (Solver *const solver, IntVar *const var)
bool LocalOptimumReached (Search *const search)
 Utility methods to ensure the communication between local search and the search.
bool AcceptDelta (Search *const search, Assignment *delta, Assignment *deltadelta)
 Returns true if the search accepts the delta (actually checking this by calling AcceptDelta on the monitors of the search).
void AcceptNeighbor (Search *const search)
 Notifies the search that a neighbor has been accepted by local search.
ActionNewDomainIntVarCleaner ()
 namespace
PropagationMonitorBuildTrace (Solver *const s)
ModelCacheBuildModelCache (Solver *const solver)
 namespace
DependencyGraphBuildDependencyGraph (Solver *const solver)
void SetQueueCleanerOnFail (Solver *const solver, IntVar *const var)
PropagationMonitorBuildPrintTrace (Solver *const s)
std::ostream & operator<< (std::ostream &out, const Solver *const s)
 Useful Operators.
std::ostream & operator<< (std::ostream &out, const BaseObject *o)
 NOLINT.
int64 Zero ()
 Misc.
uint64 Hash1 (uint64 value)
 Reversible Hash Table.
uint64 Hash1 (uint32 value)
uint64 Hash1 (int64 value)
uint64 Hash1 (int value)
uint64 Hash1 (void *const ptr)
uint64 Hash1 (ConstIntArray *const values)
template<class T>
uint64 Hash1 (ConstPtrArray< T > *const ptrs)
bool GreaterThan (int64 x, int64 y)
int64 ComputeBranchRestart (int64 log)
 ImpactDecisionBuilder.
void RegisterDemon (Solver *const solver, Demon *const demon, DemonProfiler *const monitor)
 Exported Methods for Unit Tests.
void DemonProfilerAddFakeRun (DemonProfiler *const monitor, const Demon *const demon, int64 start_time, int64 end_time, bool is_fail)
void DemonProfilerExportInformation (DemonProfiler *const monitor, const Constraint *const constraint, int64 *const fails, int64 *const initial_propagation_runtime, int64 *const demon_invocations, int64 *const total_demon_runtime, int *const demon_count)
void DemonProfilerBeginInitialPropagation (DemonProfiler *const monitor, const Constraint *const constraint)
void DemonProfilerEndInitialPropagation (DemonProfiler *const monitor, const Constraint *const constraint)
void LinkVarExpr (Solver *const s, IntExpr *const expr, IntVar *const var)
 IntExprElement.
IntVarBuildDomainIntVar (Solver *const solver, std::vector< int64 > *values)
 IntExprElement.
IntExprBuildElement (Solver *const solver, ConstIntArray *values, IntVar *const index)
 Solver::MakeElement(int array, int var).
void ScanArray (IntVar *const *vars, int size, int *bound, int64 *amin, int64 *amax, int64 *min_max, int64 *max_min)
 Builders.
IntExprBuildMinArray (Solver *const s, IntVar *const *vars, int size)
IntExprBuildMaxArray (Solver *const s, IntVar *const *vars, int size)
IntExprBuildLogSplitArray (Solver *const s, IntVar *const *vars, int size, BuildOp op)
IntExprBuildLogSplitArray (Solver *const s, const std::vector< IntVar * > &vars, BuildOp op)
bool AreAllBooleans (const IntVar *const *vars, int size)
template<class T>
bool AreAllPositive (const T *const values, int size)
template<class T>
bool AreAllNull (const T *const values, int size)
template<class T>
bool AreAllBoundOrNull (const IntVar *const *vars, const T *const values, int size)
int64 SortBothChangeConstant (IntVar **const vars, int64 *const coefs, int *const size, bool keep_inside)
 This method will sort both vars and coefficients in increasing coefficient order.
template<class T>
ConstraintMakeScalProdEqualityFct (Solver *const solver, IntVar *const *vars, int size, T const *coefficients, int64 cst)
template<class T>
ConstraintMakeScalProdGreaterOrEqualFct (Solver *solver, IntVar *const *vars, int size, T const *coefficients, int64 cst)
template<class T>
ConstraintMakeScalProdLessOrEqualFct (Solver *solver, IntVar *const *vars, int size, T const *coefficients, int64 upper_bound)
template<class T>
IntExprMakeScalProdFct (Solver *solver, IntVar *const *vars, const T *const coefs, int size)
int64 * NewUniqueSortedArray (const int64 *const values, int *size)
bool IsArrayActuallySorted (const int64 *const values, int size)
int64 PosIntDivUp (int64 e, int64 v)
 Utility functions.
int64 PosIntDivDown (int64 e, int64 v)
void SetPosPosMinExpr (IntExpr *const left, IntExpr *const right, int64 m)
 Utilities for product expression.
void SetPosPosMaxExpr (IntExpr *const left, IntExpr *const right, int64 m)
 Propagates set_max on left * right, left and right >= 0.
void SetPosGenMinExpr (IntExpr *const left, IntExpr *const right, int64 m)
 Propagates set_min on left * right, left >= 0, right across 0.
void SetGenGenMinExpr (IntExpr *const left, IntExpr *const right, int64 m)
 Propagates set_min on left * right, left and right across 0.
void TimesSetMin (IntExpr *const left, IntExpr *const right, IntExpr *const minus_left, IntExpr *const minus_right, int m)
string IndexedName (const string &prefix, int index, int max_index)
MPSolver::OptimizationProblemType GetType (bool use_clp)
template<class T>
void MakeCallbackFromProto (CPModelLoader *const builder, const CPExtensionProto &proto, int tag_index, ResultCallback1< T, int64 > **callback)
IntExprBuildAbs (CPModelLoader *const builder, const CPIntegerExpressionProto &proto)
 kAbs
ConstraintBuildAllDifferent (CPModelLoader *const builder, const CPConstraintProto &proto)
 kAllDifferent
ConstraintBuildAllowedAssignments (CPModelLoader *const builder, const CPConstraintProto &proto)
 kAllowedAssignments
ConstraintBuildBetween (CPModelLoader *const builder, const CPConstraintProto &proto)
 kBetween
IntExprBuildConvexPiecewise (CPModelLoader *const builder, const CPIntegerExpressionProto &proto)
 kConvexPiecewise
ConstraintBuildCountEqual (CPModelLoader *const builder, const CPConstraintProto &proto)
 kCountEqual
ConstraintBuildCumulative (CPModelLoader *const builder, const CPConstraintProto &proto)
 kCumulative
ConstraintBuildDeviation (CPModelLoader *const builder, const CPConstraintProto &proto)
 kDeviation
IntExprBuildDifference (CPModelLoader *const builder, const CPIntegerExpressionProto &proto)
 kDifference
ConstraintBuildDisjunctive (CPModelLoader *const builder, const CPConstraintProto &proto)
 kDisjunctive
ConstraintBuildDistribute (CPModelLoader *const builder, const CPConstraintProto &proto)
 kDistribute
IntExprBuildDivide (CPModelLoader *const builder, const CPIntegerExpressionProto &proto)
 kDivide
IntExprBuildDurationExpr (CPModelLoader *const builder, const CPIntegerExpressionProto &proto)
 kDurationExpr
IntExprBuildElement (CPModelLoader *const builder, const CPIntegerExpressionProto &proto)
 kElement
IntExprBuildEndExpr (CPModelLoader *const builder, const CPIntegerExpressionProto &proto)
 kElementEqual
ConstraintBuildEquality (CPModelLoader *const builder, const CPConstraintProto &proto)
 kEquality
ConstraintBuildFalseConstraint (CPModelLoader *const builder, const CPConstraintProto &proto)
 kFalseConstraint
ConstraintBuildGreater (CPModelLoader *const builder, const CPConstraintProto &proto)
 kGreater
ConstraintBuildGreaterOrEqual (CPModelLoader *const builder, const CPConstraintProto &proto)
 kGreaterOrEqual
IntExprBuildIntegerVariable (CPModelLoader *const builder, const CPIntegerExpressionProto &proto)
 kIntegerVariable
ConstraintBuildIntervalBinaryRelation (CPModelLoader *const builder, const CPConstraintProto &proto)
 kIntervalBinaryRelation
ConstraintBuildIntervalDisjunction (CPModelLoader *const builder, const CPConstraintProto &proto)
 kIntervalDisjunction
ConstraintBuildIntervalUnaryRelation (CPModelLoader *const builder, const CPConstraintProto &proto)
 kIntervalUnaryRelation
IntervalVarBuildIntervalVariable (CPModelLoader *const builder, const CPIntervalVariableProto &proto)
 kIntervalVariable
ConstraintBuildIsBetween (CPModelLoader *const builder, const CPConstraintProto &proto)
 kIsBetween
ConstraintBuildIsDifferent (CPModelLoader *const builder, const CPConstraintProto &proto)
 kIsDifferent
ConstraintBuildIsEqual (CPModelLoader *const builder, const CPConstraintProto &proto)
 kIsEqual
ConstraintBuildIsGreaterOrEqual (CPModelLoader *const builder, const CPConstraintProto &proto)
 kIsGreaterOrEqual
ConstraintBuildIsLessOrEqual (CPModelLoader *const builder, const CPConstraintProto &proto)
 kIsLessOrEqual
ConstraintBuildIsMember (CPModelLoader *const builder, const CPConstraintProto &proto)
 kIsMember
ConstraintBuildLess (CPModelLoader *const builder, const CPConstraintProto &proto)
 kLess
ConstraintBuildLessOrEqual (CPModelLoader *const builder, const CPConstraintProto &proto)
 kLessOrEqual
ConstraintBuildMapDomain (CPModelLoader *const builder, const CPConstraintProto &proto)
 kMapDomain
IntExprBuildMax (CPModelLoader *const builder, const CPIntegerExpressionProto &proto)
 kMax
ConstraintBuildMember (CPModelLoader *const builder, const CPConstraintProto &proto)
 kMaxEqual
IntExprBuildMin (CPModelLoader *const builder, const CPIntegerExpressionProto &proto)
 kMin
ConstraintBuildNoCycle (CPModelLoader *const builder, const CPConstraintProto &proto)
 kMinEqual
ConstraintBuildNonEqual (CPModelLoader *const builder, const CPConstraintProto &proto)
 kNonEqual
IntExprBuildOpposite (CPModelLoader *const builder, const CPIntegerExpressionProto &proto)
 kOpposite
bool AddUsageLessConstantDimension (Pack *const pack, CPModelLoader *const builder, const CPExtensionProto &proto)
 kPack
bool AddCountAssignedItemsDimension (Pack *const pack, CPModelLoader *const builder, const CPExtensionProto &proto)
bool AddCountUsedBinDimension (Pack *const pack, CPModelLoader *const builder, const CPExtensionProto &proto)
bool AddUsageEqualVariableDimension (Pack *const pack, CPModelLoader *const builder, const CPExtensionProto &proto)
bool AddVariableUsageLessConstantDimension (Pack *const pack, CPModelLoader *const builder, const CPExtensionProto &proto)
bool AddWeightedSumOfAssignedDimension (Pack *const pack, CPModelLoader *const builder, const CPExtensionProto &proto)
ConstraintBuildPack (CPModelLoader *const builder, const CPConstraintProto &proto)
ConstraintBuildPathCumul (CPModelLoader *const builder, const CPConstraintProto &proto)
 kPathCumul
IntExprBuildPerformedExpr (CPModelLoader *const builder, const CPIntegerExpressionProto &proto)
 kPerformedExpr
IntExprBuildProduct (CPModelLoader *const builder, const CPIntegerExpressionProto &proto)
 kProduct
IntExprBuildScalProd (CPModelLoader *const builder, const CPIntegerExpressionProto &proto)
 kScalProd
ConstraintBuildScalProdEqual (CPModelLoader *const builder, const CPConstraintProto &proto)
 kScalProdEqual
ConstraintBuildScalProdGreaterOrEqual (CPModelLoader *const builder, const CPConstraintProto &proto)
 kScalProdGreaterOrEqual
ConstraintBuildScalProdLessOrEqual (CPModelLoader *const builder, const CPConstraintProto &proto)
 kScalProdLessOrEqual
IntExprBuildSemiContinuous (CPModelLoader *const builder, const CPIntegerExpressionProto &proto)
 kSemiContinuous
SequenceVarBuildSequenceVariable (CPModelLoader *const builder, const CPSequenceVariableProto &proto)
 kSequenceVariable
IntExprBuildSquare (CPModelLoader *const builder, const CPIntegerExpressionProto &proto)
 kSquare
IntExprBuildStartExpr (CPModelLoader *const builder, const CPIntegerExpressionProto &proto)
 kStartExpr
IntExprBuildSum (CPModelLoader *const builder, const CPIntegerExpressionProto &proto)
 kSum
ConstraintBuildSumEqual (CPModelLoader *const builder, const CPConstraintProto &proto)
 kSumEqual
ConstraintBuildSumGreaterOrEqual (CPModelLoader *const builder, const CPConstraintProto &proto)
 kSumGreaterOrEqual
ConstraintBuildSumLessOrEqual (CPModelLoader *const builder, const CPConstraintProto &proto)
 kSumLessOrEqual
ConstraintBuildTransition (CPModelLoader *const builder, const CPConstraintProto &proto)
 kTransition
ConstraintBuildTrueConstraint (CPModelLoader *const builder, const CPConstraintProto &proto)
 kTrueConstraint
int64 CompoundOperatorNoRestart (int size, int active_index, int operator_index)
int64 CompoundOperatorRestart (int active_index, int operator_index)
LSOperation * OperationFromEnum (Solver::LocalSearchOperation op_enum)
 Local search filter factory.
template<class T>
bool IsEqual (const T &a1, const T &a2)
 Helpers.
bool IsEqual (const ConstIntArray *&a1, const ConstIntArray *&a2)
template<class T>
bool IsEqual (ConstPtrArray< T > *const a1, ConstPtrArray< T > *const a2)
template<class A1, class A2>
uint64 Hash2 (const A1 &a1, const A2 &a2)
template<class A1, class A2, class A3>
uint64 Hash3 (const A1 &a1, const A2 &a2, const A3 &a3)
template<class A1, class A2, class A3, class A4>
uint64 Hash4 (const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4)
template<class C>
void Double (C ***array_ptr, int *size_ptr)
int SortIndexByWeight (int64 *const indices, const int64 *const weights, int size)
template<class Task>
bool StartMinLessThan (const IndexedTask< Task > *const w1, const IndexedTask< Task > *const w2)
 Comparison methods, used by the STL sort.
template<class Task>
bool EndMaxLessThan (const IndexedTask< Task > *const w1, const IndexedTask< Task > *const w2)
template<class Task>
bool StartMaxLessThan (const IndexedTask< Task > *const w1, const IndexedTask< Task > *const w2)
template<class Task>
bool EndMinLessThan (const IndexedTask< Task > *const w1, const IndexedTask< Task > *const w2)
template<typename T, typename Compare>
void Sort (std::vector< T > *vector, Compare compare)
bool TaskStartMinLessThan (const CumulativeTask *const task1, const CumulativeTask *const task2)
CumulativeTask * MakeTask (Solver *solver, IntervalVar *interval, int64 demand)
 Cumulative.
int64 SafeProduct (int64 a, int64 b)
 Returns min(a * b, kint64max). a is positive.
bool TimeLessThan (const ProfileDelta &delta1, const ProfileDelta &delta2)
LocalSearchOperatorMakePairActive (Solver *const solver, const IntVar *const *vars, const IntVar *const *secondary_vars, const RoutingModel::NodePairs &pairs, int size)
LocalSearchOperatorMakePairRelocate (Solver *const solver, const IntVar *const *vars, const IntVar *const *secondary_vars, const RoutingModel::NodePairs &pairs, int size)
int64 CostFunction (int64 **eval, int64 i, int64 j)
 Evaluators.
Solver::DecisionModification LeftDive (Solver *const s)
 Left-branch dive branch selector.
 DEFINE_INT_TYPE (_RoutingModel_NodeIndex, int)
 The type must be defined outside the class RoutingModel, SWIG does not parse it correctly if it's inside.
int64 NextLuby (int i)
 Luby Strategy.
bool HasCompactDomains (const IntVar *const *vars, int arity)
bool CompareStringsUsingNaturalLess (const string &s1, const string &s2)
string TreeMonitorStripSpecialCharacters (string attribute)
 namespace
template<class T>
DemonMakeConstraintDemon0 (Solver *const s, T *const ct, void(T::*method)(), const string &name)
template<class T, class P>
DemonMakeConstraintDemon1 (Solver *const s, T *const ct, void(T::*method)(P), const string &name, P param1)
template<class T, class P, class Q>
DemonMakeConstraintDemon2 (Solver *const s, T *const ct, void(T::*method)(P, Q), const string &name, P param1, Q param2)
template<class T>
DemonMakeDelayedConstraintDemon0 (Solver *const s, T *const ct, void(T::*method)(), const string &name)
template<class T, class P>
DemonMakeDelayedConstraintDemon1 (Solver *const s, T *const ct, void(T::*method)(P), const string &name, P param1)
template<class T, class P, class Q>
DemonMakeDelayedConstraintDemon2 (Solver *const s, T *const ct, void(T::*method)(P, Q), const string &name, P param1, Q param2)

Variables

static const int kUnboundBooleanVarValue = 2
 Boolean variable.
static const int kModelVersion = 1
 Second Pass Visitor.
static const int kUnassigned = -1
 namespace
static const int64 kNoPenalty = -1
static const int kBitsInUint64 = 64
const char * kUnaryNames []
const char * kBinaryNames []
const char * kConfigXml


Detailed Description

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.

ModelStatisticsVisitor.

activity a before activity b or activity b before activity a

interval <binary relation>=""> interval

Constant Restart.

Restart.

NestedOptimize.

SolveOnce.

A limit whose Check function is the OR of two underlying limits.

Simulated Annealing.

Metaheuristics.

All Solution Collector.

Best Solution Collector.

Last Solution Collector.

AssignAllVariablesFromAssignment decision builder.

AssignAllVariables.

AssignVariablesValues decision.

AssignOneVariableValue decision.

AssignOneVariableValueOrFail decision.

Variable Assignments.

Try Decision Builder.

namespace

Composite Decision Builder.

DiffVar.

RangeGreater.

RangeLess.

RangeGreaterOrEqual.

RangeLessOrEqual.

Dimension.

Objective filter Assignment is accepted if it improves the best objective value found so far.

Concatenation of operators.

Increments the current value of variables.

Move Toward Target Local Search operator.

An IntervalVar that passes all function calls to an underlying interval variable as long as it is not prohibited, and that interprets prohibited intervals as intervals of duration 0 that must be executed between [kMinValidValue and kMaxValidValue].

Int Var and associated methods.

IsMemberCt.

Member.

is_between_cst Constraint

BetweenCt.

is_lesser_equal_cst Constraint

is_greater_equal_cst Constraint

is_diff_cst Constraint

is_equal_cst Constraint

Different constraints.

Less or equal constraint.

Greater or equal constraint.

Specialized cases.

Generalized element.

IntIntExprFunctionElement.

IntExprFunctionElement.

Distribute.

CountValueEq.

Path cumul constraint.

No cycle.

Map Variable Domain to Boolean Var Array.

True and False Constraint.

Solver class.

Trail and Reversibility.

WINDOWS.

Storing and Restoring assignments.

You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

AllDifferent constraints

You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

These magic numbers are there to make sure we pop the correct sentinels throughout the search.

Todo:
TODO(user) : optimize constraint to avoid ping pong. After a boolvar is set to 0, we remove the value from the var. There is no need to rescan the var to find the hole if the size at the end of UpdateActive() is the same as the size at the beginning of VarDomain().
This constraint ensures there are no cycles in the variable/value graph. "Sink" values are values outside the range of the array of variables; they are used to end paths. The constraint does essentially two things:

You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Count constraints

|{i | var[i] == value}| == count

IntExprArrayElementCt This constraint implements vars[index] == var. It is delayed such that propagation only occurs when all variables have been touched.

You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Array Expression constraints

Member(IntVar, IntSet)

Such interval variables have a very similar behavior to others. Invariants such as StartMin() + DurationMin() <= EndMin() that are maintained for traditional interval variables are maintained for instances of AlwaysPerformedIntervalVarWrapper. However, there is no monotonicity of the values returned by the start/end getters. For example, during a given propagation, three successive calls to StartMin could return, in this order, 1, 2, and kMinValidValue.

A local search operator that compares the current assignment with a target one, and that generates neighbors corresponding to a single variable being changed from its current value to its target value.

'Values' callback takes an index of a variable and its value and returns the contribution into the objective value. The type of objective function is determined by LocalSearchOperation enum. Conditions on neighbor acceptance are presented in LocalSearchFilterBound enum. Objective function can be represented by any variable.

You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Packing constraints

Class Dimension Less Than Constant

You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Range constraints

You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. The vehicle routing library lets one model and solve generic vehicle routing problems ranging from the Traveling Salesman Problem to more complex problems such as the Capacitated Vehicle Routing Problem with Time Windows. The objective of a vehicle routing problem is to build routes covering a set of nodes minimizing the overall cost of the routes (usually proportional to the sum of the lengths of each segment of the routes) while respecting some problem-specific constraints (such as the length of a route). A route is equivalent to a path connecting nodes, starting/ending at specific starting/ending nodes. The term "vehicle routing" is historical and the category of problems solved is not limited to the routing of vehicles: any problem involving finding routes visiting a given number of nodes optimally falls under this category of problems, such as finding the optimal sequence in a playlist. The literature around vehicle routing problems is extremelly dense but one can find some basic introductions in the following links: http://en.wikipedia.org/wiki/Travelling_salesman_problem http://www.tsp.gatech.edu/history/index.html http://en.wikipedia.org/wiki/Vehicle_routing_problem

The vehicle routing library is a vertical layer above the constraint programming library (constraint_programming:cp). One has access to all underlying constrained variables of the vehicle routing model which can therefore be enriched by adding any constraint available in the constraint programming library. There are two sets of variables available:

Advanced tips: Flags are available to tune the search used to solve routing problems. Here is a quick overview of the ones one might want to modify:

Code sample: Here is a simple example solving a traveling salesman problem given a cost function callback (returns the cost of a route segment):

int64 MyDistance(RoutingModel::NodeIndex from, RoutingModel::NodeIndex to) { return (from + to).value(); }

RoutingModel routing(...number of nodes..., 1);

routing.SetCost(NewPermanentCallback(MyDistance));

const Assignment* solution = routing.Solve(); CHECK(solution != NULL);

LG << "Cost " << solution->ObjectiveValue(); const int route_number = 0; for (int64 node = routing.Start(route_number); !routing.IsEnd(node); node = solution->Value(routing.NextVar(node))) { LG << routing.IndexToNode(node); }

More information on the usage of the routing library can be found here: More information on the range of vehicle routing problems the library can tackle can be found here: Keywords: Vehicle Routing, Traveling Salesman Problem, TSP, VRP, CVRPTW, PDP.

Compose Decision Builder

BaseAssignmentSelector

Collect last solution, useful when optimizing

collect all solutions


Typedef Documentation

typedef std::pair<int64, int64> operations_research::Arc

Guided Local Search.

Definition at line 3036 of file search.cc.

typedef std::vector<Arc> operations_research::Arcs

Definition at line 35 of file dependency_graph.cc.

typedef IndexedTask<CumulativeTask> operations_research::CumulativeIndexedTask [static]

Definition at line 148 of file resource.cc.

typedef IndexedTask<DisjunctiveTask> operations_research::DisjunctiveIndexedTask [static]

Definition at line 147 of file resource.cc.

typedef hash_map<const IntExpr*, MPVariable*> operations_research::ExprTranslation [static]

Automatic Linearization.

Useful typedefs

Definition at line 123 of file hybrid.cc.


Enumeration Type Documentation

This enum is used internally to do dynamic typing on subclasses of integer variables.

Enumerator:
UNSPECIFIED 
DOMAIN_INT_VAR 
BOOLEAN_VAR 
CONST_VAR 
VAR_ADD_CST 
DOMAIN_INT_VAR_ADD_CST 
VAR_TIMES_POS_CST 
BOOLEAN_VAR_TIMES_POS_CST 
CST_SUB_VAR 
OPP_VAR 
TRACE_VAR 

Definition at line 125 of file constraint_solveri.h.


Function Documentation

bool operations_research::AcceptDelta ( Search *const   search,
Assignment *  delta,
Assignment *  deltadelta 
)

Returns true if the search accepts the delta (actually checking this by calling AcceptDelta on the monitors of the search).

Definition at line 1314 of file constraint_solver.cc.

void operations_research::AcceptNeighbor ( Search *const   search  ) 

Notifies the search that a neighbor has been accepted by local search.

Definition at line 1320 of file constraint_solver.cc.

bool operations_research::@18::AddCountAssignedItemsDimension ( Pack *const   pack,
CPModelLoader *const   builder,
const CPExtensionProto &  proto 
) [static]

Definition at line 1846 of file io.cc.

bool operations_research::@18::AddCountUsedBinDimension ( Pack *const   pack,
CPModelLoader *const   builder,
const CPExtensionProto &  proto 
) [static]

Definition at line 1855 of file io.cc.

bool operations_research::@18::AddUsageEqualVariableDimension ( Pack *const   pack,
CPModelLoader *const   builder,
const CPExtensionProto &  proto 
) [static]

Definition at line 1864 of file io.cc.

bool operations_research::@18::AddUsageLessConstantDimension ( Pack *const   pack,
CPModelLoader *const   builder,
const CPExtensionProto &  proto 
) [static]

kPack

Definition at line 1833 of file io.cc.

bool operations_research::@18::AddVariableUsageLessConstantDimension ( Pack *const   pack,
CPModelLoader *const   builder,
const CPExtensionProto &  proto 
) [static]

Definition at line 1877 of file io.cc.

bool operations_research::@18::AddWeightedSumOfAssignedDimension ( Pack *const   pack,
CPModelLoader *const   builder,
const CPExtensionProto &  proto 
) [static]

Definition at line 1888 of file io.cc.

bool operations_research::@13::AreAllBooleans ( const IntVar *const *  vars,
int  size 
) [static]

Definition at line 1429 of file expr_array.cc.

template<class T>
bool operations_research::@13::AreAllBoundOrNull ( const IntVar *const *  vars,
const T *const   values,
int  size 
) [inline, static]

Definition at line 1457 of file expr_array.cc.

template<class T>
bool operations_research::@13::AreAllNull ( const T *const   values,
int  size 
) [inline, static]

Definition at line 1448 of file expr_array.cc.

template<class T>
bool operations_research::@13::AreAllPositive ( const T *const   values,
int  size 
) [inline, static]

Definition at line 1439 of file expr_array.cc.

IntExpr* operations_research::@18::BuildAbs ( CPModelLoader *const   builder,
const CPIntegerExpressionProto &  proto 
) [static]

kAbs

Definition at line 1032 of file io.cc.

Constraint* operations_research::@18::BuildAllDifferent ( CPModelLoader *const   builder,
const CPConstraintProto &  proto 
) [static]

kAllDifferent

Definition at line 1043 of file io.cc.

Constraint* operations_research::@18::BuildAllowedAssignments ( CPModelLoader *const   builder,
const CPConstraintProto &  proto 
) [static]

kAllowedAssignments

Definition at line 1054 of file io.cc.

Constraint* operations_research::@18::BuildBetween ( CPModelLoader *const   builder,
const CPConstraintProto &  proto 
) [static]

kBetween

Definition at line 1067 of file io.cc.

IntExpr* operations_research::@18::BuildConvexPiecewise ( CPModelLoader *const   builder,
const CPIntegerExpressionProto &  proto 
) [static]

kConvexPiecewise

Definition at line 1081 of file io.cc.

Constraint* operations_research::@18::BuildCountEqual ( CPModelLoader *const   builder,
const CPConstraintProto &  proto 
) [static]

kCountEqual

Definition at line 1112 of file io.cc.

Constraint* operations_research::@18::BuildCumulative ( CPModelLoader *const   builder,
const CPConstraintProto &  proto 
) [static]

kCumulative

Definition at line 1132 of file io.cc.

DemonProfiler * operations_research::BuildDemonProfiler ( Solver *const   solver  ) 

Forward Declarations and Profiling Support.

Definition at line 439 of file demon_profiler.cc.

DependencyGraph * operations_research::BuildDependencyGraph ( Solver *const   solver  ) 

Definition at line 335 of file dependency_graph.cc.

Constraint* operations_research::@18::BuildDeviation ( CPModelLoader *const   builder,
const CPConstraintProto &  proto 
) [static]

kDeviation

Definition at line 1155 of file io.cc.

IntExpr* operations_research::@18::BuildDifference ( CPModelLoader *const   builder,
const CPIntegerExpressionProto &  proto 
) [static]

kDifference

Definition at line 1168 of file io.cc.

Constraint* operations_research::@18::BuildDisjunctive ( CPModelLoader *const   builder,
const CPConstraintProto &  proto 
) [static]

kDisjunctive

Definition at line 1186 of file io.cc.

Constraint* operations_research::@18::BuildDistribute ( CPModelLoader *const   builder,
const CPConstraintProto &  proto 
) [static]

kDistribute

Definition at line 1197 of file io.cc.

IntExpr* operations_research::@18::BuildDivide ( CPModelLoader *const   builder,
const CPIntegerExpressionProto &  proto 
) [static]

kDivide

Definition at line 1238 of file io.cc.

IntVar* operations_research::@12::BuildDomainIntVar ( Solver *const   solver,
std::vector< int64 > *  values 
) [static]

IntExprElement.

IntExpr* operations_research::@18::BuildDurationExpr ( CPModelLoader *const   builder,
const CPIntegerExpressionProto &  proto 
) [static]

kDurationExpr

Definition at line 1251 of file io.cc.

IntExpr* operations_research::@18::BuildElement ( CPModelLoader *const   builder,
const CPIntegerExpressionProto &  proto 
) [static]

kElement

Definition at line 1260 of file io.cc.

IntExpr* operations_research::@12::BuildElement ( Solver *const   solver,
ConstIntArray *  values,
IntVar *const   index 
) [static]

Solver::MakeElement(int array, int var).

Definition at line 470 of file element.cc.

IntExpr* operations_research::@18::BuildEndExpr ( CPModelLoader *const   builder,
const CPIntegerExpressionProto &  proto 
) [static]

kElementEqual

Todo:
TODO(user): Add API on solver and uncomment this method.
kEndExpr

Definition at line 1321 of file io.cc.

Constraint* operations_research::@18::BuildEquality ( CPModelLoader *const   builder,
const CPConstraintProto &  proto 
) [static]

kEquality

Definition at line 1330 of file io.cc.

Constraint* operations_research::@18::BuildFalseConstraint ( CPModelLoader *const   builder,
const CPConstraintProto &  proto 
) [static]

kFalseConstraint

Definition at line 1349 of file io.cc.

Constraint* operations_research::@18::BuildGreater ( CPModelLoader *const   builder,
const CPConstraintProto &  proto 
) [static]

kGreater

Definition at line 1356 of file io.cc.

Constraint* operations_research::@18::BuildGreaterOrEqual ( CPModelLoader *const   builder,
const CPConstraintProto &  proto 
) [static]

kGreaterOrEqual

Definition at line 1367 of file io.cc.

IntExpr* operations_research::@18::BuildIntegerVariable ( CPModelLoader *const   builder,
const CPIntegerExpressionProto &  proto 
) [static]

kIntegerVariable

Definition at line 1386 of file io.cc.

Constraint* operations_research::@18::BuildIntervalBinaryRelation ( CPModelLoader *const   builder,
const CPConstraintProto &  proto 
) [static]

kIntervalBinaryRelation

Definition at line 1445 of file io.cc.

Constraint* operations_research::@18::BuildIntervalDisjunction ( CPModelLoader *const   builder,
const CPConstraintProto &  proto 
) [static]

kIntervalDisjunction

Definition at line 1462 of file io.cc.

Constraint* operations_research::@18::BuildIntervalUnaryRelation ( CPModelLoader *const   builder,
const CPConstraintProto &  proto 
) [static]

kIntervalUnaryRelation

Definition at line 1475 of file io.cc.

IntervalVar* operations_research::@18::BuildIntervalVariable ( CPModelLoader *const   builder,
const CPIntervalVariableProto &  proto 
) [static]

kIntervalVariable

Definition at line 1494 of file io.cc.

Constraint* operations_research::@18::BuildIsBetween ( CPModelLoader *const   builder,
const CPConstraintProto &  proto 
) [static]

kIsBetween

Definition at line 1560 of file io.cc.

Constraint* operations_research::@18::BuildIsDifferent ( CPModelLoader *const   builder,
const CPConstraintProto &  proto 
) [static]

kIsDifferent

Definition at line 1579 of file io.cc.

Constraint* operations_research::@18::BuildIsEqual ( CPModelLoader *const   builder,
const CPConstraintProto &  proto 
) [static]

kIsEqual

Definition at line 1596 of file io.cc.

Constraint* operations_research::@18::BuildIsGreaterOrEqual ( CPModelLoader *const   builder,
const CPConstraintProto &  proto 
) [static]

kIsGreaterOrEqual

Definition at line 1612 of file io.cc.

Constraint* operations_research::@18::BuildIsLessOrEqual ( CPModelLoader *const   builder,
const CPConstraintProto &  proto 
) [static]

kIsLessOrEqual

Definition at line 1628 of file io.cc.

Constraint* operations_research::@18::BuildIsMember ( CPModelLoader *const   builder,
const CPConstraintProto &  proto 
) [static]

kIsMember

Definition at line 1645 of file io.cc.

Constraint* operations_research::@18::BuildLess ( CPModelLoader *const   builder,
const CPConstraintProto &  proto 
) [static]

kLess

Definition at line 1659 of file io.cc.

Constraint* operations_research::@18::BuildLessOrEqual ( CPModelLoader *const   builder,
const CPConstraintProto &  proto 
) [static]

kLessOrEqual

Definition at line 1670 of file io.cc.

IntExpr* operations_research::@13::BuildLogSplitArray ( Solver *const   s,
const std::vector< IntVar * > &  vars,
BuildOp  op 
) [static]

Definition at line 1379 of file expr_array.cc.

IntExpr* operations_research::@13::BuildLogSplitArray ( Solver *const   s,
IntVar *const *  vars,
int  size,
BuildOp  op 
) [static]

Definition at line 1323 of file expr_array.cc.

Constraint* operations_research::@18::BuildMapDomain ( CPModelLoader *const   builder,
const CPConstraintProto &  proto 
) [static]

kMapDomain

Definition at line 1689 of file io.cc.

IntExpr* operations_research::@18::BuildMax ( CPModelLoader *const   builder,
const CPIntegerExpressionProto &  proto 
) [static]

kMax

Definition at line 1700 of file io.cc.

IntExpr* operations_research::@13::BuildMaxArray ( Solver *const   s,
IntVar *const *  vars,
int  size 
) [static]

Definition at line 1308 of file expr_array.cc.

Constraint* operations_research::@18::BuildMember ( CPModelLoader *const   builder,
const CPConstraintProto &  proto 
) [static]

kMaxEqual

Todo:
TODO(user): Add API on solver and uncomment this method.
kMember

Definition at line 1740 of file io.cc.

IntExpr* operations_research::@18::BuildMin ( CPModelLoader *const   builder,
const CPIntegerExpressionProto &  proto 
) [static]

kMin

Definition at line 1753 of file io.cc.

IntExpr* operations_research::@13::BuildMinArray ( Solver *const   s,
IntVar *const *  vars,
int  size 
) [static]

Definition at line 1295 of file expr_array.cc.

ModelCache * operations_research::BuildModelCache ( Solver *const   solver  ) 

namespace

Definition at line 697 of file model_cache.cc.

Constraint* operations_research::@18::BuildNoCycle ( CPModelLoader *const   builder,
const CPConstraintProto &  proto 
) [static]

kMinEqual

Todo:
TODO(user): Add API on solver and implement this method.
kNoCycle

Definition at line 1778 of file io.cc.

Constraint* operations_research::@18::BuildNonEqual ( CPModelLoader *const   builder,
const CPConstraintProto &  proto 
) [static]

kNonEqual

Definition at line 1803 of file io.cc.

IntExpr* operations_research::@18::BuildOpposite ( CPModelLoader *const   builder,
const CPIntegerExpressionProto &  proto 
) [static]

kOpposite

Definition at line 1822 of file io.cc.

Constraint* operations_research::@18::BuildPack ( CPModelLoader *const   builder,
const CPConstraintProto &  proto 
) [static]

Definition at line 1904 of file io.cc.

Constraint* operations_research::@18::BuildPathCumul ( CPModelLoader *const   builder,
const CPConstraintProto &  proto 
) [static]

kPathCumul

Definition at line 1944 of file io.cc.

IntExpr* operations_research::@18::BuildPerformedExpr ( CPModelLoader *const   builder,
const CPIntegerExpressionProto &  proto 
) [static]

kPerformedExpr

Definition at line 1961 of file io.cc.

PropagationMonitor * operations_research::BuildPrintTrace ( Solver *const   s  ) 

Definition at line 902 of file trace.cc.

IntExpr* operations_research::@18::BuildProduct ( CPModelLoader *const   builder,
const CPIntegerExpressionProto &  proto 
) [static]

kProduct

Definition at line 1970 of file io.cc.

IntExpr* operations_research::@18::BuildScalProd ( CPModelLoader *const   builder,
const CPIntegerExpressionProto &  proto 
) [static]

kScalProd

Definition at line 1989 of file io.cc.

Constraint* operations_research::@18::BuildScalProdEqual ( CPModelLoader *const   builder,
const CPConstraintProto &  proto 
) [static]

kScalProdEqual

Definition at line 2002 of file io.cc.

Constraint* operations_research::@18::BuildScalProdGreaterOrEqual ( CPModelLoader *const   builder,
const CPConstraintProto &  proto 
) [static]

kScalProdGreaterOrEqual

Definition at line 2017 of file io.cc.

Constraint* operations_research::@18::BuildScalProdLessOrEqual ( CPModelLoader *const   builder,
const CPConstraintProto &  proto 
) [static]

kScalProdLessOrEqual

Definition at line 2032 of file io.cc.

IntExpr* operations_research::@18::BuildSemiContinuous ( CPModelLoader *const   builder,
const CPIntegerExpressionProto &  proto 
) [static]

kSemiContinuous

Definition at line 2047 of file io.cc.

SequenceVar* operations_research::@18::BuildSequenceVariable ( CPModelLoader *const   builder,
const CPSequenceVariableProto &  proto 
) [static]

kSequenceVariable

Definition at line 2064 of file io.cc.

IntExpr* operations_research::@18::BuildSquare ( CPModelLoader *const   builder,
const CPIntegerExpressionProto &  proto 
) [static]

kSquare

Definition at line 2075 of file io.cc.

IntExpr* operations_research::@18::BuildStartExpr ( CPModelLoader *const   builder,
const CPIntegerExpressionProto &  proto 
) [static]

kStartExpr

Definition at line 2086 of file io.cc.

IntExpr* operations_research::@18::BuildSum ( CPModelLoader *const   builder,
const CPIntegerExpressionProto &  proto 
) [static]

kSum

Definition at line 2095 of file io.cc.

Constraint* operations_research::@18::BuildSumEqual ( CPModelLoader *const   builder,
const CPConstraintProto &  proto 
) [static]

kSumEqual

Definition at line 2117 of file io.cc.

Constraint* operations_research::@18::BuildSumGreaterOrEqual ( CPModelLoader *const   builder,
const CPConstraintProto &  proto 
) [static]

kSumGreaterOrEqual

Definition at line 2132 of file io.cc.

Constraint* operations_research::@18::BuildSumLessOrEqual ( CPModelLoader *const   builder,
const CPConstraintProto &  proto 
) [static]

kSumLessOrEqual

Definition at line 2143 of file io.cc.

PropagationMonitor * operations_research::BuildTrace ( Solver *const   s  ) 

Definition at line 3218 of file constraint_solver.cc.

Constraint* operations_research::@18::BuildTransition ( CPModelLoader *const   builder,
const CPConstraintProto &  proto 
) [static]

kTransition

Definition at line 2154 of file io.cc.

Constraint* operations_research::@18::BuildTrueConstraint ( CPModelLoader *const   builder,
const CPConstraintProto &  proto 
) [static]

kTrueConstraint

Definition at line 2181 of file io.cc.

bool operations_research::CompareStringsUsingNaturalLess ( const string &  s1,
const string &  s2 
)

Definition at line 89 of file tree_monitor.cc.

int64 operations_research::@19::CompoundOperatorNoRestart ( int  size,
int  active_index,
int  operator_index 
) [static]

Definition at line 1945 of file local_search.cc.

int64 operations_research::@19::CompoundOperatorRestart ( int  active_index,
int  operator_index 
) [static]

Definition at line 1955 of file local_search.cc.

int64 operations_research::@8::ComputeBranchRestart ( int64  log  )  [static]

ImpactDecisionBuilder.

Definition at line 559 of file default_search.cc.

int64 operations_research::@25::CostFunction ( int64 **  eval,
int64  i,
int64  j 
) [static]

Evaluators.

Definition at line 601 of file routing.cc.

operations_research::DEFINE_INT_TYPE ( _RoutingModel_NodeIndex  ,
int   
)

The type must be defined outside the class RoutingModel, SWIG does not parse it correctly if it's inside.

void operations_research::DeleteDemonProfiler ( DemonProfiler *const   monitor  ) 

Definition at line 447 of file demon_profiler.cc.

void operations_research::DemonProfilerAddFakeRun ( DemonProfiler *const   monitor,
const Demon *const   demon,
int64  start_time,
int64  end_time,
bool  is_fail 
)

Definition at line 467 of file demon_profiler.cc.

void operations_research::DemonProfilerBeginInitialPropagation ( DemonProfiler *const   monitor,
const Constraint *const   constraint 
)

Definition at line 490 of file demon_profiler.cc.

void operations_research::DemonProfilerEndInitialPropagation ( DemonProfiler *const   monitor,
const Constraint *const   constraint 
)

Definition at line 495 of file demon_profiler.cc.

void operations_research::DemonProfilerExportInformation ( DemonProfiler *const   monitor,
const Constraint *const   constraint,
int64 *const   fails,
int64 *const   initial_propagation_runtime,
int64 *const   demon_invocations,
int64 *const   total_demon_runtime,
int *const   demon_count 
)

Definition at line 475 of file demon_profiler.cc.

template<class C>
void operations_research::@20::Double ( C ***  array_ptr,
int *  size_ptr 
) [inline, static]

Definition at line 86 of file model_cache.cc.

template<class Task>
bool operations_research::@24::EndMaxLessThan ( const IndexedTask< Task > *const   w1,
const IndexedTask< Task > *const   w2 
) [inline, static]

Definition at line 158 of file resource.cc.

template<class Task>
bool operations_research::@24::EndMinLessThan ( const IndexedTask< Task > *const   w1,
const IndexedTask< Task > *const   w2 
) [inline, static]

Definition at line 170 of file resource.cc.

MPSolver::OptimizationProblemType operations_research::@16::GetType ( bool  use_clp  )  [static]

Definition at line 35 of file hybrid.cc.

bool operations_research::@6::GreaterThan ( int64  x,
int64  y 
) [static]

Definition at line 539 of file constraints.cc.

bool operations_research::@29::HasCompactDomains ( const IntVar *const *  vars,
int  arity 
) [static]

Definition at line 811 of file table.cc.

template<class T>
uint64 operations_research::Hash1 ( ConstPtrArray< T > *const   ptrs  )  [inline]

Definition at line 279 of file constraint_solveri.h.

uint64 operations_research::Hash1 ( ConstIntArray *const   values  )  [inline]

Definition at line 265 of file constraint_solveri.h.

uint64 operations_research::Hash1 ( void *const   ptr  )  [inline]

Definition at line 257 of file constraint_solveri.h.

uint64 operations_research::Hash1 ( int  value  )  [inline]

Definition at line 253 of file constraint_solveri.h.

uint64 operations_research::Hash1 ( int64  value  )  [inline]

Definition at line 249 of file constraint_solveri.h.

uint64 operations_research::Hash1 ( uint32  value  )  [inline]

Definition at line 238 of file constraint_solveri.h.

uint64 operations_research::Hash1 ( uint64  value  )  [inline]

Reversible Hash Table.

Hash functions

Todo:
TODO(user): use murmurhash.

Definition at line 227 of file constraint_solveri.h.

template<class A1, class A2>
uint64 operations_research::@20::Hash2 ( const A1 &  a1,
const A2 &  a2 
) [inline, static]

Definition at line 57 of file model_cache.cc.

template<class A1, class A2, class A3>
uint64 operations_research::@20::Hash3 ( const A1 &  a1,
const A2 &  a2,
const A3 &  a3 
) [inline, static]

Definition at line 65 of file model_cache.cc.

template<class A1, class A2, class A3, class A4>
uint64 operations_research::@20::Hash4 ( const A1 &  a1,
const A2 &  a2,
const A3 &  a3,
const A4 &  a4 
) [inline, static]

Definition at line 75 of file model_cache.cc.

template<class V, class E>
void operations_research::@1::IdToElementMap ( AssignmentContainer< V, E > *  container,
hash_map< string, E * > *  id_to_element_map 
) [inline, static]

Definition at line 489 of file assignment.cc.

string operations_research::@15::IndexedName ( const string &  prefix,
int  index,
int  max_index 
) [static]

Definition at line 4379 of file expressions.cc.

void operations_research::InstallDemonProfiler ( DemonProfiler *const   monitor  ) 

Exported Functions.

Definition at line 435 of file demon_profiler.cc.

void operations_research::InternalSaveBooleanVarValue ( Solver *const  solver,
IntVar *const  var 
)

Definition at line 851 of file constraint_solver.cc.

bool operations_research::@15::IsArrayActuallySorted ( const int64 *const   values,
int  size 
) [static]

Definition at line 88 of file expressions.cc.

template<class T>
bool operations_research::@20::IsEqual ( ConstPtrArray< T > *const   a1,
ConstPtrArray< T > *const   a2 
) [inline, static]

Definition at line 52 of file model_cache.cc.

bool operations_research::@20::IsEqual ( const ConstIntArray *&  a1,
const ConstIntArray *&  a2 
) [static]

Definition at line 48 of file model_cache.cc.

template<class T>
bool operations_research::@20::IsEqual ( const T &  a1,
const T &  a2 
) [inline, static]

Helpers.

Definition at line 44 of file model_cache.cc.

Solver::DecisionModification operations_research::@25::LeftDive ( Solver *const   s  )  [static]

Left-branch dive branch selector.

Definition at line 666 of file routing.cc.

void operations_research::LinkVarExpr ( Solver *const   s,
IntExpr *const   expr,
IntVar *const   var 
)

IntExprElement.

BaseIntExpr.

Definition at line 5018 of file expressions.cc.

template<class E, class P>
void operations_research::@1::LoadElement ( const hash_map< string, E * > &  id_to_element_map,
const P &  proto 
) [inline, static]

Definition at line 510 of file assignment.cc.

bool operations_research::LocalOptimumReached ( Search *const   search  ) 

Utility methods to ensure the communication between local search and the search.

Returns true if a local optimum has been reached and cannot be improved.

Definition at line 1310 of file constraint_solver.cc.

template<class T>
void operations_research::@18::MakeCallbackFromProto ( CPModelLoader *const   builder,
const CPExtensionProto &  proto,
int  tag_index,
ResultCallback1< T, int64 > **  callback 
) [inline, static]

Definition at line 1006 of file io.cc.

template<class T>
Demon* operations_research::MakeConstraintDemon0 ( Solver *const   s,
T *const   ct,
void(T::*)()  method,
const string &  name 
) [inline]

Definition at line 543 of file constraint_solveri.h.

template<class T, class P>
Demon* operations_research::MakeConstraintDemon1 ( Solver *const   s,
T *const   ct,
void(T::*)(P)  method,
const string &  name,
param1 
) [inline]

Definition at line 582 of file constraint_solveri.h.

template<class T, class P, class Q>
Demon* operations_research::MakeConstraintDemon2 ( Solver *const   s,
T *const   ct,
void(T::*)(P, Q)  method,
const string &  name,
param1,
param2 
) [inline]

Definition at line 626 of file constraint_solveri.h.

template<class T>
Demon* operations_research::MakeDelayedConstraintDemon0 ( Solver *const   s,
T *const   ct,
void(T::*)()  method,
const string &  name 
) [inline]

Definition at line 672 of file constraint_solveri.h.

template<class T, class P>
Demon* operations_research::MakeDelayedConstraintDemon1 ( Solver *const   s,
T *const   ct,
void(T::*)(P)  method,
const string &  name,
param1 
) [inline]

Definition at line 715 of file constraint_solveri.h.

template<class T, class P, class Q>
Demon* operations_research::MakeDelayedConstraintDemon2 ( Solver *const   s,
T *const   ct,
void(T::*)(P, Q)  method,
const string &  name,
param1,
param2 
) [inline]

Definition at line 763 of file constraint_solveri.h.

LocalSearchOperator* operations_research::MakePairActive ( Solver *const   solver,
const IntVar *const *  vars,
const IntVar *const *  secondary_vars,
const RoutingModel::NodePairs &  pairs,
int  size 
)

Definition at line 217 of file routing.cc.

LocalSearchOperator* operations_research::MakePairRelocate ( Solver *const   solver,
const IntVar *const *  vars,
const IntVar *const *  secondary_vars,
const RoutingModel::NodePairs &  pairs,
int  size 
)

Definition at line 320 of file routing.cc.

template<class T>
Constraint* operations_research::@13::MakeScalProdEqualityFct ( Solver *const   solver,
IntVar *const *  vars,
int  size,
T const *  coefficients,
int64  cst 
) [inline, static]

Definition at line 2655 of file expr_array.cc.

template<class T>
IntExpr* operations_research::@13::MakeScalProdFct ( Solver *  solver,
IntVar *const *  vars,
const T *const   coefs,
int  size 
) [inline, static]

Definition at line 2831 of file expr_array.cc.

template<class T>
Constraint* operations_research::@13::MakeScalProdGreaterOrEqualFct ( Solver *  solver,
IntVar *const *  vars,
int  size,
T const *  coefficients,
int64  cst 
) [inline, static]

Definition at line 2716 of file expr_array.cc.

template<class T>
Constraint* operations_research::@13::MakeScalProdLessOrEqualFct ( Solver *  solver,
IntVar *const *  vars,
int  size,
T const *  coefficients,
int64  upper_bound 
) [inline, static]

Definition at line 2770 of file expr_array.cc.

CumulativeTask* operations_research::@24::MakeTask ( Solver *  solver,
IntervalVar *  interval,
int64  demand 
) [static]

Cumulative.

Definition at line 817 of file resource.cc.

Action * operations_research::NewDomainIntVarCleaner (  ) 

namespace

Definition at line 4286 of file expressions.cc.

int64* operations_research::@15::NewUniqueSortedArray ( const int64 *const   values,
int *  size 
) [static]

Definition at line 61 of file expressions.cc.

int64 operations_research::@28::NextLuby ( int  i  )  [static]

Luby Strategy.

Definition at line 4360 of file search.cc.

LSOperation* operations_research::@19::OperationFromEnum ( Solver::LocalSearchOperation  op_enum  )  [static]

Local search filter factory.

Definition at line 2664 of file local_search.cc.

std::ostream & operations_research::operator<< ( std::ostream &  out,
const BaseObject *const   o 
)

NOLINT.

Definition at line 2532 of file constraint_solver.cc.

std::ostream & operations_research::operator<< ( std::ostream &  out,
const Solver *const   s 
)

Useful Operators.

NOLINT.

Definition at line 2527 of file constraint_solver.cc.

std::ostream & operations_research::operator<< ( std::ostream &  out,
const Assignment &  assignment 
)

NOLINT.

Definition at line 1155 of file assignment.cc.

int operations_research::@0::PathMax ( const int *const   tree,
int  index 
) [static]

Definition at line 196 of file alldiff_cst.cc.

int operations_research::@0::PathMin ( const int *const   tree,
int  index 
) [static]

Definition at line 188 of file alldiff_cst.cc.

void operations_research::@0::PathSet ( int  start,
int  end,
int  to,
int *const   tree 
) [static]

Definition at line 178 of file alldiff_cst.cc.

int64 operations_research::@15::PosIntDivDown ( int64  e,
int64  v 
) [static]

Definition at line 2033 of file expressions.cc.

int64 operations_research::@15::PosIntDivUp ( int64  e,
int64  v 
) [static]

Utility functions.

Definition at line 2026 of file expressions.cc.

template<class Container, class Element>
void operations_research::RealDebugString ( const Container &  container,
string *const   out 
) [inline]

Definition at line 682 of file assignment.cc.

template<class Var, class Element, class Proto, class Container>
void operations_research::RealLoad ( const AssignmentProto &  assignment_proto,
Container *const   container,
int(AssignmentProto::*)() const   GetSize,
const Proto &(AssignmentProto::*)(int) const   GetElem 
) [inline]

Definition at line 548 of file assignment.cc.

template<class Var, class Element, class Proto, class Container>
void operations_research::RealSave ( AssignmentProto *const   assignment_proto,
const Container &  container,
Proto *(AssignmentProto::*)()  Add 
) [inline]

Definition at line 630 of file assignment.cc.

void operations_research::RegisterDemon ( Solver *const   solver,
Demon *const   demon,
DemonProfiler *const   monitor 
)

Exported Methods for Unit Tests.

Definition at line 461 of file demon_profiler.cc.

void operations_research::RestoreBoolValue ( IntVar *const   var  ) 

namespace

Trail Object are explicitely copied using the copy ctor instead of passing and storing a pointer. As objects are small, copying is much faster than allocating (around 35% on a complete solve).

Definition at line 4299 of file expressions.cc.

int64 operations_research::@24::SafeProduct ( int64  a,
int64  b 
) [static]

Returns min(a * b, kint64max). a is positive.

Definition at line 1038 of file resource.cc.

void operations_research::@13::ScanArray ( IntVar *const *  vars,
int  size,
int *  bound,
int64 *  amin,
int64 *  amax,
int64 *  min_max,
int64 *  max_min 
) [static]

Builders.

Definition at line 1267 of file expr_array.cc.

void operations_research::@15::SetGenGenMinExpr ( IntExpr *const   left,
IntExpr *const   right,
int64  m 
) [static]

Propagates set_min on left * right, left and right across 0.

Definition at line 2869 of file expressions.cc.

void operations_research::@15::SetPosGenMinExpr ( IntExpr *const   left,
IntExpr *const   right,
int64  m 
) [static]

Propagates set_min on left * right, left >= 0, right across 0.

Definition at line 2842 of file expressions.cc.

void operations_research::@15::SetPosPosMaxExpr ( IntExpr *const   left,
IntExpr *const   right,
int64  m 
) [static]

Propagates set_max on left * right, left and right >= 0.

Definition at line 2822 of file expressions.cc.

void operations_research::@15::SetPosPosMinExpr ( IntExpr *const   left,
IntExpr *const   right,
int64  m 
) [static]

Utilities for product expression.

Propagates set_min on left * right, left and right >= 0.

Definition at line 2802 of file expressions.cc.

void operations_research::SetQueueCleanerOnFail ( Solver *const  solver,
IntVar *const  var 
)

Definition at line 1651 of file constraint_solver.cc.

template<typename T, typename Compare>
void operations_research::@24::Sort ( std::vector< T > *  vector,
Compare  compare 
) [inline, static]

Definition at line 176 of file resource.cc.

int64 operations_research::@13::SortBothChangeConstant ( IntVar **const   vars,
int64 *const   coefs,
int *const   size,
bool  keep_inside 
) [static]

This method will sort both vars and coefficients in increasing coefficient order.

Vars with null coefficients will be removed. Bound vars will be collected and the sum of the corresponding products (when the var is bound to 1) is returned by this method. If keep_inside is true, the constant will be added back into the scalprod as IntConst(1) * constant.

Definition at line 1912 of file expr_array.cc.

int operations_research::@22::SortIndexByWeight ( int64 *const   indices,
const int64 *const   weights,
int  size 
) [static]

Definition at line 548 of file pack.cc.

template<class Task>
bool operations_research::@24::StartMaxLessThan ( const IndexedTask< Task > *const   w1,
const IndexedTask< Task > *const   w2 
) [inline, static]

Definition at line 164 of file resource.cc.

template<class Task>
bool operations_research::@24::StartMinLessThan ( const IndexedTask< Task > *const   w1,
const IndexedTask< Task > *const   w2 
) [inline, static]

Comparison methods, used by the STL sort.

Definition at line 152 of file resource.cc.

bool operations_research::@24::TaskStartMinLessThan ( const CumulativeTask *const   task1,
const CumulativeTask *const   task2 
) [static]

Definition at line 180 of file resource.cc.

bool operations_research::@24::TimeLessThan ( const ProfileDelta &  delta1,
const ProfileDelta &  delta2 
) [static]

Definition at line 1339 of file resource.cc.

void operations_research::@15::TimesSetMin ( IntExpr *const   left,
IntExpr *const   right,
IntExpr *const   minus_left,
IntExpr *const   minus_right,
int  m 
) [static]

Definition at line 2890 of file expressions.cc.

string operations_research::TreeMonitorStripSpecialCharacters ( string  attribute  ) 

namespace

For tests Strips characters that cause problems with CPViz from attributes

Definition at line 789 of file tree_monitor.cc.

int64 operations_research::Zero (  )  [inline]

Misc.

This method returns 0. It is useful when 0 can be cast either as a pointer or as an integer value and thus lead to an ambiguous function call.

Definition at line 2992 of file constraint_solver.h.


Variable Documentation

const char* operations_research::kBinaryNames[] [static]

Initial value:

 {
  "ENDS_AFTER_END",
  "ENDS_AFTER_START",
  "ENDS_AT_END",
  "ENDS_AT_START",
  "STARTS_AFTER_END",
  "STARTS_AFTER_START",
  "STARTS_AT_END",
  "STARTS_AT_START",
  "STAYS_IN_SYNC"
}

Definition at line 39 of file timetabling.cc.

const int operations_research::kBitsInUint64 = 64 [static]

Todo:
TODO(user): Implement ConstIntMatrix to share/manage tuple sets.

Definition at line 44 of file table.cc.

const char* operations_research::kConfigXml [static]

Initial value:

    "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
    "<configuration version=\"1.0\">\n"
    "    <tool show=\"tree\" fileroot=\"tree\" display=\"expanded\""
    " repeat=\"all\"/>\n"
    "    <tool show=\"viz\" fileroot=\"viz\" repeat=\"all\"/>\n"
    "</configuration>"

Definition at line 96 of file tree_monitor.cc.

const int operations_research::kModelVersion = 1 [static]

Second Pass Visitor.

Definition at line 522 of file io.cc.

const int64 operations_research::kNoPenalty = -1 [static]

Definition at line 675 of file routing.cc.

const char* operations_research::kUnaryNames[] [static]

Initial value:

 {
  "ENDS_AFTER",
  "ENDS_AT",
  "ENDS_BEFORE",
  "STARTS_AFTER",
  "STARTS_AT",
  "STARTS_BEFORE",
  "CROSS_DATE",
  "AVOID_DATE",
}

Definition at line 28 of file timetabling.cc.

const int operations_research::kUnassigned = -1 [static]

namespace

Routing model

Definition at line 674 of file routing.cc.

Boolean variable.

Definition at line 1202 of file expressions.cc.