Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
com.google.ortools.constraintsolver.Solver Class Reference

Classes

class  FailException
 
class  IntegerCastInfo
 

Public Member Functions

synchronized void delete ()
 
IntVar[] makeIntVarArray (int count, long min, long max)
 
IntVar[] makeIntVarArray (int count, long min, long max, String name)
 
IntVar[] makeBoolVarArray (int count)
 
IntVar[] makeBoolVarArray (int count, String name)
 
IntervalVar[] makeFixedDurationIntervalVarArray (int count, long start_min, long start_max, long duration, boolean optional)
 
IntervalVar[] makeFixedDurationIntervalVarArray (int count, long start_min, long start_max, long duration, boolean optional, String name)
 
void keepAliveDecisionBuilder (DecisionBuilder db)
 
void keepAliveDecisionBuilder (DecisionBuilder[] dbs)
 
 Solver (String name)
 
 Solver (String name, com.google.ortools.constraintsolver.ConstraintSolverParameters parameters)
 
com.google.ortools.constraintsolver.ConstraintSolverParameters parameters ()
 
SWIGTYPE_p_operations_research__ConstraintSolverParameters const_parameters ()
 
void addConstraint (Constraint c)
 
void addCastConstraint (CastConstraint constraint, IntVar target_var, IntExpr expr)
 
boolean solve (DecisionBuilder db, SearchMonitor[] monitors)
 
boolean solve (DecisionBuilder db)
 
boolean solve (DecisionBuilder db, SearchMonitor m1)
 
boolean solve (DecisionBuilder db, SearchMonitor m1, SearchMonitor m2)
 
boolean solve (DecisionBuilder db, SearchMonitor m1, SearchMonitor m2, SearchMonitor m3)
 
boolean solve (DecisionBuilder db, SearchMonitor m1, SearchMonitor m2, SearchMonitor m3, SearchMonitor m4)
 
void newSearch (DecisionBuilder db, SearchMonitor[] monitors)
 
void newSearch (DecisionBuilder db)
 
void newSearch (DecisionBuilder db, SearchMonitor m1)
 
void newSearch (DecisionBuilder db, SearchMonitor m1, SearchMonitor m2)
 
void newSearch (DecisionBuilder db, SearchMonitor m1, SearchMonitor m2, SearchMonitor m3)
 
void newSearch (DecisionBuilder db, SearchMonitor m1, SearchMonitor m2, SearchMonitor m3, SearchMonitor m4)
 
boolean nextSolution ()
 
void restartSearch ()
 
void endSearch ()
 
boolean solveAndCommit (DecisionBuilder db, SearchMonitor[] monitors)
 
boolean solveAndCommit (DecisionBuilder db)
 
boolean solveAndCommit (DecisionBuilder db, SearchMonitor m1)
 
boolean solveAndCommit (DecisionBuilder db, SearchMonitor m1, SearchMonitor m2)
 
boolean solveAndCommit (DecisionBuilder db, SearchMonitor m1, SearchMonitor m2, SearchMonitor m3)
 
boolean checkAssignment (Assignment solution)
 
boolean checkConstraint (Constraint ct)
 
int state ()
 
void fail ()
 
String toString ()
 
long wallTime ()
 
long branches ()
 
long solutions ()
 
long unchecked_solutions ()
 
long demon_runs (int p)
 
long failures ()
 
long neighbors ()
 
void ClearNeighbors ()
 
void IncrementNeighbors ()
 
long filteredNeighbors ()
 
long acceptedNeighbors ()
 
long stamp ()
 
long fail_stamp ()
 
void set_context (String context)
 
String context ()
 
int optimization_direction ()
 
void set_optimization_direction (int direction)
 
IntVar makeIntVar (long min, long max, String name)
 
IntVar makeIntVar (long[] values, String name)
 
IntVar makeIntVar (int[] values, String name)
 
IntVar makeIntVar (long min, long max)
 
IntVar makeIntVar (long[] values)
 
IntVar makeIntVar (int[] values)
 
IntVar makeBoolVar (String name)
 
IntVar makeBoolVar ()
 
IntVar makeIntConst (long val, String name)
 
IntVar makeIntConst (long val)
 
IntExpr makeSum (IntExpr left, IntExpr right)
 
IntExpr makeSum (IntExpr expr, long value)
 
IntExpr makeSum (IntVar[] vars)
 
IntExpr makeScalProd (IntVar[] vars, long[] coefs)
 
IntExpr makeScalProd (IntVar[] vars, int[] coefs)
 
IntExpr makeDifference (IntExpr left, IntExpr right)
 
IntExpr makeDifference (long value, IntExpr expr)
 
IntExpr makeOpposite (IntExpr expr)
 
IntExpr makeProd (IntExpr left, IntExpr right)
 
IntExpr makeProd (IntExpr expr, long value)
 
IntExpr makeDiv (IntExpr expr, long value)
 
IntExpr makeDiv (IntExpr numerator, IntExpr denominator)
 
IntExpr makeAbs (IntExpr expr)
 
IntExpr makeSquare (IntExpr expr)
 
IntExpr makePower (IntExpr expr, long n)
 
IntExpr makeElement (long[] values, IntVar index)
 
IntExpr makeElement (int[] values, IntVar index)
 
IntExpr makeElement (LongUnaryOperator values, IntVar index)
 
IntExpr makeMonotonicElement (LongUnaryOperator values, boolean increasing, IntVar index)
 
IntExpr makeElement (LongBinaryOperator values, IntVar index1, IntVar index2)
 
IntExpr makeElement (IntVar[] vars, IntVar index)
 
IntExpr makeIndexExpression (IntVar[] vars, long value)
 
Constraint makeIfThenElseCt (IntVar condition, IntExpr then_expr, IntExpr else_expr, IntVar target_var)
 
IntExpr makeMin (IntVar[] vars)
 
IntExpr makeMin (IntExpr left, IntExpr right)
 
IntExpr makeMin (IntExpr expr, long value)
 
IntExpr makeMin (IntExpr expr, int value)
 
IntExpr makeMax (IntVar[] vars)
 
IntExpr makeMax (IntExpr left, IntExpr right)
 
IntExpr makeMax (IntExpr expr, long value)
 
IntExpr makeMax (IntExpr expr, int value)
 
IntExpr makeConvexPiecewiseExpr (IntExpr expr, long early_cost, long early_date, long late_date, long late_cost)
 
IntExpr makeSemiContinuousExpr (IntExpr expr, long fixed_charge, long step)
 
IntExpr makeModulo (IntExpr x, long mod)
 
IntExpr makeModulo (IntExpr x, IntExpr mod)
 
IntExpr makeConditionalExpression (IntVar condition, IntExpr expr, long unperformed_value)
 
Constraint makeTrueConstraint ()
 
Constraint makeFalseConstraint ()
 
Constraint makeFalseConstraint (String explanation)
 
Constraint makeIsEqualCstCt (IntExpr var, long value, IntVar boolvar)
 
IntVar makeIsEqualCstVar (IntExpr var, long value)
 
Constraint makeIsEqualVar (IntExpr v1, IntExpr v2, IntVar b)
 
IntVar makeIsEqualVar (IntExpr v1, IntExpr v2)
 
Constraint makeEquality (IntExpr left, IntExpr right)
 
Constraint makeEquality (IntExpr expr, long value)
 
Constraint makeEquality (IntExpr expr, int value)
 
Constraint makeIsDifferentCstCt (IntExpr var, long value, IntVar boolvar)
 
IntVar makeIsDifferentCstVar (IntExpr var, long value)
 
IntVar makeIsDifferentCstVar (IntExpr v1, IntExpr v2)
 
Constraint makeIsDifferentCstCt (IntExpr v1, IntExpr v2, IntVar b)
 
Constraint makeNonEquality (IntExpr left, IntExpr right)
 
Constraint makeNonEquality (IntExpr expr, long value)
 
Constraint makeNonEquality (IntExpr expr, int value)
 
Constraint makeIsLessOrEqualCstCt (IntExpr var, long value, IntVar boolvar)
 
IntVar makeIsLessOrEqualCstVar (IntExpr var, long value)
 
IntVar makeIsLessOrEqualVar (IntExpr left, IntExpr right)
 
Constraint makeIsLessOrEqualCt (IntExpr left, IntExpr right, IntVar b)
 
Constraint makeLessOrEqual (IntExpr left, IntExpr right)
 
Constraint makeLessOrEqual (IntExpr expr, long value)
 
Constraint makeLessOrEqual (IntExpr expr, int value)
 
Constraint makeIsGreaterOrEqualCstCt (IntExpr var, long value, IntVar boolvar)
 
IntVar makeIsGreaterOrEqualCstVar (IntExpr var, long value)
 
IntVar makeIsGreaterOrEqualVar (IntExpr left, IntExpr right)
 
Constraint makeIsGreaterOrEqualCt (IntExpr left, IntExpr right, IntVar b)
 
Constraint makeGreaterOrEqual (IntExpr left, IntExpr right)
 
Constraint makeGreaterOrEqual (IntExpr expr, long value)
 
Constraint makeGreaterOrEqual (IntExpr expr, int value)
 
Constraint makeIsGreaterCstCt (IntExpr v, long c, IntVar b)
 
IntVar makeIsGreaterCstVar (IntExpr var, long value)
 
IntVar makeIsGreaterVar (IntExpr left, IntExpr right)
 
Constraint makeIsGreaterCt (IntExpr left, IntExpr right, IntVar b)
 
Constraint makeGreater (IntExpr left, IntExpr right)
 
Constraint makeGreater (IntExpr expr, long value)
 
Constraint makeGreater (IntExpr expr, int value)
 
Constraint makeIsLessCstCt (IntExpr v, long c, IntVar b)
 
IntVar makeIsLessCstVar (IntExpr var, long value)
 
IntVar makeIsLessVar (IntExpr left, IntExpr right)
 
Constraint makeIsLessCt (IntExpr left, IntExpr right, IntVar b)
 
Constraint makeLess (IntExpr left, IntExpr right)
 
Constraint makeLess (IntExpr expr, long value)
 
Constraint makeLess (IntExpr expr, int value)
 
Constraint makeSumLessOrEqual (IntVar[] vars, long cst)
 
Constraint makeSumGreaterOrEqual (IntVar[] vars, long cst)
 
Constraint makeSumEquality (IntVar[] vars, long cst)
 
Constraint makeSumEquality (IntVar[] vars, IntVar var)
 
Constraint makeScalProdEquality (IntVar[] vars, long[] coefficients, long cst)
 
Constraint makeScalProdEquality (IntVar[] vars, int[] coefficients, long cst)
 
Constraint makeScalProdEquality (IntVar[] vars, long[] coefficients, IntVar target)
 
Constraint makeScalProdEquality (IntVar[] vars, int[] coefficients, IntVar target)
 
Constraint makeScalProdGreaterOrEqual (IntVar[] vars, long[] coeffs, long cst)
 
Constraint makeScalProdGreaterOrEqual (IntVar[] vars, int[] coeffs, long cst)
 
Constraint makeScalProdLessOrEqual (IntVar[] vars, long[] coefficients, long cst)
 
Constraint makeScalProdLessOrEqual (IntVar[] vars, int[] coefficients, long cst)
 
Constraint makeMinEquality (IntVar[] vars, IntVar min_var)
 
Constraint makeMaxEquality (IntVar[] vars, IntVar max_var)
 
Constraint makeElementEquality (long[] vals, IntVar index, IntVar target)
 
Constraint makeElementEquality (int[] vals, IntVar index, IntVar target)
 
Constraint makeElementEquality (IntVar[] vars, IntVar index, IntVar target)
 
Constraint makeElementEquality (IntVar[] vars, IntVar index, long target)
 
Constraint makeAbsEquality (IntVar var, IntVar abs_var)
 
Constraint makeIndexOfConstraint (IntVar[] vars, IntVar index, long target)
 
Demon makeConstraintInitialPropagateCallback (Constraint ct)
 
Demon makeDelayedConstraintInitialPropagateCallback (Constraint ct)
 
Demon makeClosureDemon (Runnable closure)
 
Constraint makeBetweenCt (IntExpr expr, long l, long u)
 
Constraint makeNotBetweenCt (IntExpr expr, long l, long u)
 
Constraint makeIsBetweenCt (IntExpr expr, long l, long u, IntVar b)
 
IntVar makeIsBetweenVar (IntExpr v, long l, long u)
 
Constraint makeMemberCt (IntExpr expr, long[] values)
 
Constraint makeMemberCt (IntExpr expr, int[] values)
 
Constraint makeNotMemberCt (IntExpr expr, long[] values)
 
Constraint makeNotMemberCt (IntExpr expr, int[] values)
 
Constraint makeNotMemberCt (IntExpr expr, long[] starts, long[] ends)
 
Constraint makeNotMemberCt (IntExpr expr, int[] starts, int[] ends)
 
Constraint makeIsMemberCt (IntExpr expr, long[] values, IntVar boolvar)
 
Constraint makeIsMemberCt (IntExpr expr, int[] values, IntVar boolvar)
 
IntVar makeIsMemberVar (IntExpr expr, long[] values)
 
IntVar makeIsMemberVar (IntExpr expr, int[] values)
 
Constraint makeCount (IntVar[] vars, long value, long max_count)
 
Constraint makeCount (IntVar[] vars, long value, IntVar max_count)
 
Constraint makeDistribute (IntVar[] vars, long[] values, IntVar[] cards)
 
Constraint makeDistribute (IntVar[] vars, int[] values, IntVar[] cards)
 
Constraint makeDistribute (IntVar[] vars, IntVar[] cards)
 
Constraint makeDistribute (IntVar[] vars, long card_min, long card_max, long card_size)
 
Constraint makeDistribute (IntVar[] vars, long[] card_min, long[] card_max)
 
Constraint makeDistribute (IntVar[] vars, int[] card_min, int[] card_max)
 
Constraint makeDistribute (IntVar[] vars, long[] values, long[] card_min, long[] card_max)
 
Constraint makeDistribute (IntVar[] vars, int[] values, int[] card_min, int[] card_max)
 
Constraint makeDeviation (IntVar[] vars, IntVar deviation_var, long total_sum)
 
Constraint makeAllDifferent (IntVar[] vars)
 
Constraint makeAllDifferent (IntVar[] vars, boolean stronger_propagation)
 
Constraint makeAllDifferentExcept (IntVar[] vars, long escape_value)
 
Constraint makeSortingConstraint (IntVar[] vars, IntVar[] sorted)
 
Constraint makeLexicalLess (IntVar[] left, IntVar[] right)
 
Constraint makeLexicalLessOrEqual (IntVar[] left, IntVar[] right)
 
Constraint MakeLexicalLessOrEqualWithOffsets (IntVar[] left, IntVar[] right, long[] offsets)
 
Constraint MakeIsLexicalLessOrEqualWithOffsetsCt (IntVar[] left, IntVar[] right, long[] offsets, IntVar boolvar)
 
Constraint makeInversePermutationConstraint (IntVar[] left, IntVar[] right)
 
Constraint makeIndexOfFirstMaxValueConstraint (IntVar index, IntVar[] vars)
 
Constraint makeIndexOfFirstMinValueConstraint (IntVar index, IntVar[] vars)
 
Constraint makeNullIntersect (IntVar[] first_vars, IntVar[] second_vars)
 
Constraint makeNullIntersectExcept (IntVar[] first_vars, IntVar[] second_vars, long escape_value)
 
Constraint makeNoCycle (IntVar[] nexts, IntVar[] active, LongPredicate sink_handler)
 
Constraint makeNoCycle (IntVar[] nexts, IntVar[] active)
 
Constraint makeNoCycle (IntVar[] nexts, IntVar[] active, LongPredicate sink_handler, boolean assume_paths)
 
Constraint makeCircuit (IntVar[] nexts)
 
Constraint makeSubCircuit (IntVar[] nexts)
 
Constraint makePathCumul (IntVar[] nexts, IntVar[] active, IntVar[] cumuls, IntVar[] transits)
 
Constraint makeDelayedPathCumul (IntVar[] nexts, IntVar[] active, IntVar[] cumuls, IntVar[] transits)
 
Constraint makePathCumul (IntVar[] nexts, IntVar[] active, IntVar[] cumuls, LongBinaryOperator transit_evaluator)
 
Constraint makePathCumul (IntVar[] nexts, IntVar[] active, IntVar[] cumuls, IntVar[] slacks, LongBinaryOperator transit_evaluator)
 
Constraint makePathConnected (IntVar[] nexts, long[] sources, long[] sinks, IntVar[] status)
 
Constraint makeMapDomain (IntVar var, IntVar[] actives)
 
Constraint makeAllowedAssignment (IntVar[] vars, IntTupleSet tuples)
 
Constraint makeTransitionConstraint (IntVar[] vars, IntTupleSet transition_table, long initial_state, long[] final_states)
 
Constraint makeTransitionConstraint (IntVar[] vars, IntTupleSet transition_table, long initial_state, int[] final_states)
 
Constraint makeNonOverlappingBoxesConstraint (IntVar[] x_vars, IntVar[] y_vars, IntVar[] x_size, IntVar[] y_size)
 
Constraint makeNonOverlappingBoxesConstraint (IntVar[] x_vars, IntVar[] y_vars, SWIGTYPE_p_absl__SpanT_long_const_t x_size, SWIGTYPE_p_absl__SpanT_long_const_t y_size)
 
Constraint makeNonOverlappingBoxesConstraint (IntVar[] x_vars, IntVar[] y_vars, SWIGTYPE_p_absl__SpanT_int_const_t x_size, SWIGTYPE_p_absl__SpanT_int_const_t y_size)
 
Constraint makeNonOverlappingNonStrictBoxesConstraint (IntVar[] x_vars, IntVar[] y_vars, IntVar[] x_size, IntVar[] y_size)
 
Constraint makeNonOverlappingNonStrictBoxesConstraint (IntVar[] x_vars, IntVar[] y_vars, SWIGTYPE_p_absl__SpanT_long_const_t x_size, SWIGTYPE_p_absl__SpanT_long_const_t y_size)
 
Constraint makeNonOverlappingNonStrictBoxesConstraint (IntVar[] x_vars, IntVar[] y_vars, SWIGTYPE_p_absl__SpanT_int_const_t x_size, SWIGTYPE_p_absl__SpanT_int_const_t y_size)
 
Pack makePack (IntVar[] vars, int number_of_bins)
 
IntervalVar makeFixedDurationIntervalVar (long start_min, long start_max, long duration, boolean optional, String name)
 
IntervalVar makeFixedDurationIntervalVar (IntVar start_variable, long duration, String name)
 
IntervalVar makeFixedDurationIntervalVar (IntVar start_variable, long duration, IntVar performed_variable, String name)
 
IntervalVar makeFixedInterval (long start, long duration, String name)
 
IntervalVar makeIntervalVar (long start_min, long start_max, long duration_min, long duration_max, long end_min, long end_max, boolean optional, String name)
 
IntervalVar makeMirrorInterval (IntervalVar interval_var)
 
IntervalVar makeFixedDurationStartSyncedOnStartIntervalVar (IntervalVar interval_var, long duration, long offset)
 
IntervalVar makeFixedDurationStartSyncedOnEndIntervalVar (IntervalVar interval_var, long duration, long offset)
 
IntervalVar makeFixedDurationEndSyncedOnStartIntervalVar (IntervalVar interval_var, long duration, long offset)
 
IntervalVar makeFixedDurationEndSyncedOnEndIntervalVar (IntervalVar interval_var, long duration, long offset)
 
IntervalVar makeIntervalRelaxedMin (IntervalVar interval_var)
 
IntervalVar makeIntervalRelaxedMax (IntervalVar interval_var)
 
Constraint makeIntervalVarRelation (IntervalVar t, int r, long d)
 
Constraint makeIntervalVarRelation (IntervalVar t1, int r, IntervalVar t2)
 
Constraint makeIntervalVarRelationWithDelay (IntervalVar t1, int r, IntervalVar t2, long delay)
 
Constraint makeTemporalDisjunction (IntervalVar t1, IntervalVar t2, IntVar alt)
 
Constraint makeTemporalDisjunction (IntervalVar t1, IntervalVar t2)
 
DisjunctiveConstraint makeDisjunctiveConstraint (IntervalVar[] intervals, String name)
 
DisjunctiveConstraint makeStrictDisjunctiveConstraint (IntervalVar[] intervals, String name)
 
Constraint makeCumulative (IntervalVar[] intervals, long[] demands, long capacity, String name)
 
Constraint makeCumulative (IntervalVar[] intervals, int[] demands, long capacity, String name)
 
Constraint makeCumulative (IntervalVar[] intervals, long[] demands, IntVar capacity, String name)
 
Constraint makeCumulative (IntervalVar[] intervals, int[] demands, IntVar capacity, String name)
 
Constraint makeCumulative (IntervalVar[] intervals, IntVar[] demands, long capacity, String name)
 
Constraint makeCumulative (IntervalVar[] intervals, IntVar[] demands, IntVar capacity, String name)
 
Constraint makeCover (IntervalVar[] vars, IntervalVar target_var)
 
Constraint makeEquality (IntervalVar var1, IntervalVar var2)
 
Assignment makeAssignment ()
 
Assignment makeAssignment (Assignment a)
 
SolutionCollector makeFirstSolutionCollector (Assignment assignment)
 
SolutionCollector makeFirstSolutionCollector ()
 
SolutionCollector makeLastSolutionCollector (Assignment assignment)
 
SolutionCollector makeLastSolutionCollector ()
 
SolutionCollector makeBestValueSolutionCollector (Assignment assignment, boolean maximize)
 
SolutionCollector MakeBestLexicographicValueSolutionCollector (Assignment assignment, SWIGTYPE_p_std__vectorT_bool_t maximize)
 
SolutionCollector makeBestValueSolutionCollector (boolean maximize)
 
SolutionCollector MakeBestLexicographicValueSolutionCollector (SWIGTYPE_p_std__vectorT_bool_t maximize)
 
SolutionCollector makeNBestValueSolutionCollector (Assignment assignment, int solution_count, boolean maximize)
 
SolutionCollector makeNBestValueSolutionCollector (int solution_count, boolean maximize)
 
SolutionCollector MakeNBestLexicographicValueSolutionCollector (Assignment assignment, int solution_count, SWIGTYPE_p_std__vectorT_bool_t maximize)
 
SolutionCollector MakeNBestLexicographicValueSolutionCollector (int solution_count, SWIGTYPE_p_std__vectorT_bool_t maximize)
 
SolutionCollector makeAllSolutionCollector (Assignment assignment)
 
SolutionCollector makeAllSolutionCollector ()
 
OptimizeVar makeMinimize (IntVar v, long step)
 
OptimizeVar makeMaximize (IntVar v, long step)
 
OptimizeVar makeOptimize (boolean maximize, IntVar v, long step)
 
OptimizeVar makeWeightedMinimize (IntVar[] sub_objectives, long[] weights, long step)
 
OptimizeVar makeWeightedMinimize (IntVar[] sub_objectives, int[] weights, long step)
 
OptimizeVar makeWeightedMaximize (IntVar[] sub_objectives, long[] weights, long step)
 
OptimizeVar makeWeightedMaximize (IntVar[] sub_objectives, int[] weights, long step)
 
OptimizeVar makeWeightedOptimize (boolean maximize, IntVar[] sub_objectives, long[] weights, long step)
 
OptimizeVar makeWeightedOptimize (boolean maximize, IntVar[] sub_objectives, int[] weights, long step)
 
OptimizeVar MakeLexicographicOptimize (SWIGTYPE_p_std__vectorT_bool_t maximize, IntVar[] variables, long[] steps)
 
ObjectiveMonitor makeTabuSearch (boolean maximize, IntVar objective, long step, IntVar[] vars, long keep_tenure, long forbid_tenure, double tabu_factor)
 
ObjectiveMonitor MakeLexicographicTabuSearch (SWIGTYPE_p_std__vectorT_bool_t maximize, IntVar[] objectives, long[] steps, IntVar[] vars, long keep_tenure, long forbid_tenure, double tabu_factor)
 
ObjectiveMonitor makeGenericTabuSearch (boolean maximize, IntVar v, long step, IntVar[] tabu_vars, long forbid_tenure)
 
ObjectiveMonitor makeSimulatedAnnealing (boolean maximize, IntVar v, long step, long initial_temperature)
 
ObjectiveMonitor MakeLexicographicSimulatedAnnealing (SWIGTYPE_p_std__vectorT_bool_t maximize, IntVar[] vars, long[] steps, long[] initial_temperatures)
 
ObjectiveMonitor makeGuidedLocalSearch (boolean maximize, IntVar objective, LongBinaryOperator objective_function, long step, IntVar[] vars, double penalty_factor, boolean reset_penalties_on_new_best_solution)
 
ObjectiveMonitor makeGuidedLocalSearch (boolean maximize, IntVar objective, LongBinaryOperator objective_function, long step, IntVar[] vars, double penalty_factor)
 
ObjectiveMonitor makeGuidedLocalSearch (boolean maximize, IntVar objective, LongTernaryOperator objective_function, long step, IntVar[] vars, IntVar[] secondary_vars, double penalty_factor, boolean reset_penalties_on_new_best_solution)
 
ObjectiveMonitor makeGuidedLocalSearch (boolean maximize, IntVar objective, LongTernaryOperator objective_function, long step, IntVar[] vars, IntVar[] secondary_vars, double penalty_factor)
 
SearchMonitor makeLubyRestart (int scale_factor)
 
SearchMonitor makeConstantRestart (int frequency)
 
RegularLimit makeTimeLimit (SWIGTYPE_p_absl__Duration time)
 
RegularLimit makeTimeLimit (long time_in_ms)
 
RegularLimit makeBranchesLimit (long branches)
 
RegularLimit makeFailuresLimit (long failures)
 
RegularLimit makeSolutionsLimit (long solutions)
 
RegularLimit makeLimit (SWIGTYPE_p_absl__Duration time, long branches, long failures, long solutions, boolean smart_time_check, boolean cumulative)
 
RegularLimit makeLimit (SWIGTYPE_p_absl__Duration time, long branches, long failures, long solutions, boolean smart_time_check)
 
RegularLimit makeLimit (SWIGTYPE_p_absl__Duration time, long branches, long failures, long solutions)
 
RegularLimit makeLimit (com.google.ortools.constraintsolver.RegularLimitParameters proto)
 
RegularLimit makeLimit (long time, long branches, long failures, long solutions, boolean smart_time_check, boolean cumulative)
 
RegularLimit makeLimit (long time, long branches, long failures, long solutions, boolean smart_time_check)
 
RegularLimit makeLimit (long time, long branches, long failures, long solutions)
 
com.google.ortools.constraintsolver.RegularLimitParameters makeDefaultRegularLimitParameters ()
 
SearchLimit makeLimit (SearchLimit limit_1, SearchLimit limit_2)
 
ImprovementSearchLimit MakeImprovementLimit (IntVar objective_var, boolean maximize, double objective_scaling_factor, double objective_offset, double improvement_rate_coefficient, int improvement_rate_solutions_distance)
 
ImprovementSearchLimit MakeLexicographicImprovementLimit (IntVar[] objective_vars, SWIGTYPE_p_std__vectorT_bool_t maximize, double[] objective_scaling_factors, double[] objective_offsets, double improvement_rate_coefficient, int improvement_rate_solutions_distance)
 
SearchLimit makeCustomLimit (BooleanSupplier limiter)
 
SearchMonitor makeSearchLog (int branch_period)
 
SearchMonitor makeSearchLog (int branch_period, IntVar var)
 
SearchMonitor makeSearchLog (int branch_period, Supplier< String > display_callback)
 
SearchMonitor makeSearchLog (int branch_period, IntVar var, Supplier< String > display_callback)
 
SearchMonitor makeSearchLog (int branch_period, IntVar[] vars, Supplier< String > display_callback)
 
SearchMonitor makeSearchLog (int branch_period, OptimizeVar opt_var)
 
SearchMonitor makeSearchLog (int branch_period, OptimizeVar opt_var, Supplier< String > display_callback)
 
SearchMonitor makeSearchTrace (String prefix)
 
SearchMonitor makeEnterSearchCallback (Runnable callback)
 
SearchMonitor makeExitSearchCallback (Runnable callback)
 
SearchMonitor makeAtSolutionCallback (Runnable callback)
 
ModelVisitor makePrintModelVisitor ()
 
ModelVisitor makeStatisticsModelVisitor ()
 
SearchMonitor makeSymmetryManager (SymmetryBreaker[] visitors)
 
SearchMonitor makeSymmetryManager (SymmetryBreaker v1)
 
SearchMonitor makeSymmetryManager (SymmetryBreaker v1, SymmetryBreaker v2)
 
SearchMonitor makeSymmetryManager (SymmetryBreaker v1, SymmetryBreaker v2, SymmetryBreaker v3)
 
SearchMonitor makeSymmetryManager (SymmetryBreaker v1, SymmetryBreaker v2, SymmetryBreaker v3, SymmetryBreaker v4)
 
Decision makeAssignVariableValue (IntVar var, long val)
 
Decision makeVariableLessOrEqualValue (IntVar var, long value)
 
Decision makeVariableGreaterOrEqualValue (IntVar var, long value)
 
Decision makeSplitVariableDomain (IntVar var, long val, boolean start_with_lower_half)
 
Decision makeAssignVariableValueOrFail (IntVar var, long value)
 
Decision MakeAssignVariableValueOrDoNothing (IntVar var, long value)
 
Decision makeAssignVariablesValues (IntVar[] vars, long[] values)
 
Decision MakeAssignVariablesValuesOrDoNothing (IntVar[] vars, long[] values)
 
Decision MakeAssignVariablesValuesOrFail (IntVar[] vars, long[] values)
 
Decision makeFailDecision ()
 
Decision makeDecision (Consumer< Solver > apply, Consumer< Solver > refute)
 
DecisionBuilder compose (DecisionBuilder db1, DecisionBuilder db2)
 
DecisionBuilder compose (DecisionBuilder db1, DecisionBuilder db2, DecisionBuilder db3)
 
DecisionBuilder compose (DecisionBuilder db1, DecisionBuilder db2, DecisionBuilder db3, DecisionBuilder db4)
 
DecisionBuilder compose (DecisionBuilder[] dbs)
 
DecisionBuilder tryDecisions (DecisionBuilder db1, DecisionBuilder db2)
 
DecisionBuilder tryDecisions (DecisionBuilder db1, DecisionBuilder db2, DecisionBuilder db3)
 
DecisionBuilder tryDecisions (DecisionBuilder db1, DecisionBuilder db2, DecisionBuilder db3, DecisionBuilder db4)
 
DecisionBuilder tryDecisions (DecisionBuilder[] dbs)
 
DecisionBuilder makePhase (IntVar[] vars, int var_str, int val_str)
 
DecisionBuilder makePhase (IntVar[] vars, LongUnaryOperator var_evaluator, int val_str)
 
DecisionBuilder makePhase (IntVar[] vars, int var_str, LongBinaryOperator value_evaluator)
 
DecisionBuilder makePhase (IntVar[] vars, int var_str, LongTernaryPredicate var_val1_val2_comparator)
 
DecisionBuilder makePhase (IntVar[] vars, LongUnaryOperator var_evaluator, LongBinaryOperator value_evaluator)
 
DecisionBuilder makePhase (IntVar[] vars, int var_str, LongBinaryOperator value_evaluator, LongUnaryOperator tie_breaker)
 
DecisionBuilder makePhase (IntVar[] vars, LongUnaryOperator var_evaluator, LongBinaryOperator value_evaluator, LongUnaryOperator tie_breaker)
 
DecisionBuilder makeDefaultPhase (IntVar[] vars)
 
DecisionBuilder makeDefaultPhase (IntVar[] vars, DefaultPhaseParameters parameters)
 
DecisionBuilder makePhase (IntVar v0, int var_str, int val_str)
 
DecisionBuilder makePhase (IntVar v0, IntVar v1, int var_str, int val_str)
 
DecisionBuilder makePhase (IntVar v0, IntVar v1, IntVar v2, int var_str, int val_str)
 
DecisionBuilder makePhase (IntVar v0, IntVar v1, IntVar v2, IntVar v3, int var_str, int val_str)
 
Decision makeScheduleOrPostpone (IntervalVar var, long est, SWIGTYPE_p_long marker)
 
Decision makeScheduleOrExpedite (IntervalVar var, long est, SWIGTYPE_p_long marker)
 
Decision makeRankFirstInterval (SequenceVar sequence, int index)
 
Decision makeRankLastInterval (SequenceVar sequence, int index)
 
DecisionBuilder makePhase (IntVar[] vars, LongBinaryOperator eval, int str)
 
DecisionBuilder makePhase (IntVar[] vars, LongBinaryOperator eval, LongUnaryOperator tie_breaker, int str)
 
DecisionBuilder makePhase (IntervalVar[] intervals, int str)
 
DecisionBuilder makePhase (SequenceVar[] sequences, int str)
 
DecisionBuilder makeDecisionBuilderFromAssignment (Assignment assignment, DecisionBuilder db, IntVar[] vars)
 
DecisionBuilder makeConstraintAdder (Constraint ct)
 
DecisionBuilder makeSolveOnce (DecisionBuilder db)
 
DecisionBuilder makeSolveOnce (DecisionBuilder db, SearchMonitor monitor1)
 
DecisionBuilder makeSolveOnce (DecisionBuilder db, SearchMonitor monitor1, SearchMonitor monitor2)
 
DecisionBuilder makeSolveOnce (DecisionBuilder db, SearchMonitor monitor1, SearchMonitor monitor2, SearchMonitor monitor3)
 
DecisionBuilder makeSolveOnce (DecisionBuilder db, SearchMonitor monitor1, SearchMonitor monitor2, SearchMonitor monitor3, SearchMonitor monitor4)
 
DecisionBuilder makeSolveOnce (DecisionBuilder db, SearchMonitor[] monitors)
 
DecisionBuilder makeNestedOptimize (DecisionBuilder db, Assignment solution, boolean maximize, long step)
 
DecisionBuilder makeNestedOptimize (DecisionBuilder db, Assignment solution, boolean maximize, long step, SearchMonitor monitor1)
 
DecisionBuilder makeNestedOptimize (DecisionBuilder db, Assignment solution, boolean maximize, long step, SearchMonitor monitor1, SearchMonitor monitor2)
 
DecisionBuilder makeNestedOptimize (DecisionBuilder db, Assignment solution, boolean maximize, long step, SearchMonitor monitor1, SearchMonitor monitor2, SearchMonitor monitor3)
 
DecisionBuilder makeNestedOptimize (DecisionBuilder db, Assignment solution, boolean maximize, long step, SearchMonitor monitor1, SearchMonitor monitor2, SearchMonitor monitor3, SearchMonitor monitor4)
 
DecisionBuilder makeNestedOptimize (DecisionBuilder db, Assignment solution, boolean maximize, long step, SearchMonitor[] monitors)
 
DecisionBuilder makeRestoreAssignment (Assignment assignment)
 
DecisionBuilder makeStoreAssignment (Assignment assignment)
 
LocalSearchOperator makeOperator (IntVar[] vars, int op, SWIGTYPE_p_std__functionT_std__vectorT_int_t_const_Rfint_intF_t get_neighbors)
 
LocalSearchOperator makeOperator (IntVar[] vars, int op)
 
LocalSearchOperator makeOperator (IntVar[] vars, IntVar[] secondary_vars, int op, SWIGTYPE_p_std__functionT_std__vectorT_int_t_const_Rfint_intF_t get_neighbors)
 
LocalSearchOperator makeOperator (IntVar[] vars, IntVar[] secondary_vars, int op)
 
LocalSearchOperator makeOperator (IntVar[] vars, LongTernaryOperator evaluator, int op)
 
LocalSearchOperator makeOperator (IntVar[] vars, IntVar[] secondary_vars, LongTernaryOperator evaluator, int op)
 
LocalSearchOperator makeRandomLnsOperator (IntVar[] vars, int number_of_variables)
 
LocalSearchOperator makeRandomLnsOperator (IntVar[] vars, int number_of_variables, int seed)
 
LocalSearchOperator makeMoveTowardTargetOperator (Assignment target)
 
LocalSearchOperator makeMoveTowardTargetOperator (IntVar[] variables, long[] target_values)
 
LocalSearchOperator concatenateOperators (LocalSearchOperator[] ops)
 
LocalSearchOperator concatenateOperators (LocalSearchOperator[] ops, boolean restart)
 
LocalSearchOperator concatenateOperators (LocalSearchOperator[] ops, IntIntToLongFunction evaluator)
 
LocalSearchOperator randomConcatenateOperators (LocalSearchOperator[] ops)
 
LocalSearchOperator randomConcatenateOperators (LocalSearchOperator[] ops, int seed)
 
LocalSearchOperator MultiArmedBanditConcatenateOperators (LocalSearchOperator[] ops, double memory_coefficient, double exploration_coefficient, boolean maximize)
 
LocalSearchOperator makeNeighborhoodLimit (LocalSearchOperator op, long limit)
 
DecisionBuilder makeLocalSearchPhase (Assignment assignment, LocalSearchPhaseParameters parameters)
 
DecisionBuilder makeLocalSearchPhase (IntVar[] vars, DecisionBuilder first_solution, LocalSearchPhaseParameters parameters)
 
DecisionBuilder makeLocalSearchPhase (IntVar[] vars, DecisionBuilder first_solution, DecisionBuilder first_solution_sub_decision_builder, LocalSearchPhaseParameters parameters)
 
DecisionBuilder makeLocalSearchPhase (SequenceVar[] vars, DecisionBuilder first_solution, LocalSearchPhaseParameters parameters)
 
Assignment RunUncheckedLocalSearch (Assignment initial_solution, LocalSearchFilterManager filter_manager, LocalSearchOperator ls_operator, SearchMonitor[] monitors, RegularLimit limit, SWIGTYPE_p_absl__flat_hash_setT_operations_research__IntVar_p_t touched)
 
Assignment RunUncheckedLocalSearch (Assignment initial_solution, LocalSearchFilterManager filter_manager, LocalSearchOperator ls_operator, SearchMonitor[] monitors, RegularLimit limit)
 
SolutionPool makeDefaultSolutionPool ()
 
LocalSearchPhaseParameters makeLocalSearchPhaseParameters (IntVar objective, LocalSearchOperator ls_operator, DecisionBuilder sub_decision_builder)
 
LocalSearchPhaseParameters makeLocalSearchPhaseParameters (IntVar objective, LocalSearchOperator ls_operator, DecisionBuilder sub_decision_builder, RegularLimit limit)
 
LocalSearchPhaseParameters makeLocalSearchPhaseParameters (IntVar objective, LocalSearchOperator ls_operator, DecisionBuilder sub_decision_builder, RegularLimit limit, LocalSearchFilterManager filter_manager)
 
LocalSearchPhaseParameters makeLocalSearchPhaseParameters (IntVar objective, SolutionPool pool, LocalSearchOperator ls_operator, DecisionBuilder sub_decision_builder)
 
LocalSearchPhaseParameters makeLocalSearchPhaseParameters (IntVar objective, SolutionPool pool, LocalSearchOperator ls_operator, DecisionBuilder sub_decision_builder, RegularLimit limit)
 
LocalSearchPhaseParameters makeLocalSearchPhaseParameters (IntVar objective, SolutionPool pool, LocalSearchOperator ls_operator, DecisionBuilder sub_decision_builder, RegularLimit limit, LocalSearchFilterManager filter_manager)
 
LocalSearchFilter MakeAcceptFilter ()
 
LocalSearchFilter MakeRejectFilter ()
 
LocalSearchFilter makeVariableDomainFilter ()
 
IntVarLocalSearchFilter makeSumObjectiveFilter (IntVar[] vars, LongBinaryOperator values, int filter_enum)
 
IntVarLocalSearchFilter makeSumObjectiveFilter (IntVar[] vars, IntVar[] secondary_vars, LongTernaryOperator values, int filter_enum)
 
void topPeriodicCheck ()
 
int topProgressPercent ()
 
void pushState ()
 
void popState ()
 
int searchDepth ()
 
int searchLeftDepth ()
 
int solveDepth ()
 
long rand64 (long size)
 
int rand32 (int size)
 
void reSeed (int seed)
 
void exportProfilingOverview (String filename)
 
String localSearchProfile ()
 
boolean currentlyInSolve ()
 
int constraints ()
 
void accept (ModelVisitor visitor)
 
Decision balancing_decision ()
 
void clear_fail_intercept ()
 
void SetUseFastLocalSearch (boolean use_fast_local_search)
 
boolean UseFastLocalSearch ()
 
boolean hasName (PropagationBaseObject object)
 
Demon registerDemon (Demon demon)
 
IntExpr registerIntExpr (IntExpr expr)
 
IntVar registerIntVar (IntVar var)
 
IntervalVar registerIntervalVar (IntervalVar var)
 
ModelCache cache ()
 
boolean instrumentsDemons ()
 
boolean isProfilingEnabled ()
 
boolean isLocalSearchProfilingEnabled ()
 
boolean instrumentsVariables ()
 
boolean nameAllVariables ()
 
String model_name ()
 
PropagationMonitor getPropagationMonitor ()
 
void addPropagationMonitor (PropagationMonitor monitor)
 
LocalSearchMonitor getLocalSearchMonitor ()
 
void addLocalSearchMonitor (LocalSearchMonitor monitor)
 
Assignment GetOrCreateLocalSearchState ()
 
void ClearLocalSearchState ()
 
void setTmpVector (long[] value)
 
long[] getTmpVector ()
 
IntExpr castExpression (IntVar var)
 
void finishCurrentSearch ()
 
void restartCurrentSearch ()
 
void shouldFail ()
 
void checkFail ()
 
DecisionBuilder MakeProfiledDecisionBuilderWrapper (DecisionBuilder db)
 

Static Public Member Functions

static com.google.ortools.constraintsolver.ConstraintSolverParameters defaultSolverParameters ()
 
static long memoryUsage ()
 

Static Public Attributes

static final int kNumPriorities = mainJNI.Solver_kNumPriorities_get()
 
static final int INT_VAR_DEFAULT = mainJNI.Solver_INT_VAR_DEFAULT_get()
 IntVarStrategy.
 
static final int INT_VAR_SIMPLE = mainJNI.Solver_INT_VAR_SIMPLE_get()
 
static final int CHOOSE_FIRST_UNBOUND = mainJNI.Solver_CHOOSE_FIRST_UNBOUND_get()
 
static final int CHOOSE_RANDOM = mainJNI.Solver_CHOOSE_RANDOM_get()
 
static final int CHOOSE_MIN_SIZE_LOWEST_MIN = mainJNI.Solver_CHOOSE_MIN_SIZE_LOWEST_MIN_get()
 
static final int CHOOSE_MIN_SIZE_HIGHEST_MIN = mainJNI.Solver_CHOOSE_MIN_SIZE_HIGHEST_MIN_get()
 
static final int CHOOSE_MIN_SIZE_LOWEST_MAX = mainJNI.Solver_CHOOSE_MIN_SIZE_LOWEST_MAX_get()
 
static final int CHOOSE_MIN_SIZE_HIGHEST_MAX = mainJNI.Solver_CHOOSE_MIN_SIZE_HIGHEST_MAX_get()
 
static final int CHOOSE_LOWEST_MIN = mainJNI.Solver_CHOOSE_LOWEST_MIN_get()
 
static final int CHOOSE_HIGHEST_MAX = mainJNI.Solver_CHOOSE_HIGHEST_MAX_get()
 
static final int CHOOSE_MIN_SIZE = mainJNI.Solver_CHOOSE_MIN_SIZE_get()
 
static final int CHOOSE_MAX_SIZE = mainJNI.Solver_CHOOSE_MAX_SIZE_get()
 
static final int CHOOSE_MAX_REGRET_ON_MIN = mainJNI.Solver_CHOOSE_MAX_REGRET_ON_MIN_get()
 
static final int CHOOSE_PATH = mainJNI.Solver_CHOOSE_PATH_get()
 
static final int INT_VALUE_DEFAULT = mainJNI.Solver_INT_VALUE_DEFAULT_get()
 IntValueStrategy.
 
static final int INT_VALUE_SIMPLE = mainJNI.Solver_INT_VALUE_SIMPLE_get()
 
static final int ASSIGN_MIN_VALUE = mainJNI.Solver_ASSIGN_MIN_VALUE_get()
 
static final int ASSIGN_MAX_VALUE = mainJNI.Solver_ASSIGN_MAX_VALUE_get()
 
static final int ASSIGN_RANDOM_VALUE = mainJNI.Solver_ASSIGN_RANDOM_VALUE_get()
 
static final int ASSIGN_CENTER_VALUE = mainJNI.Solver_ASSIGN_CENTER_VALUE_get()
 
static final int SPLIT_LOWER_HALF = mainJNI.Solver_SPLIT_LOWER_HALF_get()
 
static final int SPLIT_UPPER_HALF = mainJNI.Solver_SPLIT_UPPER_HALF_get()
 
static final int CHOOSE_STATIC_GLOBAL_BEST = mainJNI.Solver_CHOOSE_STATIC_GLOBAL_BEST_get()
 EvaluatorStrategy.
 
static final int CHOOSE_DYNAMIC_GLOBAL_BEST = mainJNI.Solver_CHOOSE_DYNAMIC_GLOBAL_BEST_get()
 
static final int SEQUENCE_DEFAULT = mainJNI.Solver_SEQUENCE_DEFAULT_get()
 SequenceStrategy.
 
static final int SEQUENCE_SIMPLE = mainJNI.Solver_SEQUENCE_SIMPLE_get()
 
static final int CHOOSE_MIN_SLACK_RANK_FORWARD = mainJNI.Solver_CHOOSE_MIN_SLACK_RANK_FORWARD_get()
 
static final int CHOOSE_RANDOM_RANK_FORWARD = mainJNI.Solver_CHOOSE_RANDOM_RANK_FORWARD_get()
 
static final int INTERVAL_DEFAULT = mainJNI.Solver_INTERVAL_DEFAULT_get()
 IntervalStrategy.
 
static final int INTERVAL_SIMPLE = mainJNI.Solver_INTERVAL_SIMPLE_get()
 
static final int INTERVAL_SET_TIMES_FORWARD = mainJNI.Solver_INTERVAL_SET_TIMES_FORWARD_get()
 
static final int INTERVAL_SET_TIMES_BACKWARD = mainJNI.Solver_INTERVAL_SET_TIMES_BACKWARD_get()
 
static final int TWOOPT = mainJNI.Solver_TWOOPT_get()
 LocalSearchOperators.
 
static final int OROPT = mainJNI.Solver_OROPT_get()
 
static final int RELOCATE = mainJNI.Solver_RELOCATE_get()
 
static final int EXCHANGE = mainJNI.Solver_EXCHANGE_get()
 
static final int CROSS = mainJNI.Solver_CROSS_get()
 
static final int MAKEACTIVE = mainJNI.Solver_MAKEACTIVE_get()
 
static final int MAKEINACTIVE = mainJNI.Solver_MAKEINACTIVE_get()
 
static final int MAKECHAININACTIVE = mainJNI.Solver_MAKECHAININACTIVE_get()
 
static final int SWAPACTIVE = mainJNI.Solver_SWAPACTIVE_get()
 
static final int EXTENDEDSWAPACTIVE = mainJNI.Solver_EXTENDEDSWAPACTIVE_get()
 
static final int PATHLNS = mainJNI.Solver_PATHLNS_get()
 
static final int FULLPATHLNS = mainJNI.Solver_FULLPATHLNS_get()
 
static final int UNACTIVELNS = mainJNI.Solver_UNACTIVELNS_get()
 
static final int INCREMENT = mainJNI.Solver_INCREMENT_get()
 
static final int DECREMENT = mainJNI.Solver_DECREMENT_get()
 
static final int SIMPLELNS = mainJNI.Solver_SIMPLELNS_get()
 
static final int LK = mainJNI.Solver_LK_get()
 EvaluatorLocalSearchOperators.
 
static final int TSPOPT = mainJNI.Solver_TSPOPT_get()
 
static final int TSPLNS = mainJNI.Solver_TSPLNS_get()
 
static final int GE = mainJNI.Solver_GE_get()
 LocalSearchFilterBound.
 
static final int LE = mainJNI.Solver_LE_get()
 
static final int EQ = mainJNI.Solver_EQ_get()
 
static final int DELAYED_PRIORITY = mainJNI.Solver_DELAYED_PRIORITY_get()
 DemonPriority.
 
static final int VAR_PRIORITY = mainJNI.Solver_VAR_PRIORITY_get()
 
static final int NORMAL_PRIORITY = mainJNI.Solver_NORMAL_PRIORITY_get()
 
static final int ENDS_AFTER_END = mainJNI.Solver_ENDS_AFTER_END_get()
 BinaryIntervalRelation.
 
static final int ENDS_AFTER_START = mainJNI.Solver_ENDS_AFTER_START_get()
 
static final int ENDS_AT_END = mainJNI.Solver_ENDS_AT_END_get()
 
static final int ENDS_AT_START = mainJNI.Solver_ENDS_AT_START_get()
 
static final int STARTS_AFTER_END = mainJNI.Solver_STARTS_AFTER_END_get()
 
static final int STARTS_AFTER_START = mainJNI.Solver_STARTS_AFTER_START_get()
 
static final int STARTS_AT_END = mainJNI.Solver_STARTS_AT_END_get()
 
static final int STARTS_AT_START = mainJNI.Solver_STARTS_AT_START_get()
 
static final int STAYS_IN_SYNC = mainJNI.Solver_STAYS_IN_SYNC_get()
 
static final int ENDS_AFTER = mainJNI.Solver_ENDS_AFTER_get()
 UnaryIntervalRelation.
 
static final int ENDS_AT = mainJNI.Solver_ENDS_AT_get()
 
static final int ENDS_BEFORE = mainJNI.Solver_ENDS_BEFORE_get()
 
static final int STARTS_AFTER = mainJNI.Solver_STARTS_AFTER_get()
 
static final int STARTS_AT = mainJNI.Solver_STARTS_AT_get()
 
static final int STARTS_BEFORE = mainJNI.Solver_STARTS_BEFORE_get()
 
static final int CROSS_DATE = mainJNI.Solver_CROSS_DATE_get()
 
static final int AVOID_DATE = mainJNI.Solver_AVOID_DATE_get()
 
static final int NO_CHANGE = mainJNI.Solver_NO_CHANGE_get()
 DecisionModification.
 
static final int KEEP_LEFT = mainJNI.Solver_KEEP_LEFT_get()
 
static final int KEEP_RIGHT = mainJNI.Solver_KEEP_RIGHT_get()
 
static final int KILL_BOTH = mainJNI.Solver_KILL_BOTH_get()
 
static final int SWITCH_BRANCHES = mainJNI.Solver_SWITCH_BRANCHES_get()
 
static final int SENTINEL = mainJNI.Solver_SENTINEL_get()
 MarkerType.
 
static final int SIMPLE_MARKER = mainJNI.Solver_SIMPLE_MARKER_get()
 
static final int CHOICE_POINT = mainJNI.Solver_CHOICE_POINT_get()
 
static final int REVERSIBLE_ACTION = mainJNI.Solver_REVERSIBLE_ACTION_get()
 
static final int OUTSIDE_SEARCH = mainJNI.Solver_OUTSIDE_SEARCH_get()
 SolverState.
 
static final int IN_ROOT_NODE = mainJNI.Solver_IN_ROOT_NODE_get()
 
static final int IN_SEARCH = mainJNI.Solver_IN_SEARCH_get()
 
static final int AT_SOLUTION = mainJNI.Solver_AT_SOLUTION_get()
 
static final int NO_MORE_SOLUTIONS = mainJNI.Solver_NO_MORE_SOLUTIONS_get()
 
static final int PROBLEM_INFEASIBLE = mainJNI.Solver_PROBLEM_INFEASIBLE_get()
 
static final int NOT_SET = mainJNI.Solver_NOT_SET_get()
 OptimizationDirection.
 
static final int MAXIMIZATION = mainJNI.Solver_MAXIMIZATION_get()
 
static final int MINIMIZATION = mainJNI.Solver_MINIMIZATION_get()
 

Protected Member Functions

 Solver (long cPtr, boolean cMemoryOwn)
 
void finalize ()
 

Static Protected Member Functions

static long getCPtr (Solver obj)
 
static long swigRelease (Solver obj)
 

Protected Attributes

transient boolean swigCMemOwn
 

Detailed Description

Solver Class

A solver represents the main computation engine. It implements the entire
range of Constraint Programming protocols:

  • Reversibility
  • Propagation
  • Search

    Usually, Constraint Programming code consists of
  • the creation of the Solver,
  • the creation of the decision variables of the model,
  • the creation of the constraints of the model and their addition to the
    solver() through the AddConstraint() method,
  • the creation of the main DecisionBuilder class,
  • the launch of the solve() method with the decision builder.

    For the time being, Solver is neither MT_SAFE nor MT_HOT.

Definition at line 76 of file Solver.java.

Constructor & Destructor Documentation

◆ Solver() [1/3]

com.google.ortools.constraintsolver.Solver.Solver ( long cPtr,
boolean cMemoryOwn )
protected

Definition at line 80 of file Solver.java.

◆ Solver() [2/3]

com.google.ortools.constraintsolver.Solver.Solver ( String name)

Solver API

Definition at line 298 of file Solver.java.

◆ Solver() [3/3]

com.google.ortools.constraintsolver.Solver.Solver ( String name,
com.google.ortools.constraintsolver.ConstraintSolverParameters parameters )

Definition at line 302 of file Solver.java.

Member Function Documentation

◆ accept()

void com.google.ortools.constraintsolver.Solver.accept ( ModelVisitor visitor)

Accepts the given model visitor.

Definition at line 4061 of file Solver.java.

◆ acceptedNeighbors()

long com.google.ortools.constraintsolver.Solver.acceptedNeighbors ( )

The number of accepted neighbors.

Definition at line 719 of file Solver.java.

◆ addCastConstraint()

void com.google.ortools.constraintsolver.Solver.addCastConstraint ( CastConstraint constraint,
IntVar target_var,
IntExpr expr )

Adds 'constraint' to the solver and marks it as a cast constraint, that
is, a constraint created calling Var() on an expression. This is used
internally.

Definition at line 386 of file Solver.java.

◆ addConstraint()

void com.google.ortools.constraintsolver.Solver.addConstraint ( Constraint c)

Adds the constraint 'c' to the model.

After calling this method, and until there is a backtrack that undoes the
addition, any assignment of variables to values must satisfy the given
constraint in order to be considered feasible. There are two fairly
different use cases:

  • the most common use case is modeling: the given constraint is really
    part of the problem that the user is trying to solve. In this use case,
    AddConstraint is called outside of search (i.e., with state() ==
    OUTSIDE_SEARCH
    ). Most users should only use AddConstraint in this
    way. In this case, the constraint will belong to the model forever: it
    cannot be removed by backtracking.

  • a rarer use case is that 'c' is not a real constraint of the model. It
    may be a constraint generated by a branching decision (a constraint whose
    goal is to restrict the search space), a symmetry breaking constraint (a
    constraint that does restrict the search space, but in a way that cannot
    have an impact on the quality of the solutions in the subtree), or an
    inferred constraint that, while having no semantic value to the model (it
    does not restrict the set of solutions), is worth having because we
    believe it may strengthen the propagation. In these cases, it happens
    that the constraint is added during the search (i.e., with state() ==
    IN_SEARCH or state() == IN_ROOT_NODE). When a constraint is
    added during a search, it applies only to the subtree of the search tree
    rooted at the current node, and will be automatically removed by
    backtracking.

    This method does not take ownership of the constraint. If the constraint
    has been created by any factory method (Solver::MakeXXX), it will
    automatically be deleted. However, power users who implement their own
    constraints should do: solver.AddConstraint(solver.RevAlloc(new<br> MyConstraint(...));

Definition at line 377 of file Solver.java.

◆ addLocalSearchMonitor()

void com.google.ortools.constraintsolver.Solver.addLocalSearchMonitor ( LocalSearchMonitor monitor)

Adds the local search monitor to the solver. This is called internally
when a propagation monitor is passed to the Solve() or NewSearch() method.

Definition at line 4210 of file Solver.java.

◆ addPropagationMonitor()

void com.google.ortools.constraintsolver.Solver.addPropagationMonitor ( PropagationMonitor monitor)

Adds the propagation monitor to the solver. This is called internally when
a propagation monitor is passed to the Solve() or NewSearch() method.

Definition at line 4194 of file Solver.java.

◆ balancing_decision()

Decision com.google.ortools.constraintsolver.Solver.balancing_decision ( )

Definition at line 4065 of file Solver.java.

◆ branches()

long com.google.ortools.constraintsolver.Solver.branches ( )

The number of branches explored since the creation of the solver.

Definition at line 658 of file Solver.java.

◆ cache()

ModelCache com.google.ortools.constraintsolver.Solver.cache ( )

Returns the cache of the model.

Definition at line 4135 of file Solver.java.

◆ castExpression()

IntExpr com.google.ortools.constraintsolver.Solver.castExpression ( IntVar var)

Internal. If the variables is the result of expr->Var(), this
method returns expr, nullptr otherwise.

Definition at line 4253 of file Solver.java.

◆ checkAssignment()

boolean com.google.ortools.constraintsolver.Solver.checkAssignment ( Assignment solution)

Checks whether the given assignment satisfies all relevant constraints.

Definition at line 606 of file Solver.java.

◆ checkConstraint()

boolean com.google.ortools.constraintsolver.Solver.checkConstraint ( Constraint ct)

Checks whether adding this constraint will lead to an immediate
failure. It will return false if the model is already inconsistent, or if
adding the constraint makes it inconsistent.

Definition at line 615 of file Solver.java.

◆ checkFail()

void com.google.ortools.constraintsolver.Solver.checkFail ( )

Definition at line 4277 of file Solver.java.

◆ clear_fail_intercept()

void com.google.ortools.constraintsolver.Solver.clear_fail_intercept ( )

Internal

Definition at line 4073 of file Solver.java.

◆ ClearLocalSearchState()

void com.google.ortools.constraintsolver.Solver.ClearLocalSearchState ( )

Clears the local search state.

Definition at line 4225 of file Solver.java.

◆ ClearNeighbors()

void com.google.ortools.constraintsolver.Solver.ClearNeighbors ( )

Manipulate neighbors count; to be used for testing purposes only.
TODO(user): Find a workaround to avoid exposing this.

Definition at line 701 of file Solver.java.

◆ compose() [1/4]

DecisionBuilder com.google.ortools.constraintsolver.Solver.compose ( DecisionBuilder db1,
DecisionBuilder db2 )

Creates a decision builder which sequentially composes decision builders.
At each leaf of a decision builder, the next decision builder is therefore
called. For instance, Compose(db1, db2) will result in the following tree:
d1 tree |
| \ |
db1 leaves |
| \ |
db2 tree db2 tree db2 tree |

Definition at line 3182 of file Solver.java.

◆ compose() [2/4]

DecisionBuilder com.google.ortools.constraintsolver.Solver.compose ( DecisionBuilder db1,
DecisionBuilder db2,
DecisionBuilder db3 )

Definition at line 3192 of file Solver.java.

◆ compose() [3/4]

DecisionBuilder com.google.ortools.constraintsolver.Solver.compose ( DecisionBuilder db1,
DecisionBuilder db2,
DecisionBuilder db3,
DecisionBuilder db4 )

Definition at line 3203 of file Solver.java.

◆ compose() [4/4]

DecisionBuilder com.google.ortools.constraintsolver.Solver.compose ( DecisionBuilder[] dbs)

Definition at line 3215 of file Solver.java.

◆ concatenateOperators() [1/3]

LocalSearchOperator com.google.ortools.constraintsolver.Solver.concatenateOperators ( LocalSearchOperator[] ops)

Creates a local search operator which concatenates a vector of operators.
Each operator from the vector is called sequentially. By default, when a
neighbor is found the neighborhood exploration restarts from the last
active operator (the one which produced the neighbor).
This can be overridden by setting restart to true to force the exploration
to start from the first operator in the vector.

The default behavior can also be overridden using an evaluation callback
to set the order in which the operators are explored (the callback is
called in LocalSearchOperator::Start()). The first argument of the
callback is the index of the operator which produced the last move, the
second argument is the index of the operator to be evaluated. Ownership of
the callback is taken by ConcatenateOperators.

Example:

const int kPriorities = {10, 100, 10, 0};
int64_t Evaluate(int active_operator, int current_operator) {
return kPriorities[current_operator];
}

LocalSearchOperator* concat =
solver.ConcatenateOperators(operators,
NewPermanentCallback(&Evaluate));

The elements of the vector operators will be sorted by increasing priority
and explored in that order (tie-breaks are handled by keeping the relative
operator order in the vector). This would result in the following order:
operators[3], operators[0], operators[2], operators[1].

Definition at line 3714 of file Solver.java.

◆ concatenateOperators() [2/3]

LocalSearchOperator com.google.ortools.constraintsolver.Solver.concatenateOperators ( LocalSearchOperator[] ops,
boolean restart )

Definition at line 3719 of file Solver.java.

◆ concatenateOperators() [3/3]

LocalSearchOperator com.google.ortools.constraintsolver.Solver.concatenateOperators ( LocalSearchOperator[] ops,
IntIntToLongFunction evaluator )

Definition at line 3724 of file Solver.java.

◆ const_parameters()

SWIGTYPE_p_operations_research__ConstraintSolverParameters com.google.ortools.constraintsolver.Solver.const_parameters ( )

Definition at line 322 of file Solver.java.

◆ constraints()

int com.google.ortools.constraintsolver.Solver.constraints ( )

Counts the number of constraints that have been added
to the solver before the search.

Definition at line 4054 of file Solver.java.

◆ context()

String com.google.ortools.constraintsolver.Solver.context ( )

Gets the current context of the search.

Definition at line 748 of file Solver.java.

◆ currentlyInSolve()

boolean com.google.ortools.constraintsolver.Solver.currentlyInSolve ( )

Returns true whether the current search has been
created using a Solve() call instead of a NewSearch one. It
returns false if the solver is not in search at all.

Definition at line 4046 of file Solver.java.

◆ defaultSolverParameters()

static com.google.ortools.constraintsolver.ConstraintSolverParameters com.google.ortools.constraintsolver.Solver.defaultSolverParameters ( )
static

Create a ConstraintSolverParameters proto with all the default values.

Definition at line 329 of file Solver.java.

◆ delete()

synchronized void com.google.ortools.constraintsolver.Solver.delete ( )

Definition at line 106 of file Solver.java.

◆ demon_runs()

long com.google.ortools.constraintsolver.Solver.demon_runs ( int p)

The number of demons executed during search for a given priority.

Definition at line 679 of file Solver.java.

◆ endSearch()

void com.google.ortools.constraintsolver.Solver.endSearch ( )

Definition at line 548 of file Solver.java.

◆ exportProfilingOverview()

void com.google.ortools.constraintsolver.Solver.exportProfilingOverview ( String filename)

Exports the profiling information in a human readable overview.
The parameter profile_level used to create the solver must be
set to true.

Definition at line 4030 of file Solver.java.

◆ fail()

void com.google.ortools.constraintsolver.Solver.fail ( )

Abandon the current branch in the search tree. A backtrack will follow.

Definition at line 629 of file Solver.java.

◆ fail_stamp()

long com.google.ortools.constraintsolver.Solver.fail_stamp ( )

The fail_stamp() is incremented after each backtrack.

Definition at line 734 of file Solver.java.

◆ failures()

long com.google.ortools.constraintsolver.Solver.failures ( )

The number of failures encountered since the creation of the solver.

Definition at line 686 of file Solver.java.

◆ filteredNeighbors()

long com.google.ortools.constraintsolver.Solver.filteredNeighbors ( )

The number of filtered neighbors (neighbors accepted by filters).

Definition at line 712 of file Solver.java.

◆ finalize()

void com.google.ortools.constraintsolver.Solver.finalize ( )
protected

Definition at line 102 of file Solver.java.

◆ finishCurrentSearch()

void com.google.ortools.constraintsolver.Solver.finishCurrentSearch ( )

Tells the solver to kill or restart the current search.

Definition at line 4261 of file Solver.java.

◆ getCPtr()

static long com.google.ortools.constraintsolver.Solver.getCPtr ( Solver obj)
staticprotected

Definition at line 85 of file Solver.java.

◆ getLocalSearchMonitor()

LocalSearchMonitor com.google.ortools.constraintsolver.Solver.getLocalSearchMonitor ( )

Returns the local search monitor.

Definition at line 4201 of file Solver.java.

◆ GetOrCreateLocalSearchState()

Assignment com.google.ortools.constraintsolver.Solver.GetOrCreateLocalSearchState ( )

Returns (or creates) an assignment representing the state of local search.

Definition at line 4217 of file Solver.java.

◆ getPropagationMonitor()

PropagationMonitor com.google.ortools.constraintsolver.Solver.getPropagationMonitor ( )

Returns the propagation monitor.

Definition at line 4185 of file Solver.java.

◆ getTmpVector()

long[] com.google.ortools.constraintsolver.Solver.getTmpVector ( )

Unsafe temporary vector. It is used to avoid leaks in operations
that need storage and that may fail. See IntVar::SetValues() for
instance. It is not locked; do not use in a multi-threaded or reentrant
setup.

Definition at line 4245 of file Solver.java.

◆ hasName()

boolean com.google.ortools.constraintsolver.Solver.hasName ( PropagationBaseObject object)

Returns whether the object has been named or not.

Definition at line 4095 of file Solver.java.

◆ IncrementNeighbors()

void com.google.ortools.constraintsolver.Solver.IncrementNeighbors ( )

Definition at line 705 of file Solver.java.

◆ instrumentsDemons()

boolean com.google.ortools.constraintsolver.Solver.instrumentsDemons ( )

Returns whether we are instrumenting demons.

Definition at line 4143 of file Solver.java.

◆ instrumentsVariables()

boolean com.google.ortools.constraintsolver.Solver.instrumentsVariables ( )

Returns whether we are tracing variables.

Definition at line 4164 of file Solver.java.

◆ isLocalSearchProfilingEnabled()

boolean com.google.ortools.constraintsolver.Solver.isLocalSearchProfilingEnabled ( )

Returns whether we are profiling local search.

Definition at line 4157 of file Solver.java.

◆ isProfilingEnabled()

boolean com.google.ortools.constraintsolver.Solver.isProfilingEnabled ( )

Returns whether we are profiling the solver.

Definition at line 4150 of file Solver.java.

◆ keepAliveDecisionBuilder() [1/2]

void com.google.ortools.constraintsolver.Solver.keepAliveDecisionBuilder ( DecisionBuilder db)

Definition at line 200 of file Solver.java.

◆ keepAliveDecisionBuilder() [2/2]

void com.google.ortools.constraintsolver.Solver.keepAliveDecisionBuilder ( DecisionBuilder[] dbs)

Definition at line 206 of file Solver.java.

◆ localSearchProfile()

String com.google.ortools.constraintsolver.Solver.localSearchProfile ( )

Returns local search profiling information in a human readable format.

Definition at line 4037 of file Solver.java.

◆ makeAbs()

IntExpr com.google.ortools.constraintsolver.Solver.makeAbs ( IntExpr expr)

|expr|

Definition at line 942 of file Solver.java.

◆ makeAbsEquality()

Constraint com.google.ortools.constraintsolver.Solver.makeAbsEquality ( IntVar var,
IntVar abs_var )

Creates the constraint abs(var) == abs_var.

Definition at line 1596 of file Solver.java.

◆ MakeAcceptFilter()

LocalSearchFilter com.google.ortools.constraintsolver.Solver.MakeAcceptFilter ( )

Local Search Filters

Definition at line 3925 of file Solver.java.

◆ makeAllDifferent() [1/2]

Constraint com.google.ortools.constraintsolver.Solver.makeAllDifferent ( IntVar[] vars)

All variables are pairwise different. This corresponds to the
stronger version of the propagation algorithm.

Definition at line 1841 of file Solver.java.

◆ makeAllDifferent() [2/2]

Constraint com.google.ortools.constraintsolver.Solver.makeAllDifferent ( IntVar[] vars,
boolean stronger_propagation )

All variables are pairwise different. If 'stronger_propagation'
is true, stronger, and potentially slower propagation will
occur. This API will be deprecated in the future.

Definition at line 1851 of file Solver.java.

◆ makeAllDifferentExcept()

Constraint com.google.ortools.constraintsolver.Solver.makeAllDifferentExcept ( IntVar[] vars,
long escape_value )

All variables are pairwise different, unless they are assigned to
the escape value.

Definition at line 1860 of file Solver.java.

◆ makeAllowedAssignment()

Constraint com.google.ortools.constraintsolver.Solver.makeAllowedAssignment ( IntVar[] vars,
IntTupleSet tuples )

This method creates a constraint where the graph of the relation
between the variables is given in extension. There are 'arity'
variables involved in the relation and the graph is given by a
integer tuple set.

Definition at line 2099 of file Solver.java.

◆ makeAllSolutionCollector() [1/2]

SolutionCollector com.google.ortools.constraintsolver.Solver.makeAllSolutionCollector ( )

Collect all solutions of the search. The variables will need to
be added later.

Definition at line 2651 of file Solver.java.

◆ makeAllSolutionCollector() [2/2]

SolutionCollector com.google.ortools.constraintsolver.Solver.makeAllSolutionCollector ( Assignment assignment)

Collect all solutions of the search.

Definition at line 2642 of file Solver.java.

◆ makeAssignment() [1/2]

Assignment com.google.ortools.constraintsolver.Solver.makeAssignment ( )

This method creates an empty assignment.

Definition at line 2522 of file Solver.java.

◆ makeAssignment() [2/2]

Assignment com.google.ortools.constraintsolver.Solver.makeAssignment ( Assignment a)

This method creates an assignment which is a copy of 'a'.

Definition at line 2530 of file Solver.java.

◆ makeAssignVariablesValues()

Decision com.google.ortools.constraintsolver.Solver.makeAssignVariablesValues ( IntVar[] vars,
long[] values )

Definition at line 3147 of file Solver.java.

◆ MakeAssignVariablesValuesOrDoNothing()

Decision com.google.ortools.constraintsolver.Solver.MakeAssignVariablesValuesOrDoNothing ( IntVar[] vars,
long[] values )

Definition at line 3152 of file Solver.java.

◆ MakeAssignVariablesValuesOrFail()

Decision com.google.ortools.constraintsolver.Solver.MakeAssignVariablesValuesOrFail ( IntVar[] vars,
long[] values )

Definition at line 3157 of file Solver.java.

◆ makeAssignVariableValue()

Decision com.google.ortools.constraintsolver.Solver.makeAssignVariableValue ( IntVar var,
long val )

Decisions.

Definition at line 3117 of file Solver.java.

◆ MakeAssignVariableValueOrDoNothing()

Decision com.google.ortools.constraintsolver.Solver.MakeAssignVariableValueOrDoNothing ( IntVar var,
long value )

Definition at line 3142 of file Solver.java.

◆ makeAssignVariableValueOrFail()

Decision com.google.ortools.constraintsolver.Solver.makeAssignVariableValueOrFail ( IntVar var,
long value )

Definition at line 3137 of file Solver.java.

◆ makeAtSolutionCallback()

SearchMonitor com.google.ortools.constraintsolver.Solver.makeAtSolutionCallback ( Runnable callback)

Definition at line 3065 of file Solver.java.

◆ MakeBestLexicographicValueSolutionCollector() [1/2]

SolutionCollector com.google.ortools.constraintsolver.Solver.MakeBestLexicographicValueSolutionCollector ( Assignment assignment,
SWIGTYPE_p_std__vectorT_bool_t maximize )

Same as above, but supporting lexicographic objectives; 'maximize'
specifies the optimization direction for each objective in 'assignment'.

Definition at line 2584 of file Solver.java.

◆ MakeBestLexicographicValueSolutionCollector() [2/2]

SolutionCollector com.google.ortools.constraintsolver.Solver.MakeBestLexicographicValueSolutionCollector ( SWIGTYPE_p_std__vectorT_bool_t maximize)

Same as above, but supporting lexicographic objectives; 'maximize'
specifies the optimization direction for each objective.

Definition at line 2605 of file Solver.java.

◆ makeBestValueSolutionCollector() [1/2]

SolutionCollector com.google.ortools.constraintsolver.Solver.makeBestValueSolutionCollector ( Assignment assignment,
boolean maximize )

Collect the solution corresponding to the optimal value of the objective
of 'assignment'; if 'assignment' does not have an objective no solution is
collected. This collector only collects one solution corresponding to the
best objective value (the first one found).

Definition at line 2575 of file Solver.java.

◆ makeBestValueSolutionCollector() [2/2]

SolutionCollector com.google.ortools.constraintsolver.Solver.makeBestValueSolutionCollector ( boolean maximize)

Collect the solution corresponding to the optimal value of the
objective of the internal assignment; if this assignment does not have an
objective no solution is collected. This collector only collects one
solution corresponding to the best objective value (the first one found).
The variables and objective(s) will need to be added later.

Definition at line 2596 of file Solver.java.

◆ makeBetweenCt()

Constraint com.google.ortools.constraintsolver.Solver.makeBetweenCt ( IntExpr expr,
long l,
long u )

(l <= expr <= u)

Definition at line 1642 of file Solver.java.

◆ makeBoolVar() [1/2]

IntVar com.google.ortools.constraintsolver.Solver.makeBoolVar ( )

MakeBoolVar will create a variable with a {0, 1} domain.

Definition at line 822 of file Solver.java.

◆ makeBoolVar() [2/2]

IntVar com.google.ortools.constraintsolver.Solver.makeBoolVar ( String name)

MakeBoolVar will create a variable with a {0, 1} domain.

Definition at line 814 of file Solver.java.

◆ makeBoolVarArray() [1/2]

IntVar[] com.google.ortools.constraintsolver.Solver.makeBoolVarArray ( int count)

Definition at line 147 of file Solver.java.

◆ makeBoolVarArray() [2/2]

IntVar[] com.google.ortools.constraintsolver.Solver.makeBoolVarArray ( int count,
String name )

Definition at line 155 of file Solver.java.

◆ makeBranchesLimit()

RegularLimit com.google.ortools.constraintsolver.Solver.makeBranchesLimit ( long branches)

Creates a search limit that constrains the number of branches
explored in the search tree.

Definition at line 2853 of file Solver.java.

◆ makeCircuit()

Constraint com.google.ortools.constraintsolver.Solver.makeCircuit ( IntVar[] nexts)

Force the "nexts" variable to create a complete Hamiltonian path.

Definition at line 2013 of file Solver.java.

◆ makeClosureDemon()

Demon com.google.ortools.constraintsolver.Solver.makeClosureDemon ( Runnable closure)

Creates a demon from a closure.

Definition at line 1634 of file Solver.java.

◆ makeConditionalExpression()

IntExpr com.google.ortools.constraintsolver.Solver.makeConditionalExpression ( IntVar condition,
IntExpr expr,
long unperformed_value )

Conditional Expr condition ? expr : unperformed_value

Definition at line 1138 of file Solver.java.

◆ makeConstantRestart()

SearchMonitor com.google.ortools.constraintsolver.Solver.makeConstantRestart ( int frequency)

This search monitor will restart the search periodically after 'frequency'
failures.

Definition at line 2831 of file Solver.java.

◆ makeConstraintAdder()

DecisionBuilder com.google.ortools.constraintsolver.Solver.makeConstraintAdder ( Constraint ct)

Returns a decision builder that will add the given constraint to
the model.

Definition at line 3457 of file Solver.java.

◆ makeConstraintInitialPropagateCallback()

Demon com.google.ortools.constraintsolver.Solver.makeConstraintInitialPropagateCallback ( Constraint ct)

This method is a specialized case of the MakeConstraintDemon
method to call the InitiatePropagate of the constraint 'ct'.

Definition at line 1616 of file Solver.java.

◆ makeConvexPiecewiseExpr()

IntExpr com.google.ortools.constraintsolver.Solver.makeConvexPiecewiseExpr ( IntExpr expr,
long early_cost,
long early_date,
long late_date,
long late_cost )

Convex piecewise function.

Definition at line 1102 of file Solver.java.

◆ makeCount() [1/2]

Constraint com.google.ortools.constraintsolver.Solver.makeCount ( IntVar[] vars,
long value,
IntVar max_count )

|{i | vars[i] == value}| == max_count

Definition at line 1748 of file Solver.java.

◆ makeCount() [2/2]

Constraint com.google.ortools.constraintsolver.Solver.makeCount ( IntVar[] vars,
long value,
long max_count )

|{i | vars[i] == value}| == max_count

Definition at line 1740 of file Solver.java.

◆ makeCover()

Constraint com.google.ortools.constraintsolver.Solver.makeCover ( IntervalVar[] vars,
IntervalVar target_var )

This constraint states that the target_var is the convex hull of
the intervals. If none of the interval variables is performed,
then the target var is unperformed too. Also, if the target
variable is unperformed, then all the intervals variables are
unperformed too.

Definition at line 2506 of file Solver.java.

◆ makeCumulative() [1/6]

Constraint com.google.ortools.constraintsolver.Solver.makeCumulative ( IntervalVar[] intervals,
int[] demands,
IntVar capacity,
String name )

This constraint enforces that, for any integer t, the sum of the demands
corresponding to an interval containing t does not exceed the given
capacity.

Intervals and demands should be vectors of equal size.

Demands should only contain non-negative values. Zero values are
supported, and the corresponding intervals are filtered out, as they
neither impact nor are impacted by this constraint.

Definition at line 2466 of file Solver.java.

◆ makeCumulative() [2/6]

Constraint com.google.ortools.constraintsolver.Solver.makeCumulative ( IntervalVar[] intervals,
int[] demands,
long capacity,
String name )

This constraint forces that, for any integer t, the sum of the demands
corresponding to an interval containing t does not exceed the given
capacity.

Intervals and demands should be vectors of equal size.

Demands should only contain non-negative values. Zero values are
supported, and the corresponding intervals are filtered out, as they
neither impact nor are impacted by this constraint.

Definition at line 2434 of file Solver.java.

◆ makeCumulative() [3/6]

Constraint com.google.ortools.constraintsolver.Solver.makeCumulative ( IntervalVar[] intervals,
IntVar[] demands,
IntVar capacity,
String name )

This constraint enforces that, for any integer t, the sum of demands
corresponding to an interval containing t does not exceed the given
capacity.

Intervals and demands should be vectors of equal size.

Demands should be positive.

Definition at line 2494 of file Solver.java.

◆ makeCumulative() [4/6]

Constraint com.google.ortools.constraintsolver.Solver.makeCumulative ( IntervalVar[] intervals,
IntVar[] demands,
long capacity,
String name )

This constraint enforces that, for any integer t, the sum of demands
corresponding to an interval containing t does not exceed the given
capacity.

Intervals and demands should be vectors of equal size.

Demands should be positive.

Definition at line 2480 of file Solver.java.

◆ makeCumulative() [5/6]

Constraint com.google.ortools.constraintsolver.Solver.makeCumulative ( IntervalVar[] intervals,
long[] demands,
IntVar capacity,
String name )

This constraint forces that, for any integer t, the sum of the demands
corresponding to an interval containing t does not exceed the given
capacity.

Intervals and demands should be vectors of equal size.

Demands should only contain non-negative values. Zero values are
supported, and the corresponding intervals are filtered out, as they
neither impact nor are impacted by this constraint.

Definition at line 2450 of file Solver.java.

◆ makeCumulative() [6/6]

Constraint com.google.ortools.constraintsolver.Solver.makeCumulative ( IntervalVar[] intervals,
long[] demands,
long capacity,
String name )

This constraint forces that, for any integer t, the sum of the demands
corresponding to an interval containing t does not exceed the given
capacity.

Intervals and demands should be vectors of equal size.

Demands should only contain non-negative values. Zero values are
supported, and the corresponding intervals are filtered out, as they
neither impact nor are impacted by this constraint.

Definition at line 2418 of file Solver.java.

◆ makeCustomLimit()

SearchLimit com.google.ortools.constraintsolver.Solver.makeCustomLimit ( BooleanSupplier limiter)

Callback-based search limit. Search stops when limiter returns true; if
this happens at a leaf the corresponding solution will be rejected.

Definition at line 2976 of file Solver.java.

◆ makeDecision()

Decision com.google.ortools.constraintsolver.Solver.makeDecision ( Consumer< Solver > apply,
Consumer< Solver > refute )

Definition at line 3167 of file Solver.java.

◆ makeDecisionBuilderFromAssignment()

DecisionBuilder com.google.ortools.constraintsolver.Solver.makeDecisionBuilderFromAssignment ( Assignment assignment,
DecisionBuilder db,
IntVar[] vars )

Returns a decision builder for which the left-most leaf corresponds
to assignment, the rest of the tree being explored using 'db'.

Definition at line 3444 of file Solver.java.

◆ makeDefaultPhase() [1/2]

DecisionBuilder com.google.ortools.constraintsolver.Solver.makeDefaultPhase ( IntVar[] vars)

Definition at line 3326 of file Solver.java.

◆ makeDefaultPhase() [2/2]

DecisionBuilder com.google.ortools.constraintsolver.Solver.makeDefaultPhase ( IntVar[] vars,
DefaultPhaseParameters parameters )

Definition at line 3331 of file Solver.java.

◆ makeDefaultRegularLimitParameters()

com.google.ortools.constraintsolver.RegularLimitParameters com.google.ortools.constraintsolver.Solver.makeDefaultRegularLimitParameters ( )

Creates a regular limit proto containing default values.

Definition at line 2929 of file Solver.java.

◆ makeDefaultSolutionPool()

SolutionPool com.google.ortools.constraintsolver.Solver.makeDefaultSolutionPool ( )

Solution Pool.

Definition at line 3860 of file Solver.java.

◆ makeDelayedConstraintInitialPropagateCallback()

Demon com.google.ortools.constraintsolver.Solver.makeDelayedConstraintInitialPropagateCallback ( Constraint ct)

This method is a specialized case of the MakeConstraintDemon
method to call the InitiatePropagate of the constraint 'ct' with
low priority.

Definition at line 1626 of file Solver.java.

◆ makeDelayedPathCumul()

Constraint com.google.ortools.constraintsolver.Solver.makeDelayedPathCumul ( IntVar[] nexts,
IntVar[] active,
IntVar[] cumuls,
IntVar[] transits )

Delayed version of the same constraint: propagation on the nexts variables
is delayed until all constraints have propagated.

Definition at line 2042 of file Solver.java.

◆ makeDeviation()

Constraint com.google.ortools.constraintsolver.Solver.makeDeviation ( IntVar[] vars,
IntVar deviation_var,
long total_sum )

Deviation constraint:
sum_i |n * vars[i] - total_sum| <= deviation_var and
sum_i vars[i] == total_sum
n = #vars

Definition at line 1832 of file Solver.java.

◆ makeDifference() [1/2]

IntExpr com.google.ortools.constraintsolver.Solver.makeDifference ( IntExpr left,
IntExpr right )

left - right

Definition at line 886 of file Solver.java.

◆ makeDifference() [2/2]

IntExpr com.google.ortools.constraintsolver.Solver.makeDifference ( long value,
IntExpr expr )

value - expr

Definition at line 894 of file Solver.java.

◆ makeDisjunctiveConstraint()

DisjunctiveConstraint com.google.ortools.constraintsolver.Solver.makeDisjunctiveConstraint ( IntervalVar[] intervals,
String name )

This constraint forces all interval vars into an non-overlapping
sequence. Intervals with zero duration can be scheduled anywhere.

Definition at line 2392 of file Solver.java.

◆ makeDistribute() [1/8]

Constraint com.google.ortools.constraintsolver.Solver.makeDistribute ( IntVar[] vars,
int[] card_min,
int[] card_max )

Aggregated version of count with bounded cardinalities:
forall j in 0 .. card_size - 1:
card_min[j] <= |{i | v[i] == j}| <= card_max[j]

Definition at line 1801 of file Solver.java.

◆ makeDistribute() [2/8]

Constraint com.google.ortools.constraintsolver.Solver.makeDistribute ( IntVar[] vars,
int[] values,
int[] card_min,
int[] card_max )

Aggregated version of count with bounded cardinalities:
forall j in 0 .. card_size - 1:
card_min[j] <= |{i | v[i] == values[j]}| <= card_max[j]

Definition at line 1821 of file Solver.java.

◆ makeDistribute() [3/8]

Constraint com.google.ortools.constraintsolver.Solver.makeDistribute ( IntVar[] vars,
int[] values,
IntVar[] cards )

Aggregated version of count: |{i | v[i] == values[j]}| == cards[j]

Definition at line 1764 of file Solver.java.

◆ makeDistribute() [4/8]

Constraint com.google.ortools.constraintsolver.Solver.makeDistribute ( IntVar[] vars,
IntVar[] cards )

Aggregated version of count: |{i | v[i] == j}| == cards[j]

Definition at line 1772 of file Solver.java.

◆ makeDistribute() [5/8]

Constraint com.google.ortools.constraintsolver.Solver.makeDistribute ( IntVar[] vars,
long card_min,
long card_max,
long card_size )

Aggregated version of count with bounded cardinalities:
forall j in 0 .. card_size - 1: card_min <= |{i | v[i] == j}| <= card_max

Definition at line 1781 of file Solver.java.

◆ makeDistribute() [6/8]

Constraint com.google.ortools.constraintsolver.Solver.makeDistribute ( IntVar[] vars,
long[] card_min,
long[] card_max )

Aggregated version of count with bounded cardinalities:
forall j in 0 .. card_size - 1:
card_min[j] <= |{i | v[i] == j}| <= card_max[j]

Definition at line 1791 of file Solver.java.

◆ makeDistribute() [7/8]

Constraint com.google.ortools.constraintsolver.Solver.makeDistribute ( IntVar[] vars,
long[] values,
IntVar[] cards )

Aggregated version of count: |{i | v[i] == values[j]}| == cards[j]

Definition at line 1756 of file Solver.java.

◆ makeDistribute() [8/8]

Constraint com.google.ortools.constraintsolver.Solver.makeDistribute ( IntVar[] vars,
long[] values,
long[] card_min,
long[] card_max )

Aggregated version of count with bounded cardinalities:
forall j in 0 .. card_size - 1:
card_min[j] <= |{i | v[i] == values[j]}| <= card_max[j]

Definition at line 1811 of file Solver.java.

◆ makeDiv() [1/2]

IntExpr com.google.ortools.constraintsolver.Solver.makeDiv ( IntExpr expr,
long value )

expr / value (integer division)

Definition at line 926 of file Solver.java.

◆ makeDiv() [2/2]

IntExpr com.google.ortools.constraintsolver.Solver.makeDiv ( IntExpr numerator,
IntExpr denominator )

numerator / denominator (integer division). Terms need to be positive.

Definition at line 934 of file Solver.java.

◆ makeElement() [1/5]

IntExpr com.google.ortools.constraintsolver.Solver.makeElement ( int[] values,
IntVar index )

values[index]

Definition at line 974 of file Solver.java.

◆ makeElement() [2/5]

IntExpr com.google.ortools.constraintsolver.Solver.makeElement ( IntVar[] vars,
IntVar index )

vars[expr]

Definition at line 1013 of file Solver.java.

◆ makeElement() [3/5]

IntExpr com.google.ortools.constraintsolver.Solver.makeElement ( long[] values,
IntVar index )

values[index]

Definition at line 966 of file Solver.java.

◆ makeElement() [4/5]

IntExpr com.google.ortools.constraintsolver.Solver.makeElement ( LongBinaryOperator values,
IntVar index1,
IntVar index2 )

2D version of function-based element expression, values(expr1, expr2).

Definition at line 1005 of file Solver.java.

◆ makeElement() [5/5]

IntExpr com.google.ortools.constraintsolver.Solver.makeElement ( LongUnaryOperator values,
IntVar index )

Function-based element. The constraint takes ownership of the
callback. The callback must be able to cope with any possible
value in the domain of 'index' (potentially negative ones too).

Definition at line 984 of file Solver.java.

◆ makeElementEquality() [1/4]

Constraint com.google.ortools.constraintsolver.Solver.makeElementEquality ( int[] vals,
IntVar index,
IntVar target )

Definition at line 1578 of file Solver.java.

◆ makeElementEquality() [2/4]

Constraint com.google.ortools.constraintsolver.Solver.makeElementEquality ( IntVar[] vars,
IntVar index,
IntVar target )

Definition at line 1583 of file Solver.java.

◆ makeElementEquality() [3/4]

Constraint com.google.ortools.constraintsolver.Solver.makeElementEquality ( IntVar[] vars,
IntVar index,
long target )

Definition at line 1588 of file Solver.java.

◆ makeElementEquality() [4/4]

Constraint com.google.ortools.constraintsolver.Solver.makeElementEquality ( long[] vals,
IntVar index,
IntVar target )

Definition at line 1573 of file Solver.java.

◆ makeEnterSearchCallback()

SearchMonitor com.google.ortools.constraintsolver.Solver.makeEnterSearchCallback ( Runnable callback)

--— Callback-based search monitors --—

Definition at line 3055 of file Solver.java.

◆ makeEquality() [1/4]

Constraint com.google.ortools.constraintsolver.Solver.makeEquality ( IntervalVar var1,
IntervalVar var2 )

This constraints states that the two interval variables are equal.

Definition at line 2514 of file Solver.java.

◆ makeEquality() [2/4]

Constraint com.google.ortools.constraintsolver.Solver.makeEquality ( IntExpr expr,
int value )

expr == value

Definition at line 1215 of file Solver.java.

◆ makeEquality() [3/4]

Constraint com.google.ortools.constraintsolver.Solver.makeEquality ( IntExpr expr,
long value )

expr == value

Definition at line 1207 of file Solver.java.

◆ makeEquality() [4/4]

Constraint com.google.ortools.constraintsolver.Solver.makeEquality ( IntExpr left,
IntExpr right )

left == right

Definition at line 1199 of file Solver.java.

◆ makeExitSearchCallback()

SearchMonitor com.google.ortools.constraintsolver.Solver.makeExitSearchCallback ( Runnable callback)

Definition at line 3060 of file Solver.java.

◆ makeFailDecision()

Decision com.google.ortools.constraintsolver.Solver.makeFailDecision ( )

Definition at line 3162 of file Solver.java.

◆ makeFailuresLimit()

RegularLimit com.google.ortools.constraintsolver.Solver.makeFailuresLimit ( long failures)

Creates a search limit that constrains the number of failures
that can happen when exploring the search tree.

Definition at line 2862 of file Solver.java.

◆ makeFalseConstraint() [1/2]

Constraint com.google.ortools.constraintsolver.Solver.makeFalseConstraint ( )

This constraint always fails.

Definition at line 1154 of file Solver.java.

◆ makeFalseConstraint() [2/2]

Constraint com.google.ortools.constraintsolver.Solver.makeFalseConstraint ( String explanation)

Definition at line 1159 of file Solver.java.

◆ makeFirstSolutionCollector() [1/2]

SolutionCollector com.google.ortools.constraintsolver.Solver.makeFirstSolutionCollector ( )

Collect the first solution of the search. The variables will need to
be added later.

Definition at line 2547 of file Solver.java.

◆ makeFirstSolutionCollector() [2/2]

SolutionCollector com.google.ortools.constraintsolver.Solver.makeFirstSolutionCollector ( Assignment assignment)

Collect the first solution of the search.

Definition at line 2538 of file Solver.java.

◆ makeFixedDurationEndSyncedOnEndIntervalVar()

IntervalVar com.google.ortools.constraintsolver.Solver.makeFixedDurationEndSyncedOnEndIntervalVar ( IntervalVar interval_var,
long duration,
long offset )

Creates an interval var with a fixed duration whose end is
synchronized with the end of another interval, with a given
offset. The performed status is also in sync with the performed
status of the given interval variable.

Definition at line 2288 of file Solver.java.

◆ makeFixedDurationEndSyncedOnStartIntervalVar()

IntervalVar com.google.ortools.constraintsolver.Solver.makeFixedDurationEndSyncedOnStartIntervalVar ( IntervalVar interval_var,
long duration,
long offset )

Creates an interval var with a fixed duration whose end is
synchronized with the start of another interval, with a given
offset. The performed status is also in sync with the performed
status of the given interval variable.

Definition at line 2277 of file Solver.java.

◆ makeFixedDurationIntervalVar() [1/3]

IntervalVar com.google.ortools.constraintsolver.Solver.makeFixedDurationIntervalVar ( IntVar start_variable,
long duration,
IntVar performed_variable,
String name )

Creates an interval var with a fixed duration, and performed_variable.
The duration must be greater than 0.

Definition at line 2218 of file Solver.java.

◆ makeFixedDurationIntervalVar() [2/3]

IntervalVar com.google.ortools.constraintsolver.Solver.makeFixedDurationIntervalVar ( IntVar start_variable,
long duration,
String name )

Creates a performed interval var with a fixed duration. The duration must
be greater than 0.

Definition at line 2209 of file Solver.java.

◆ makeFixedDurationIntervalVar() [3/3]

IntervalVar com.google.ortools.constraintsolver.Solver.makeFixedDurationIntervalVar ( long start_min,
long start_max,
long duration,
boolean optional,
String name )

Creates an interval var with a fixed duration. The duration must
be greater than 0. If optional is true, then the interval can be
performed or unperformed. If optional is false, then the interval
is always performed.

Definition at line 2200 of file Solver.java.

◆ makeFixedDurationIntervalVarArray() [1/2]

IntervalVar[] com.google.ortools.constraintsolver.Solver.makeFixedDurationIntervalVarArray ( int count,
long start_min,
long start_max,
long duration,
boolean optional )

Definition at line 164 of file Solver.java.

◆ makeFixedDurationIntervalVarArray() [2/2]

IntervalVar[] com.google.ortools.constraintsolver.Solver.makeFixedDurationIntervalVarArray ( int count,
long start_min,
long start_max,
long duration,
boolean optional,
String name )

Definition at line 180 of file Solver.java.

◆ makeFixedDurationStartSyncedOnEndIntervalVar()

IntervalVar com.google.ortools.constraintsolver.Solver.makeFixedDurationStartSyncedOnEndIntervalVar ( IntervalVar interval_var,
long duration,
long offset )

Creates an interval var with a fixed duration whose start is
synchronized with the end of another interval, with a given
offset. The performed status is also in sync with the performed
status of the given interval variable.

Definition at line 2266 of file Solver.java.

◆ makeFixedDurationStartSyncedOnStartIntervalVar()

IntervalVar com.google.ortools.constraintsolver.Solver.makeFixedDurationStartSyncedOnStartIntervalVar ( IntervalVar interval_var,
long duration,
long offset )

Creates an interval var with a fixed duration whose start is
synchronized with the start of another interval, with a given
offset. The performed status is also in sync with the performed
status of the given interval variable.

Definition at line 2255 of file Solver.java.

◆ makeFixedInterval()

IntervalVar com.google.ortools.constraintsolver.Solver.makeFixedInterval ( long start,
long duration,
String name )

Creates a fixed and performed interval.

Definition at line 2226 of file Solver.java.

◆ makeGenericTabuSearch()

ObjectiveMonitor com.google.ortools.constraintsolver.Solver.makeGenericTabuSearch ( boolean maximize,
IntVar v,
long step,
IntVar[] tabu_vars,
long forbid_tenure )

Creates a Tabu Search based on the vars |vars|.
A solution is "tabu" if all the vars in |vars| keep their value.

Definition at line 2771 of file Solver.java.

◆ makeGreater() [1/3]

Constraint com.google.ortools.constraintsolver.Solver.makeGreater ( IntExpr expr,
int value )

expr > value

Definition at line 1439 of file Solver.java.

◆ makeGreater() [2/3]

Constraint com.google.ortools.constraintsolver.Solver.makeGreater ( IntExpr expr,
long value )

expr > value

Definition at line 1431 of file Solver.java.

◆ makeGreater() [3/3]

Constraint com.google.ortools.constraintsolver.Solver.makeGreater ( IntExpr left,
IntExpr right )

left > right

Definition at line 1423 of file Solver.java.

◆ makeGreaterOrEqual() [1/3]

Constraint com.google.ortools.constraintsolver.Solver.makeGreaterOrEqual ( IntExpr expr,
int value )

expr >= value

Definition at line 1383 of file Solver.java.

◆ makeGreaterOrEqual() [2/3]

Constraint com.google.ortools.constraintsolver.Solver.makeGreaterOrEqual ( IntExpr expr,
long value )

expr >= value

Definition at line 1375 of file Solver.java.

◆ makeGreaterOrEqual() [3/3]

Constraint com.google.ortools.constraintsolver.Solver.makeGreaterOrEqual ( IntExpr left,
IntExpr right )

left >= right

Definition at line 1367 of file Solver.java.

◆ makeGuidedLocalSearch() [1/4]

ObjectiveMonitor com.google.ortools.constraintsolver.Solver.makeGuidedLocalSearch ( boolean maximize,
IntVar objective,
LongBinaryOperator objective_function,
long step,
IntVar[] vars,
double penalty_factor )

Creates a Guided Local Search monitor.
Description here: http://en.wikipedia.org/wiki/Guided_Local_Search

Definition at line 2802 of file Solver.java.

◆ makeGuidedLocalSearch() [2/4]

ObjectiveMonitor com.google.ortools.constraintsolver.Solver.makeGuidedLocalSearch ( boolean maximize,
IntVar objective,
LongBinaryOperator objective_function,
long step,
IntVar[] vars,
double penalty_factor,
boolean reset_penalties_on_new_best_solution )

Creates a Guided Local Search monitor.
Description here: http://en.wikipedia.org/wiki/Guided_Local_Search

Definition at line 2793 of file Solver.java.

◆ makeGuidedLocalSearch() [3/4]

ObjectiveMonitor com.google.ortools.constraintsolver.Solver.makeGuidedLocalSearch ( boolean maximize,
IntVar objective,
LongTernaryOperator objective_function,
long step,
IntVar[] vars,
IntVar[] secondary_vars,
double penalty_factor )

Definition at line 2812 of file Solver.java.

◆ makeGuidedLocalSearch() [4/4]

ObjectiveMonitor com.google.ortools.constraintsolver.Solver.makeGuidedLocalSearch ( boolean maximize,
IntVar objective,
LongTernaryOperator objective_function,
long step,
IntVar[] vars,
IntVar[] secondary_vars,
double penalty_factor,
boolean reset_penalties_on_new_best_solution )

Definition at line 2807 of file Solver.java.

◆ makeIfThenElseCt()

Constraint com.google.ortools.constraintsolver.Solver.makeIfThenElseCt ( IntVar condition,
IntExpr then_expr,
IntExpr else_expr,
IntVar target_var )

Special cases with arrays of size two.

Definition at line 1030 of file Solver.java.

◆ MakeImprovementLimit()

ImprovementSearchLimit com.google.ortools.constraintsolver.Solver.MakeImprovementLimit ( IntVar objective_var,
boolean maximize,
double objective_scaling_factor,
double objective_offset,
double improvement_rate_coefficient,
int improvement_rate_solutions_distance )

Limits the search based on the improvements of 'objective_var'. Stops the
search when the improvement rate gets lower than a threshold value. This
threshold value is computed based on the improvement rate during the first
phase of the search.

Definition at line 2958 of file Solver.java.

◆ makeIndexExpression()

IntExpr com.google.ortools.constraintsolver.Solver.makeIndexExpression ( IntVar[] vars,
long value )

Returns the expression expr such that vars[expr] == value.
It assumes that vars are all different.

Definition at line 1022 of file Solver.java.

◆ makeIndexOfConstraint()

Constraint com.google.ortools.constraintsolver.Solver.makeIndexOfConstraint ( IntVar[] vars,
IntVar index,
long target )

This constraint is a special case of the element constraint with
an array of integer variables, where the variables are all
different and the index variable is constrained such that
vars[index] == target.

Definition at line 1607 of file Solver.java.

◆ makeIndexOfFirstMaxValueConstraint()

Constraint com.google.ortools.constraintsolver.Solver.makeIndexOfFirstMaxValueConstraint ( IntVar index,
IntVar[] vars )

Creates a constraint that binds the index variable to the index of the
first variable with the maximum value.

Definition at line 1936 of file Solver.java.

◆ makeIndexOfFirstMinValueConstraint()

Constraint com.google.ortools.constraintsolver.Solver.makeIndexOfFirstMinValueConstraint ( IntVar index,
IntVar[] vars )

Creates a constraint that binds the index variable to the index of the
first variable with the minimum value.

Definition at line 1945 of file Solver.java.

◆ makeIntConst() [1/2]

IntVar com.google.ortools.constraintsolver.Solver.makeIntConst ( long val)

IntConst will create a constant expression.

Definition at line 838 of file Solver.java.

◆ makeIntConst() [2/2]

IntVar com.google.ortools.constraintsolver.Solver.makeIntConst ( long val,
String name )

IntConst will create a constant expression.

Definition at line 830 of file Solver.java.

◆ makeIntervalRelaxedMax()

IntervalVar com.google.ortools.constraintsolver.Solver.makeIntervalRelaxedMax ( IntervalVar interval_var)

Creates and returns an interval variable that wraps around the given one,
relaxing the max start and end. Relaxing means making unbounded when
optional. If the variable is non optional, this method returns
interval_var.

More precisely, such an interval variable behaves as follows:
When the underlying must be performed, the returned interval variable
behaves exactly as the underlying;
When the underlying may or may not be performed, the returned interval
variable behaves like the underlying, except that it is unbounded on
the max side;
When the underlying cannot be performed, the returned interval variable
is of duration 0 and must be performed in an interval unbounded on
both sides.

This is very useful for implementing propagators that may only modify
the start min or end min.

Definition at line 2336 of file Solver.java.

◆ makeIntervalRelaxedMin()

IntervalVar com.google.ortools.constraintsolver.Solver.makeIntervalRelaxedMin ( IntervalVar interval_var)

Creates and returns an interval variable that wraps around the given one,
relaxing the min start and end. Relaxing means making unbounded when
optional. If the variable is non-optional, this method returns
interval_var.

More precisely, such an interval variable behaves as follows:
When the underlying must be performed, the returned interval variable
behaves exactly as the underlying;
When the underlying may or may not be performed, the returned interval
variable behaves like the underlying, except that it is unbounded on
the min side;
When the underlying cannot be performed, the returned interval variable
is of duration 0 and must be performed in an interval unbounded on
both sides.

This is very useful to implement propagators that may only modify
the start max or end max.

Definition at line 2312 of file Solver.java.

◆ makeIntervalVar()

IntervalVar com.google.ortools.constraintsolver.Solver.makeIntervalVar ( long start_min,
long start_max,
long duration_min,
long duration_max,
long end_min,
long end_max,
boolean optional,
String name )

Creates an interval var by specifying the bounds on start,
duration, and end.

Definition at line 2235 of file Solver.java.

◆ makeIntervalVarRelation() [1/2]

Constraint com.google.ortools.constraintsolver.Solver.makeIntervalVarRelation ( IntervalVar t,
int r,
long d )

This method creates a relation between an interval var and a
date.

Definition at line 2345 of file Solver.java.

◆ makeIntervalVarRelation() [2/2]

Constraint com.google.ortools.constraintsolver.Solver.makeIntervalVarRelation ( IntervalVar t1,
int r,
IntervalVar t2 )

This method creates a relation between two interval vars.

Definition at line 2353 of file Solver.java.

◆ makeIntervalVarRelationWithDelay()

Constraint com.google.ortools.constraintsolver.Solver.makeIntervalVarRelationWithDelay ( IntervalVar t1,
int r,
IntervalVar t2,
long delay )

This method creates a relation between two interval vars.
The given delay is added to the second interval.
i.e.: t1 STARTS_AFTER_END of t2 with a delay of 2
means t1 will start at least two units of time after the end of t2.

Definition at line 2364 of file Solver.java.

◆ makeIntVar() [1/6]

IntVar com.google.ortools.constraintsolver.Solver.makeIntVar ( int[] values)

MakeIntVar will create a variable with the given sparse domain.

Definition at line 806 of file Solver.java.

◆ makeIntVar() [2/6]

IntVar com.google.ortools.constraintsolver.Solver.makeIntVar ( int[] values,
String name )

MakeIntVar will create a variable with the given sparse domain.

Definition at line 782 of file Solver.java.

◆ makeIntVar() [3/6]

IntVar com.google.ortools.constraintsolver.Solver.makeIntVar ( long min,
long max )

MakeIntVar will create the best range based int var for the bounds given.

Definition at line 790 of file Solver.java.

◆ makeIntVar() [4/6]

IntVar com.google.ortools.constraintsolver.Solver.makeIntVar ( long min,
long max,
String name )

MakeIntVar will create the best range based int var for the bounds given.

Definition at line 766 of file Solver.java.

◆ makeIntVar() [5/6]

IntVar com.google.ortools.constraintsolver.Solver.makeIntVar ( long[] values)

MakeIntVar will create a variable with the given sparse domain.

Definition at line 798 of file Solver.java.

◆ makeIntVar() [6/6]

IntVar com.google.ortools.constraintsolver.Solver.makeIntVar ( long[] values,
String name )

MakeIntVar will create a variable with the given sparse domain.

Definition at line 774 of file Solver.java.

◆ makeIntVarArray() [1/2]

IntVar[] com.google.ortools.constraintsolver.Solver.makeIntVarArray ( int count,
long min,
long max )

Definition at line 130 of file Solver.java.

◆ makeIntVarArray() [2/2]

IntVar[] com.google.ortools.constraintsolver.Solver.makeIntVarArray ( int count,
long min,
long max,
String name )

Definition at line 138 of file Solver.java.

◆ makeInversePermutationConstraint()

Constraint com.google.ortools.constraintsolver.Solver.makeInversePermutationConstraint ( IntVar[] left,
IntVar[] right )

Creates a constraint that enforces that 'left' and 'right' both
represent permutations of [0..left.size()-1], and that 'right' is
the inverse permutation of 'left', i.e. for all i in
[0..left.size()-1], right[left[i]] = i.

Definition at line 1927 of file Solver.java.

◆ makeIsBetweenCt()

Constraint com.google.ortools.constraintsolver.Solver.makeIsBetweenCt ( IntExpr expr,
long l,
long u,
IntVar b )

b == (l <= expr <= u)

Definition at line 1661 of file Solver.java.

◆ makeIsBetweenVar()

IntVar com.google.ortools.constraintsolver.Solver.makeIsBetweenVar ( IntExpr v,
long l,
long u )

Definition at line 1666 of file Solver.java.

◆ makeIsDifferentCstCt() [1/2]

Constraint com.google.ortools.constraintsolver.Solver.makeIsDifferentCstCt ( IntExpr v1,
IntExpr v2,
IntVar b )

b == (v1 != v2)

Definition at line 1247 of file Solver.java.

◆ makeIsDifferentCstCt() [2/2]

Constraint com.google.ortools.constraintsolver.Solver.makeIsDifferentCstCt ( IntExpr var,
long value,
IntVar boolvar )

boolvar == (var != value)

Definition at line 1223 of file Solver.java.

◆ makeIsDifferentCstVar() [1/2]

IntVar com.google.ortools.constraintsolver.Solver.makeIsDifferentCstVar ( IntExpr v1,
IntExpr v2 )

status var of (v1 != v2)

Definition at line 1239 of file Solver.java.

◆ makeIsDifferentCstVar() [2/2]

IntVar com.google.ortools.constraintsolver.Solver.makeIsDifferentCstVar ( IntExpr var,
long value )

status var of (var != value)

Definition at line 1231 of file Solver.java.

◆ makeIsEqualCstCt()

Constraint com.google.ortools.constraintsolver.Solver.makeIsEqualCstCt ( IntExpr var,
long value,
IntVar boolvar )

boolvar == (var == value)

Definition at line 1167 of file Solver.java.

◆ makeIsEqualCstVar()

IntVar com.google.ortools.constraintsolver.Solver.makeIsEqualCstVar ( IntExpr var,
long value )

status var of (var == value)

Definition at line 1175 of file Solver.java.

◆ makeIsEqualVar() [1/2]

IntVar com.google.ortools.constraintsolver.Solver.makeIsEqualVar ( IntExpr v1,
IntExpr v2 )

status var of (v1 == v2)

Definition at line 1191 of file Solver.java.

◆ makeIsEqualVar() [2/2]

Constraint com.google.ortools.constraintsolver.Solver.makeIsEqualVar ( IntExpr v1,
IntExpr v2,
IntVar b )

b == (v1 == v2)

Definition at line 1183 of file Solver.java.

◆ makeIsGreaterCstCt()

Constraint com.google.ortools.constraintsolver.Solver.makeIsGreaterCstCt ( IntExpr v,
long c,
IntVar b )

b == (v > c)

Definition at line 1391 of file Solver.java.

◆ makeIsGreaterCstVar()

IntVar com.google.ortools.constraintsolver.Solver.makeIsGreaterCstVar ( IntExpr var,
long value )

status var of (var > value)

Definition at line 1399 of file Solver.java.

◆ makeIsGreaterCt()

Constraint com.google.ortools.constraintsolver.Solver.makeIsGreaterCt ( IntExpr left,
IntExpr right,
IntVar b )

b == (left > right)

Definition at line 1415 of file Solver.java.

◆ makeIsGreaterOrEqualCstCt()

Constraint com.google.ortools.constraintsolver.Solver.makeIsGreaterOrEqualCstCt ( IntExpr var,
long value,
IntVar boolvar )

boolvar == (var >= value)

Definition at line 1335 of file Solver.java.

◆ makeIsGreaterOrEqualCstVar()

IntVar com.google.ortools.constraintsolver.Solver.makeIsGreaterOrEqualCstVar ( IntExpr var,
long value )

status var of (var >= value)

Definition at line 1343 of file Solver.java.

◆ makeIsGreaterOrEqualCt()

Constraint com.google.ortools.constraintsolver.Solver.makeIsGreaterOrEqualCt ( IntExpr left,
IntExpr right,
IntVar b )

b == (left >= right)

Definition at line 1359 of file Solver.java.

◆ makeIsGreaterOrEqualVar()

IntVar com.google.ortools.constraintsolver.Solver.makeIsGreaterOrEqualVar ( IntExpr left,
IntExpr right )

status var of (left >= right)

Definition at line 1351 of file Solver.java.

◆ makeIsGreaterVar()

IntVar com.google.ortools.constraintsolver.Solver.makeIsGreaterVar ( IntExpr left,
IntExpr right )

status var of (left > right)

Definition at line 1407 of file Solver.java.

◆ makeIsLessCstCt()

Constraint com.google.ortools.constraintsolver.Solver.makeIsLessCstCt ( IntExpr v,
long c,
IntVar b )

b == (v < c)

Definition at line 1447 of file Solver.java.

◆ makeIsLessCstVar()

IntVar com.google.ortools.constraintsolver.Solver.makeIsLessCstVar ( IntExpr var,
long value )

status var of (var < value)

Definition at line 1455 of file Solver.java.

◆ makeIsLessCt()

Constraint com.google.ortools.constraintsolver.Solver.makeIsLessCt ( IntExpr left,
IntExpr right,
IntVar b )

b == (left < right)

Definition at line 1471 of file Solver.java.

◆ makeIsLessOrEqualCstCt()

Constraint com.google.ortools.constraintsolver.Solver.makeIsLessOrEqualCstCt ( IntExpr var,
long value,
IntVar boolvar )

boolvar == (var <= value)

Definition at line 1279 of file Solver.java.

◆ makeIsLessOrEqualCstVar()

IntVar com.google.ortools.constraintsolver.Solver.makeIsLessOrEqualCstVar ( IntExpr var,
long value )

status var of (var <= value)

Definition at line 1287 of file Solver.java.

◆ makeIsLessOrEqualCt()

Constraint com.google.ortools.constraintsolver.Solver.makeIsLessOrEqualCt ( IntExpr left,
IntExpr right,
IntVar b )

b == (left <= right)

Definition at line 1303 of file Solver.java.

◆ makeIsLessOrEqualVar()

IntVar com.google.ortools.constraintsolver.Solver.makeIsLessOrEqualVar ( IntExpr left,
IntExpr right )

status var of (left <= right)

Definition at line 1295 of file Solver.java.

◆ makeIsLessVar()

IntVar com.google.ortools.constraintsolver.Solver.makeIsLessVar ( IntExpr left,
IntExpr right )

status var of (left < right)

Definition at line 1463 of file Solver.java.

◆ MakeIsLexicalLessOrEqualWithOffsetsCt()

Constraint com.google.ortools.constraintsolver.Solver.MakeIsLexicalLessOrEqualWithOffsetsCt ( IntVar[] left,
IntVar[] right,
long[] offsets,
IntVar boolvar )

Definition at line 1916 of file Solver.java.

◆ makeIsMemberCt() [1/2]

Constraint com.google.ortools.constraintsolver.Solver.makeIsMemberCt ( IntExpr expr,
int[] values,
IntVar boolvar )

Definition at line 1722 of file Solver.java.

◆ makeIsMemberCt() [2/2]

Constraint com.google.ortools.constraintsolver.Solver.makeIsMemberCt ( IntExpr expr,
long[] values,
IntVar boolvar )

boolvar == (expr in set)

Definition at line 1717 of file Solver.java.

◆ makeIsMemberVar() [1/2]

IntVar com.google.ortools.constraintsolver.Solver.makeIsMemberVar ( IntExpr expr,
int[] values )

Definition at line 1732 of file Solver.java.

◆ makeIsMemberVar() [2/2]

IntVar com.google.ortools.constraintsolver.Solver.makeIsMemberVar ( IntExpr expr,
long[] values )

Definition at line 1727 of file Solver.java.

◆ makeLastSolutionCollector() [1/2]

SolutionCollector com.google.ortools.constraintsolver.Solver.makeLastSolutionCollector ( )

Collect the last solution of the search. The variables will need to
be added later.

Definition at line 2564 of file Solver.java.

◆ makeLastSolutionCollector() [2/2]

SolutionCollector com.google.ortools.constraintsolver.Solver.makeLastSolutionCollector ( Assignment assignment)

Collect the last solution of the search.

Definition at line 2555 of file Solver.java.

◆ makeLess() [1/3]

Constraint com.google.ortools.constraintsolver.Solver.makeLess ( IntExpr expr,
int value )

expr < value

Definition at line 1495 of file Solver.java.

◆ makeLess() [2/3]

Constraint com.google.ortools.constraintsolver.Solver.makeLess ( IntExpr expr,
long value )

expr < value

Definition at line 1487 of file Solver.java.

◆ makeLess() [3/3]

Constraint com.google.ortools.constraintsolver.Solver.makeLess ( IntExpr left,
IntExpr right )

left < right

Definition at line 1479 of file Solver.java.

◆ makeLessOrEqual() [1/3]

Constraint com.google.ortools.constraintsolver.Solver.makeLessOrEqual ( IntExpr expr,
int value )

expr <= value

Definition at line 1327 of file Solver.java.

◆ makeLessOrEqual() [2/3]

Constraint com.google.ortools.constraintsolver.Solver.makeLessOrEqual ( IntExpr expr,
long value )

expr <= value

Definition at line 1319 of file Solver.java.

◆ makeLessOrEqual() [3/3]

Constraint com.google.ortools.constraintsolver.Solver.makeLessOrEqual ( IntExpr left,
IntExpr right )

left <= right

Definition at line 1311 of file Solver.java.

◆ makeLexicalLess()

Constraint com.google.ortools.constraintsolver.Solver.makeLexicalLess ( IntVar[] left,
IntVar[] right )

Creates a constraint that enforces that left is lexicographically less
than right.

Definition at line 1891 of file Solver.java.

◆ makeLexicalLessOrEqual()

Constraint com.google.ortools.constraintsolver.Solver.makeLexicalLessOrEqual ( IntVar[] left,
IntVar[] right )

Creates a constraint that enforces that left is lexicographically less
than or equal to right.

Definition at line 1900 of file Solver.java.

◆ MakeLexicalLessOrEqualWithOffsets()

Constraint com.google.ortools.constraintsolver.Solver.MakeLexicalLessOrEqualWithOffsets ( IntVar[] left,
IntVar[] right,
long[] offsets )

Creates a constraint that enforces that left is lexicographically less
than or equal to right with an offset. This means that for the first index
i such that left[i] is not in [right[i] - (offset[i] - 1), right[i]],
left[i] + offset[i] <= right[i]. Offset values must be > 0.

Definition at line 1911 of file Solver.java.

◆ MakeLexicographicImprovementLimit()

ImprovementSearchLimit com.google.ortools.constraintsolver.Solver.MakeLexicographicImprovementLimit ( IntVar[] objective_vars,
SWIGTYPE_p_std__vectorT_bool_t maximize,
double[] objective_scaling_factors,
double[] objective_offsets,
double improvement_rate_coefficient,
int improvement_rate_solutions_distance )

Same as MakeImprovementLimit on a lexicographic objective based on
'objective_vars' and related arguments.

Definition at line 2967 of file Solver.java.

◆ MakeLexicographicOptimize()

OptimizeVar com.google.ortools.constraintsolver.Solver.MakeLexicographicOptimize ( SWIGTYPE_p_std__vectorT_bool_t maximize,
IntVar[] variables,
long[] steps )

Creates a lexicographic objective, following the order of the variables
given. Each variable has a corresponding optimization direction and step.

Definition at line 2734 of file Solver.java.

◆ MakeLexicographicSimulatedAnnealing()

ObjectiveMonitor com.google.ortools.constraintsolver.Solver.MakeLexicographicSimulatedAnnealing ( SWIGTYPE_p_std__vectorT_bool_t maximize,
IntVar[] vars,
long[] steps,
long[] initial_temperatures )

Definition at line 2784 of file Solver.java.

◆ MakeLexicographicTabuSearch()

ObjectiveMonitor com.google.ortools.constraintsolver.Solver.MakeLexicographicTabuSearch ( SWIGTYPE_p_std__vectorT_bool_t maximize,
IntVar[] objectives,
long[] steps,
IntVar[] vars,
long keep_tenure,
long forbid_tenure,
double tabu_factor )

Definition at line 2762 of file Solver.java.

◆ makeLimit() [1/8]

RegularLimit com.google.ortools.constraintsolver.Solver.makeLimit ( com.google.ortools.constraintsolver.RegularLimitParameters proto)

Creates a search limit from its protobuf description

Definition at line 2906 of file Solver.java.

◆ makeLimit() [2/8]

RegularLimit com.google.ortools.constraintsolver.Solver.makeLimit ( long time,
long branches,
long failures,
long solutions )

Definition at line 2921 of file Solver.java.

◆ makeLimit() [3/8]

RegularLimit com.google.ortools.constraintsolver.Solver.makeLimit ( long time,
long branches,
long failures,
long solutions,
boolean smart_time_check )

Definition at line 2916 of file Solver.java.

◆ makeLimit() [4/8]

RegularLimit com.google.ortools.constraintsolver.Solver.makeLimit ( long time,
long branches,
long failures,
long solutions,
boolean smart_time_check,
boolean cumulative )

Definition at line 2911 of file Solver.java.

◆ makeLimit() [5/8]

SearchLimit com.google.ortools.constraintsolver.Solver.makeLimit ( SearchLimit limit_1,
SearchLimit limit_2 )

Creates a search limit that is reached when either of the underlying limit
is reached. That is, the returned limit is more stringent than both
argument limits.

Definition at line 2947 of file Solver.java.

◆ makeLimit() [6/8]

RegularLimit com.google.ortools.constraintsolver.Solver.makeLimit ( SWIGTYPE_p_absl__Duration time,
long branches,
long failures,
long solutions )

Limits the search with the 'time', 'branches', 'failures' and
'solutions' limits. 'smart_time_check' reduces the calls to the wall

Definition at line 2898 of file Solver.java.

◆ makeLimit() [7/8]

RegularLimit com.google.ortools.constraintsolver.Solver.makeLimit ( SWIGTYPE_p_absl__Duration time,
long branches,
long failures,
long solutions,
boolean smart_time_check )

Limits the search with the 'time', 'branches', 'failures' and
'solutions' limits. 'smart_time_check' reduces the calls to the wall

Definition at line 2889 of file Solver.java.

◆ makeLimit() [8/8]

RegularLimit com.google.ortools.constraintsolver.Solver.makeLimit ( SWIGTYPE_p_absl__Duration time,
long branches,
long failures,
long solutions,
boolean smart_time_check,
boolean cumulative )

Limits the search with the 'time', 'branches', 'failures' and
'solutions' limits. 'smart_time_check' reduces the calls to the wall

Definition at line 2880 of file Solver.java.

◆ makeLocalSearchPhase() [1/4]

DecisionBuilder com.google.ortools.constraintsolver.Solver.makeLocalSearchPhase ( Assignment assignment,
LocalSearchPhaseParameters parameters )

Local Search decision builders factories.
Local search is used to improve a given solution. This initial solution
can be specified either by an Assignment or by a DecisionBulder, and the
corresponding variables, the initial solution being the first solution
found by the DecisionBuilder.
The LocalSearchPhaseParameters parameter holds the actual definition of
the local search phase:

  • a local search operator used to explore the neighborhood of the current
    solution,
  • a decision builder to instantiate unbound variables once a neighbor has
    been defined; in the case of LNS-based operators instantiates fragment
    variables; search monitors can be added to this sub-search by wrapping
    the decision builder with MakeSolveOnce.
  • a search limit specifying how long local search looks for neighbors
    before accepting one; the last neighbor is always taken and in the case
    of a greedy search, this corresponds to the best local neighbor;
    first-accept (which is the default behavior) can be modeled using a
    solution found limit of 1,
  • a vector of local search filters used to speed up the search by pruning
    unfeasible neighbors.
    Metaheuristics can be added by defining specialized search monitors;
    currently down/up-hill climbing is available through OptimizeVar, as well
    as Guided Local Search, Tabu Search and Simulated Annealing.

Definition at line 3799 of file Solver.java.

◆ makeLocalSearchPhase() [2/4]

DecisionBuilder com.google.ortools.constraintsolver.Solver.makeLocalSearchPhase ( IntVar[] vars,
DecisionBuilder first_solution,
DecisionBuilder first_solution_sub_decision_builder,
LocalSearchPhaseParameters parameters )

Variant with a sub_decison_builder specific to the first solution.

Definition at line 3816 of file Solver.java.

◆ makeLocalSearchPhase() [3/4]

DecisionBuilder com.google.ortools.constraintsolver.Solver.makeLocalSearchPhase ( IntVar[] vars,
DecisionBuilder first_solution,
LocalSearchPhaseParameters parameters )

Definition at line 3804 of file Solver.java.

◆ makeLocalSearchPhase() [4/4]

DecisionBuilder com.google.ortools.constraintsolver.Solver.makeLocalSearchPhase ( SequenceVar[] vars,
DecisionBuilder first_solution,
LocalSearchPhaseParameters parameters )

Definition at line 3826 of file Solver.java.

◆ makeLocalSearchPhaseParameters() [1/6]

LocalSearchPhaseParameters com.google.ortools.constraintsolver.Solver.makeLocalSearchPhaseParameters ( IntVar objective,
LocalSearchOperator ls_operator,
DecisionBuilder sub_decision_builder )

Local Search Phase Parameters

Definition at line 3868 of file Solver.java.

◆ makeLocalSearchPhaseParameters() [2/6]

LocalSearchPhaseParameters com.google.ortools.constraintsolver.Solver.makeLocalSearchPhaseParameters ( IntVar objective,
LocalSearchOperator ls_operator,
DecisionBuilder sub_decision_builder,
RegularLimit limit )

Definition at line 3877 of file Solver.java.

◆ makeLocalSearchPhaseParameters() [3/6]

LocalSearchPhaseParameters com.google.ortools.constraintsolver.Solver.makeLocalSearchPhaseParameters ( IntVar objective,
LocalSearchOperator ls_operator,
DecisionBuilder sub_decision_builder,
RegularLimit limit,
LocalSearchFilterManager filter_manager )

Definition at line 3886 of file Solver.java.

◆ makeLocalSearchPhaseParameters() [4/6]

LocalSearchPhaseParameters com.google.ortools.constraintsolver.Solver.makeLocalSearchPhaseParameters ( IntVar objective,
SolutionPool pool,
LocalSearchOperator ls_operator,
DecisionBuilder sub_decision_builder )

Definition at line 3895 of file Solver.java.

◆ makeLocalSearchPhaseParameters() [5/6]

LocalSearchPhaseParameters com.google.ortools.constraintsolver.Solver.makeLocalSearchPhaseParameters ( IntVar objective,
SolutionPool pool,
LocalSearchOperator ls_operator,
DecisionBuilder sub_decision_builder,
RegularLimit limit )

Definition at line 3904 of file Solver.java.

◆ makeLocalSearchPhaseParameters() [6/6]

LocalSearchPhaseParameters com.google.ortools.constraintsolver.Solver.makeLocalSearchPhaseParameters ( IntVar objective,
SolutionPool pool,
LocalSearchOperator ls_operator,
DecisionBuilder sub_decision_builder,
RegularLimit limit,
LocalSearchFilterManager filter_manager )

Definition at line 3913 of file Solver.java.

◆ makeLubyRestart()

SearchMonitor com.google.ortools.constraintsolver.Solver.makeLubyRestart ( int scale_factor)

This search monitor will restart the search periodically.
At the iteration n, it will restart after scale_factor * Luby(n) failures
where Luby is the Luby Strategy (i.e. 1 1 2 1 1 2 4 1 1 2 1 1 2 4 8...).

Definition at line 2822 of file Solver.java.

◆ makeMapDomain()

Constraint com.google.ortools.constraintsolver.Solver.makeMapDomain ( IntVar var,
IntVar[] actives )

This constraint maps the domain of 'var' onto the array of
variables 'actives'. That is
for all i in [0 .. size - 1]: actives[i] == 1 <=> var->Contains(i);

Definition at line 2088 of file Solver.java.

◆ makeMax() [1/4]

IntExpr com.google.ortools.constraintsolver.Solver.makeMax ( IntExpr expr,
int value )

std::max(expr, value)

Definition at line 1094 of file Solver.java.

◆ makeMax() [2/4]

IntExpr com.google.ortools.constraintsolver.Solver.makeMax ( IntExpr expr,
long value )

std::max(expr, value)

Definition at line 1086 of file Solver.java.

◆ makeMax() [3/4]

IntExpr com.google.ortools.constraintsolver.Solver.makeMax ( IntExpr left,
IntExpr right )

std::max(left, right)

Definition at line 1078 of file Solver.java.

◆ makeMax() [4/4]

IntExpr com.google.ortools.constraintsolver.Solver.makeMax ( IntVar[] vars)

std::max(vars)

Definition at line 1070 of file Solver.java.

◆ makeMaxEquality()

Constraint com.google.ortools.constraintsolver.Solver.makeMaxEquality ( IntVar[] vars,
IntVar max_var )

Definition at line 1568 of file Solver.java.

◆ makeMaximize()

OptimizeVar com.google.ortools.constraintsolver.Solver.makeMaximize ( IntVar v,
long step )

Creates a maximization objective.

Definition at line 2667 of file Solver.java.

◆ makeMemberCt() [1/2]

Constraint com.google.ortools.constraintsolver.Solver.makeMemberCt ( IntExpr expr,
int[] values )

Definition at line 1680 of file Solver.java.

◆ makeMemberCt() [2/2]

Constraint com.google.ortools.constraintsolver.Solver.makeMemberCt ( IntExpr expr,
long[] values )

expr in set. Propagation is lazy, i.e. this constraint does not
creates holes in the domain of the variable.

Definition at line 1675 of file Solver.java.

◆ makeMin() [1/4]

IntExpr com.google.ortools.constraintsolver.Solver.makeMin ( IntExpr expr,
int value )

std::min(expr, value)

Definition at line 1062 of file Solver.java.

◆ makeMin() [2/4]

IntExpr com.google.ortools.constraintsolver.Solver.makeMin ( IntExpr expr,
long value )

std::min(expr, value)

Definition at line 1054 of file Solver.java.

◆ makeMin() [3/4]

IntExpr com.google.ortools.constraintsolver.Solver.makeMin ( IntExpr left,
IntExpr right )

std::min (left, right)

Definition at line 1046 of file Solver.java.

◆ makeMin() [4/4]

IntExpr com.google.ortools.constraintsolver.Solver.makeMin ( IntVar[] vars)

std::min(vars)

Definition at line 1038 of file Solver.java.

◆ makeMinEquality()

Constraint com.google.ortools.constraintsolver.Solver.makeMinEquality ( IntVar[] vars,
IntVar min_var )

Definition at line 1563 of file Solver.java.

◆ makeMinimize()

OptimizeVar com.google.ortools.constraintsolver.Solver.makeMinimize ( IntVar v,
long step )

Creates a minimization objective.

Definition at line 2659 of file Solver.java.

◆ makeMirrorInterval()

IntervalVar com.google.ortools.constraintsolver.Solver.makeMirrorInterval ( IntervalVar interval_var)

Creates an interval var that is the mirror image of the given one, that
is, the interval var obtained by reversing the axis.

Definition at line 2244 of file Solver.java.

◆ makeModulo() [1/2]

IntExpr com.google.ortools.constraintsolver.Solver.makeModulo ( IntExpr x,
IntExpr mod )

Modulo expression x % mod (with the python convention for modulo).

Definition at line 1130 of file Solver.java.

◆ makeModulo() [2/2]

IntExpr com.google.ortools.constraintsolver.Solver.makeModulo ( IntExpr x,
long mod )

General piecewise-linear function expression, built from f(x) where f is
piecewise-linear. The resulting expression is f(expr).
expressions.
Modulo expression x % mod (with the python convention for modulo).

Definition at line 1122 of file Solver.java.

◆ makeMonotonicElement()

IntExpr com.google.ortools.constraintsolver.Solver.makeMonotonicElement ( LongUnaryOperator values,
boolean increasing,
IntVar index )

Function based element. The constraint takes ownership of the
callback. The callback must be monotonic. It must be able to
cope with any possible value in the domain of 'index'
(potentially negative ones too). Furtermore, monotonicity is not
checked. Thus giving a non-monotonic function, or specifying an
incorrect increasing parameter will result in undefined behavior.

Definition at line 997 of file Solver.java.

◆ makeMoveTowardTargetOperator() [1/2]

LocalSearchOperator com.google.ortools.constraintsolver.Solver.makeMoveTowardTargetOperator ( Assignment target)

Creates a local search operator that tries to move the assignment of some
variables toward a target. The target is given as an Assignment. This
operator generates neighbors in which the only difference compared to the
current state is that one variable that belongs to the target assignment
is set to its target value.

Definition at line 3665 of file Solver.java.

◆ makeMoveTowardTargetOperator() [2/2]

LocalSearchOperator com.google.ortools.constraintsolver.Solver.makeMoveTowardTargetOperator ( IntVar[] variables,
long[] target_values )

Creates a local search operator that tries to move the assignment of some
variables toward a target. The target is given either as two vectors: a
vector of variables and a vector of associated target values. The two
vectors should be of the same length. This operator generates neighbors in
which the only difference compared to the current state is that one
variable that belongs to the given vector is set to its target value.

Definition at line 3678 of file Solver.java.

◆ MakeNBestLexicographicValueSolutionCollector() [1/2]

SolutionCollector com.google.ortools.constraintsolver.Solver.MakeNBestLexicographicValueSolutionCollector ( Assignment assignment,
int solution_count,
SWIGTYPE_p_std__vectorT_bool_t maximize )

Same as above but supporting lexicographic objectives; 'maximize'
specifies the optimization direction for each objective.

Definition at line 2629 of file Solver.java.

◆ MakeNBestLexicographicValueSolutionCollector() [2/2]

SolutionCollector com.google.ortools.constraintsolver.Solver.MakeNBestLexicographicValueSolutionCollector ( int solution_count,
SWIGTYPE_p_std__vectorT_bool_t maximize )

Definition at line 2634 of file Solver.java.

◆ makeNBestValueSolutionCollector() [1/2]

SolutionCollector com.google.ortools.constraintsolver.Solver.makeNBestValueSolutionCollector ( Assignment assignment,
int solution_count,
boolean maximize )

Same as MakeBestValueSolutionCollector but collects the best
solution_count solutions. Collected solutions are sorted in increasing
optimality order (the best solution is the last one).

Definition at line 2615 of file Solver.java.

◆ makeNBestValueSolutionCollector() [2/2]

SolutionCollector com.google.ortools.constraintsolver.Solver.makeNBestValueSolutionCollector ( int solution_count,
boolean maximize )

Definition at line 2620 of file Solver.java.

◆ makeNeighborhoodLimit()

LocalSearchOperator com.google.ortools.constraintsolver.Solver.makeNeighborhoodLimit ( LocalSearchOperator op,
long limit )

Creates a local search operator that wraps another local search
operator and limits the number of neighbors explored (i.e., calls
to MakeNextNeighbor from the current solution (between two calls
to Start()). When this limit is reached, MakeNextNeighbor()
returns false. The counter is cleared when Start() is called.

Definition at line 3769 of file Solver.java.

◆ makeNestedOptimize() [1/6]

DecisionBuilder com.google.ortools.constraintsolver.Solver.makeNestedOptimize ( DecisionBuilder db,
Assignment solution,
boolean maximize,
long step )

NestedOptimize will collapse a search tree described by a
decision builder 'db' and a set of monitors and wrap it into a
single point. If there are no solutions to this nested tree, then
NestedOptimize will fail. If there are solutions, it will find
the best as described by the mandatory objective in the solution
as well as the optimization direction, instantiate all variables
to this solution, and return nullptr.

Definition at line 3531 of file Solver.java.

◆ makeNestedOptimize() [2/6]

DecisionBuilder com.google.ortools.constraintsolver.Solver.makeNestedOptimize ( DecisionBuilder db,
Assignment solution,
boolean maximize,
long step,
SearchMonitor monitor1 )

Definition at line 3540 of file Solver.java.

◆ makeNestedOptimize() [3/6]

DecisionBuilder com.google.ortools.constraintsolver.Solver.makeNestedOptimize ( DecisionBuilder db,
Assignment solution,
boolean maximize,
long step,
SearchMonitor monitor1,
SearchMonitor monitor2 )

Definition at line 3549 of file Solver.java.

◆ makeNestedOptimize() [4/6]

DecisionBuilder com.google.ortools.constraintsolver.Solver.makeNestedOptimize ( DecisionBuilder db,
Assignment solution,
boolean maximize,
long step,
SearchMonitor monitor1,
SearchMonitor monitor2,
SearchMonitor monitor3 )

Definition at line 3558 of file Solver.java.

◆ makeNestedOptimize() [5/6]

DecisionBuilder com.google.ortools.constraintsolver.Solver.makeNestedOptimize ( DecisionBuilder db,
Assignment solution,
boolean maximize,
long step,
SearchMonitor monitor1,
SearchMonitor monitor2,
SearchMonitor monitor3,
SearchMonitor monitor4 )

Definition at line 3567 of file Solver.java.

◆ makeNestedOptimize() [6/6]

DecisionBuilder com.google.ortools.constraintsolver.Solver.makeNestedOptimize ( DecisionBuilder db,
Assignment solution,
boolean maximize,
long step,
SearchMonitor[] monitors )

Definition at line 3576 of file Solver.java.

◆ makeNoCycle() [1/3]

Constraint com.google.ortools.constraintsolver.Solver.makeNoCycle ( IntVar[] nexts,
IntVar[] active )

Prevent cycles. The "nexts" variables represent the next in the chain.
"active" variables indicate if the corresponding next variable is active;
this could be useful to model unperformed nodes in a routing problem.
A callback can be added to specify sink values (by default sink values
are values >= vars.size()). Ownership of the callback is passed to the
constraint.
If assume_paths is either not specified or true, the constraint assumes
the "nexts" variables represent paths (and performs a faster propagation);
otherwise the constraint assumes they represent a forest.

Definition at line 2000 of file Solver.java.

◆ makeNoCycle() [2/3]

Constraint com.google.ortools.constraintsolver.Solver.makeNoCycle ( IntVar[] nexts,
IntVar[] active,
LongPredicate sink_handler )

Prevent cycles. The "nexts" variables represent the next in the chain.
"active" variables indicate if the corresponding next variable is active;
this could be useful to model unperformed nodes in a routing problem.
A callback can be added to specify sink values (by default sink values
are values >= vars.size()). Ownership of the callback is passed to the
constraint.
If assume_paths is either not specified or true, the constraint assumes
the "nexts" variables represent paths (and performs a faster propagation);
otherwise the constraint assumes they represent a forest.

Definition at line 1984 of file Solver.java.

◆ makeNoCycle() [3/3]

Constraint com.google.ortools.constraintsolver.Solver.makeNoCycle ( IntVar[] nexts,
IntVar[] active,
LongPredicate sink_handler,
boolean assume_paths )

Definition at line 2005 of file Solver.java.

◆ makeNonEquality() [1/3]

Constraint com.google.ortools.constraintsolver.Solver.makeNonEquality ( IntExpr expr,
int value )

expr != value

Definition at line 1271 of file Solver.java.

◆ makeNonEquality() [2/3]

Constraint com.google.ortools.constraintsolver.Solver.makeNonEquality ( IntExpr expr,
long value )

expr != value

Definition at line 1263 of file Solver.java.

◆ makeNonEquality() [3/3]

Constraint com.google.ortools.constraintsolver.Solver.makeNonEquality ( IntExpr left,
IntExpr right )

left != right

Definition at line 1255 of file Solver.java.

◆ makeNonOverlappingBoxesConstraint() [1/3]

Constraint com.google.ortools.constraintsolver.Solver.makeNonOverlappingBoxesConstraint ( IntVar[] x_vars,
IntVar[] y_vars,
IntVar[] x_size,
IntVar[] y_size )

This constraint states that all the boxes must not overlap.
The coordinates of box i are:
(x_vars[i], y_vars[i]),
(x_vars[i], y_vars[i] + y_size[i]),
(x_vars[i] + x_size[i], y_vars[i]),
(x_vars[i] + x_size[i], y_vars[i] + y_size[i]).
The sizes must be non-negative. Boxes with a zero dimension can be
pushed like any box.

Definition at line 2142 of file Solver.java.

◆ makeNonOverlappingBoxesConstraint() [2/3]

Constraint com.google.ortools.constraintsolver.Solver.makeNonOverlappingBoxesConstraint ( IntVar[] x_vars,
IntVar[] y_vars,
SWIGTYPE_p_absl__SpanT_int_const_t x_size,
SWIGTYPE_p_absl__SpanT_int_const_t y_size )

Definition at line 2152 of file Solver.java.

◆ makeNonOverlappingBoxesConstraint() [3/3]

Constraint com.google.ortools.constraintsolver.Solver.makeNonOverlappingBoxesConstraint ( IntVar[] x_vars,
IntVar[] y_vars,
SWIGTYPE_p_absl__SpanT_long_const_t x_size,
SWIGTYPE_p_absl__SpanT_long_const_t y_size )

Definition at line 2147 of file Solver.java.

◆ makeNonOverlappingNonStrictBoxesConstraint() [1/3]

Constraint com.google.ortools.constraintsolver.Solver.makeNonOverlappingNonStrictBoxesConstraint ( IntVar[] x_vars,
IntVar[] y_vars,
IntVar[] x_size,
IntVar[] y_size )

This constraint states that all the boxes must not overlap.
The coordinates of box i are:
(x_vars[i], y_vars[i]),
(x_vars[i], y_vars[i] + y_size[i]),
(x_vars[i] + x_size[i], y_vars[i]),
(x_vars[i] + x_size[i], y_vars[i] + y_size[i]).
The sizes must be positive.
Boxes with a zero dimension can be placed anywhere.

Definition at line 2167 of file Solver.java.

◆ makeNonOverlappingNonStrictBoxesConstraint() [2/3]

Constraint com.google.ortools.constraintsolver.Solver.makeNonOverlappingNonStrictBoxesConstraint ( IntVar[] x_vars,
IntVar[] y_vars,
SWIGTYPE_p_absl__SpanT_int_const_t x_size,
SWIGTYPE_p_absl__SpanT_int_const_t y_size )

Definition at line 2177 of file Solver.java.

◆ makeNonOverlappingNonStrictBoxesConstraint() [3/3]

Constraint com.google.ortools.constraintsolver.Solver.makeNonOverlappingNonStrictBoxesConstraint ( IntVar[] x_vars,
IntVar[] y_vars,
SWIGTYPE_p_absl__SpanT_long_const_t x_size,
SWIGTYPE_p_absl__SpanT_long_const_t y_size )

Definition at line 2172 of file Solver.java.

◆ makeNotBetweenCt()

Constraint com.google.ortools.constraintsolver.Solver.makeNotBetweenCt ( IntExpr expr,
long l,
long u )

(expr < l || expr > u)
This constraint is lazy as it will not make holes in the domain of
variables. It will propagate only when expr->Min() >= l
or expr->Max() <= u.

Definition at line 1653 of file Solver.java.

◆ makeNotMemberCt() [1/4]

Constraint com.google.ortools.constraintsolver.Solver.makeNotMemberCt ( IntExpr expr,
int[] starts,
int[] ends )

expr should not be in the list of forbidden intervals [start[i]..end[i]].

Definition at line 1709 of file Solver.java.

◆ makeNotMemberCt() [2/4]

Constraint com.google.ortools.constraintsolver.Solver.makeNotMemberCt ( IntExpr expr,
int[] values )

Definition at line 1693 of file Solver.java.

◆ makeNotMemberCt() [3/4]

Constraint com.google.ortools.constraintsolver.Solver.makeNotMemberCt ( IntExpr expr,
long[] starts,
long[] ends )

expr should not be in the list of forbidden intervals [start[i]..end[i]].

Definition at line 1701 of file Solver.java.

◆ makeNotMemberCt() [4/4]

Constraint com.google.ortools.constraintsolver.Solver.makeNotMemberCt ( IntExpr expr,
long[] values )

expr not in set.

Definition at line 1688 of file Solver.java.

◆ makeNullIntersect()

Constraint com.google.ortools.constraintsolver.Solver.makeNullIntersect ( IntVar[] first_vars,
IntVar[] second_vars )

Creates a constraint that states that all variables in the first
vector are different from all variables in the second
group. Thus the set of values in the first vector does not
intersect with the set of values in the second vector.

Definition at line 1956 of file Solver.java.

◆ makeNullIntersectExcept()

Constraint com.google.ortools.constraintsolver.Solver.makeNullIntersectExcept ( IntVar[] first_vars,
IntVar[] second_vars,
long escape_value )

Creates a constraint that states that all variables in the first
vector are different from all variables from the second group,
unless they are assigned to the escape value. Thus the set of
values in the first vector minus the escape value does not
intersect with the set of values in the second vector.

Definition at line 1968 of file Solver.java.

◆ makeOperator() [1/6]

LocalSearchOperator com.google.ortools.constraintsolver.Solver.makeOperator ( IntVar[] vars,
int op )

Local Search Operators.

Definition at line 3614 of file Solver.java.

◆ makeOperator() [2/6]

LocalSearchOperator com.google.ortools.constraintsolver.Solver.makeOperator ( IntVar[] vars,
int op,
SWIGTYPE_p_std__functionT_std__vectorT_int_t_const_Rfint_intF_t get_neighbors )

Local Search Operators.

Definition at line 3606 of file Solver.java.

◆ makeOperator() [3/6]

LocalSearchOperator com.google.ortools.constraintsolver.Solver.makeOperator ( IntVar[] vars,
IntVar[] secondary_vars,
int op )

Definition at line 3624 of file Solver.java.

◆ makeOperator() [4/6]

LocalSearchOperator com.google.ortools.constraintsolver.Solver.makeOperator ( IntVar[] vars,
IntVar[] secondary_vars,
int op,
SWIGTYPE_p_std__functionT_std__vectorT_int_t_const_Rfint_intF_t get_neighbors )

Definition at line 3619 of file Solver.java.

◆ makeOperator() [5/6]

LocalSearchOperator com.google.ortools.constraintsolver.Solver.makeOperator ( IntVar[] vars,
IntVar[] secondary_vars,
LongTernaryOperator evaluator,
int op )

Definition at line 3634 of file Solver.java.

◆ makeOperator() [6/6]

LocalSearchOperator com.google.ortools.constraintsolver.Solver.makeOperator ( IntVar[] vars,
LongTernaryOperator evaluator,
int op )

Definition at line 3629 of file Solver.java.

◆ makeOpposite()

IntExpr com.google.ortools.constraintsolver.Solver.makeOpposite ( IntExpr expr)

-expr

Definition at line 902 of file Solver.java.

◆ makeOptimize()

OptimizeVar com.google.ortools.constraintsolver.Solver.makeOptimize ( boolean maximize,
IntVar v,
long step )

Creates a objective with a given sense (true = maximization).

Definition at line 2675 of file Solver.java.

◆ makePack()

Pack com.google.ortools.constraintsolver.Solver.makePack ( IntVar[] vars,
int number_of_bins )

This constraint packs all variables onto 'number_of_bins'
variables. For any given variable, a value of 'number_of_bins'
indicates that the variable is not assigned to any bin.
Dimensions, i.e., cumulative constraints on this packing, can be
added directly from the pack class.

Definition at line 2189 of file Solver.java.

◆ makePathConnected()

Constraint com.google.ortools.constraintsolver.Solver.makePathConnected ( IntVar[] nexts,
long[] sources,
long[] sinks,
IntVar[] status )

Constraint enforcing that status[i] is true iff there's a path defined on
next variables from sources[i] to sinks[i].
Check whether more propagation is needed.

Definition at line 2078 of file Solver.java.

◆ makePathCumul() [1/3]

Constraint com.google.ortools.constraintsolver.Solver.makePathCumul ( IntVar[] nexts,
IntVar[] active,
IntVar[] cumuls,
IntVar[] slacks,
LongBinaryOperator transit_evaluator )

Creates a constraint which accumulates values along a path such that:
cumuls[next[i]] = cumuls[i] + transit_evaluator(i, next[i]) + slacks[i].
Active variables indicate if the corresponding next variable is active;
this could be useful to model unperformed nodes in a routing problem.
Ownership of transit_evaluator is taken and it must be a repeatable
callback.

Definition at line 2068 of file Solver.java.

◆ makePathCumul() [2/3]

Constraint com.google.ortools.constraintsolver.Solver.makePathCumul ( IntVar[] nexts,
IntVar[] active,
IntVar[] cumuls,
IntVar[] transits )

Creates a constraint which accumulates values along a path such that:
cumuls[next[i]] = cumuls[i] + transits[i].
Active variables indicate if the corresponding next variable is active;
this could be useful to model unperformed nodes in a routing problem.

Definition at line 2033 of file Solver.java.

◆ makePathCumul() [3/3]

Constraint com.google.ortools.constraintsolver.Solver.makePathCumul ( IntVar[] nexts,
IntVar[] active,
IntVar[] cumuls,
LongBinaryOperator transit_evaluator )

Creates a constraint which accumulates values along a path such that:
cumuls[next[i]] = cumuls[i] + transit_evaluator(i, next[i]).
Active variables indicate if the corresponding next variable is active;
this could be useful to model unperformed nodes in a routing problem.
Ownership of transit_evaluator is taken and it must be a repeatable
callback.

Definition at line 2055 of file Solver.java.

◆ makePhase() [1/15]

DecisionBuilder com.google.ortools.constraintsolver.Solver.makePhase ( IntervalVar[] intervals,
int str )

Scheduling phases.

Definition at line 3430 of file Solver.java.

◆ makePhase() [2/15]

DecisionBuilder com.google.ortools.constraintsolver.Solver.makePhase ( IntVar v0,
int var_str,
int val_str )

Shortcuts for small arrays.

Definition at line 3339 of file Solver.java.

◆ makePhase() [3/15]

DecisionBuilder com.google.ortools.constraintsolver.Solver.makePhase ( IntVar v0,
IntVar v1,
int var_str,
int val_str )

Definition at line 3344 of file Solver.java.

◆ makePhase() [4/15]

DecisionBuilder com.google.ortools.constraintsolver.Solver.makePhase ( IntVar v0,
IntVar v1,
IntVar v2,
int var_str,
int val_str )

Definition at line 3349 of file Solver.java.

◆ makePhase() [5/15]

DecisionBuilder com.google.ortools.constraintsolver.Solver.makePhase ( IntVar v0,
IntVar v1,
IntVar v2,
IntVar v3,
int var_str,
int val_str )

Definition at line 3354 of file Solver.java.

◆ makePhase() [6/15]

DecisionBuilder com.google.ortools.constraintsolver.Solver.makePhase ( IntVar[] vars,
int var_str,
int val_str )

Phases on IntVar arrays.
for all other functions that have several homonyms in this .h).

Definition at line 3287 of file Solver.java.

◆ makePhase() [7/15]

DecisionBuilder com.google.ortools.constraintsolver.Solver.makePhase ( IntVar[] vars,
int var_str,
LongBinaryOperator value_evaluator )

Definition at line 3297 of file Solver.java.

◆ makePhase() [8/15]

DecisionBuilder com.google.ortools.constraintsolver.Solver.makePhase ( IntVar[] vars,
int var_str,
LongBinaryOperator value_evaluator,
LongUnaryOperator tie_breaker )

Definition at line 3316 of file Solver.java.

◆ makePhase() [9/15]

DecisionBuilder com.google.ortools.constraintsolver.Solver.makePhase ( IntVar[] vars,
int var_str,
LongTernaryPredicate var_val1_val2_comparator )

var_val1_val2_comparator(var, val1, val2) is true iff assigning value
"val1" to variable "var" is better than assigning value "val2".

Definition at line 3306 of file Solver.java.

◆ makePhase() [10/15]

DecisionBuilder com.google.ortools.constraintsolver.Solver.makePhase ( IntVar[] vars,
LongBinaryOperator eval,
int str )

Returns a decision builder which assigns values to variables which
minimize the values returned by the evaluator. The arguments passed to the
evaluator callback are the indices of the variables in vars and the values
of these variables. Ownership of the callback is passed to the decision
builder.

Definition at line 3408 of file Solver.java.

◆ makePhase() [11/15]

DecisionBuilder com.google.ortools.constraintsolver.Solver.makePhase ( IntVar[] vars,
LongBinaryOperator eval,
LongUnaryOperator tie_breaker,
int str )

Returns a decision builder which assigns values to variables
which minimize the values returned by the evaluator. In case of
tie breaks, the second callback is used to choose the best index
in the array of equivalent pairs with equivalent evaluations. The
arguments passed to the evaluator callback are the indices of the
variables in vars and the values of these variables. Ownership of
the callback is passed to the decision builder.

Definition at line 3422 of file Solver.java.

◆ makePhase() [12/15]

DecisionBuilder com.google.ortools.constraintsolver.Solver.makePhase ( IntVar[] vars,
LongUnaryOperator var_evaluator,
int val_str )

Definition at line 3292 of file Solver.java.

◆ makePhase() [13/15]

DecisionBuilder com.google.ortools.constraintsolver.Solver.makePhase ( IntVar[] vars,
LongUnaryOperator var_evaluator,
LongBinaryOperator value_evaluator )

Definition at line 3311 of file Solver.java.

◆ makePhase() [14/15]

DecisionBuilder com.google.ortools.constraintsolver.Solver.makePhase ( IntVar[] vars,
LongUnaryOperator var_evaluator,
LongBinaryOperator value_evaluator,
LongUnaryOperator tie_breaker )

Definition at line 3321 of file Solver.java.

◆ makePhase() [15/15]

DecisionBuilder com.google.ortools.constraintsolver.Solver.makePhase ( SequenceVar[] sequences,
int str )

Definition at line 3435 of file Solver.java.

◆ makePower()

IntExpr com.google.ortools.constraintsolver.Solver.makePower ( IntExpr expr,
long n )

expr ^ n (n > 0)

Definition at line 958 of file Solver.java.

◆ makePrintModelVisitor()

ModelVisitor com.google.ortools.constraintsolver.Solver.makePrintModelVisitor ( )

Prints the model.

Definition at line 3073 of file Solver.java.

◆ makeProd() [1/2]

IntExpr com.google.ortools.constraintsolver.Solver.makeProd ( IntExpr expr,
long value )

expr * value

Definition at line 918 of file Solver.java.

◆ makeProd() [2/2]

IntExpr com.google.ortools.constraintsolver.Solver.makeProd ( IntExpr left,
IntExpr right )

left * right

Definition at line 910 of file Solver.java.

◆ MakeProfiledDecisionBuilderWrapper()

DecisionBuilder com.google.ortools.constraintsolver.Solver.MakeProfiledDecisionBuilderWrapper ( DecisionBuilder db)

Activates profiling on a decision builder.

Definition at line 4284 of file Solver.java.

◆ makeRandomLnsOperator() [1/2]

LocalSearchOperator com.google.ortools.constraintsolver.Solver.makeRandomLnsOperator ( IntVar[] vars,
int number_of_variables )

Creates a large neighborhood search operator which creates fragments (set
of relaxed variables) with up to number_of_variables random variables
(sampling with replacement is performed meaning that at most
number_of_variables variables are selected). Warning: this operator will
always return neighbors; using it without a search limit will result in a
non-ending search.
Optionally a random seed can be specified.

Definition at line 3648 of file Solver.java.

◆ makeRandomLnsOperator() [2/2]

LocalSearchOperator com.google.ortools.constraintsolver.Solver.makeRandomLnsOperator ( IntVar[] vars,
int number_of_variables,
int seed )

Definition at line 3653 of file Solver.java.

◆ makeRankFirstInterval()

Decision com.google.ortools.constraintsolver.Solver.makeRankFirstInterval ( SequenceVar sequence,
int index )

Returns a decision that tries to rank first the ith interval var
in the sequence variable.

Definition at line 3387 of file Solver.java.

◆ makeRankLastInterval()

Decision com.google.ortools.constraintsolver.Solver.makeRankLastInterval ( SequenceVar sequence,
int index )

Returns a decision that tries to rank last the ith interval var
in the sequence variable.

Definition at line 3396 of file Solver.java.

◆ MakeRejectFilter()

LocalSearchFilter com.google.ortools.constraintsolver.Solver.MakeRejectFilter ( )

Definition at line 3930 of file Solver.java.

◆ makeRestoreAssignment()

DecisionBuilder com.google.ortools.constraintsolver.Solver.makeRestoreAssignment ( Assignment assignment)

Returns a DecisionBuilder which restores an Assignment
(calls void Assignment::Restore())

Definition at line 3589 of file Solver.java.

◆ makeScalProd() [1/2]

IntExpr com.google.ortools.constraintsolver.Solver.makeScalProd ( IntVar[] vars,
int[] coefs )

scalar product

Definition at line 878 of file Solver.java.

◆ makeScalProd() [2/2]

IntExpr com.google.ortools.constraintsolver.Solver.makeScalProd ( IntVar[] vars,
long[] coefs )

scalar product

Definition at line 870 of file Solver.java.

◆ makeScalProdEquality() [1/4]

Constraint com.google.ortools.constraintsolver.Solver.makeScalProdEquality ( IntVar[] vars,
int[] coefficients,
IntVar target )

Definition at line 1538 of file Solver.java.

◆ makeScalProdEquality() [2/4]

Constraint com.google.ortools.constraintsolver.Solver.makeScalProdEquality ( IntVar[] vars,
int[] coefficients,
long cst )

Definition at line 1528 of file Solver.java.

◆ makeScalProdEquality() [3/4]

Constraint com.google.ortools.constraintsolver.Solver.makeScalProdEquality ( IntVar[] vars,
long[] coefficients,
IntVar target )

Definition at line 1533 of file Solver.java.

◆ makeScalProdEquality() [4/4]

Constraint com.google.ortools.constraintsolver.Solver.makeScalProdEquality ( IntVar[] vars,
long[] coefficients,
long cst )

Definition at line 1523 of file Solver.java.

◆ makeScalProdGreaterOrEqual() [1/2]

Constraint com.google.ortools.constraintsolver.Solver.makeScalProdGreaterOrEqual ( IntVar[] vars,
int[] coeffs,
long cst )

Definition at line 1548 of file Solver.java.

◆ makeScalProdGreaterOrEqual() [2/2]

Constraint com.google.ortools.constraintsolver.Solver.makeScalProdGreaterOrEqual ( IntVar[] vars,
long[] coeffs,
long cst )

Definition at line 1543 of file Solver.java.

◆ makeScalProdLessOrEqual() [1/2]

Constraint com.google.ortools.constraintsolver.Solver.makeScalProdLessOrEqual ( IntVar[] vars,
int[] coefficients,
long cst )

Definition at line 1558 of file Solver.java.

◆ makeScalProdLessOrEqual() [2/2]

Constraint com.google.ortools.constraintsolver.Solver.makeScalProdLessOrEqual ( IntVar[] vars,
long[] coefficients,
long cst )

Definition at line 1553 of file Solver.java.

◆ makeScheduleOrExpedite()

Decision com.google.ortools.constraintsolver.Solver.makeScheduleOrExpedite ( IntervalVar var,
long est,
SWIGTYPE_p_long marker )

Returns a decision that tries to schedule a task at a given time.
On the Apply branch, it will set that interval var as performed and set
its end to 'est'. On the Refute branch, it will just update the
'marker' to 'est' - 1. This decision is used in the
INTERVAL_SET_TIMES_BACKWARD strategy.

Definition at line 3378 of file Solver.java.

◆ makeScheduleOrPostpone()

Decision com.google.ortools.constraintsolver.Solver.makeScheduleOrPostpone ( IntervalVar var,
long est,
SWIGTYPE_p_long marker )

Returns a decision that tries to schedule a task at a given time.
On the Apply branch, it will set that interval var as performed and set
its start to 'est'. On the Refute branch, it will just update the
'marker' to 'est' + 1. This decision is used in the
INTERVAL_SET_TIMES_FORWARD strategy.

Definition at line 3366 of file Solver.java.

◆ makeSearchLog() [1/7]

SearchMonitor com.google.ortools.constraintsolver.Solver.makeSearchLog ( int branch_period)

The SearchMonitors below will display a periodic search log
on LOG(INFO) every branch_period branches explored.

Definition at line 2985 of file Solver.java.

◆ makeSearchLog() [2/7]

SearchMonitor com.google.ortools.constraintsolver.Solver.makeSearchLog ( int branch_period,
IntVar var )

At each solution, this monitor also display the var value.

Definition at line 2993 of file Solver.java.

◆ makeSearchLog() [3/7]

SearchMonitor com.google.ortools.constraintsolver.Solver.makeSearchLog ( int branch_period,
IntVar var,
Supplier< String > display_callback )

At each solution, this monitor will display the 'var' value and the
result of display_callback.

Definition at line 3011 of file Solver.java.

◆ makeSearchLog() [4/7]

SearchMonitor com.google.ortools.constraintsolver.Solver.makeSearchLog ( int branch_period,
IntVar[] vars,
Supplier< String > display_callback )

At each solution, this monitor will display the 'vars' values and the
result of display_callback.

Definition at line 3020 of file Solver.java.

◆ makeSearchLog() [5/7]

SearchMonitor com.google.ortools.constraintsolver.Solver.makeSearchLog ( int branch_period,
OptimizeVar opt_var )

OptimizeVar Search Logs
At each solution, this monitor will also display the 'opt_var' value.

Definition at line 3029 of file Solver.java.

◆ makeSearchLog() [6/7]

SearchMonitor com.google.ortools.constraintsolver.Solver.makeSearchLog ( int branch_period,
OptimizeVar opt_var,
Supplier< String > display_callback )

Creates a search monitor that will also print the result of the
display callback.

Definition at line 3038 of file Solver.java.

◆ makeSearchLog() [7/7]

SearchMonitor com.google.ortools.constraintsolver.Solver.makeSearchLog ( int branch_period,
Supplier< String > display_callback )

At each solution, this monitor will also display result of
display_callback.

Definition at line 3002 of file Solver.java.

◆ makeSearchTrace()

SearchMonitor com.google.ortools.constraintsolver.Solver.makeSearchTrace ( String prefix)

Creates a search monitor that will trace precisely the behavior of the
search. Use this only for low level debugging.

Definition at line 3047 of file Solver.java.

◆ makeSemiContinuousExpr()

IntExpr com.google.ortools.constraintsolver.Solver.makeSemiContinuousExpr ( IntExpr expr,
long fixed_charge,
long step )

Semi continuous Expression (x <= 0 -> f(x) = 0; x > 0 -> f(x) = ax + b)
a >= 0 and b >= 0

Definition at line 1111 of file Solver.java.

◆ makeSimulatedAnnealing()

ObjectiveMonitor com.google.ortools.constraintsolver.Solver.makeSimulatedAnnealing ( boolean maximize,
IntVar v,
long step,
long initial_temperature )

Creates a Simulated Annealing monitor.

Definition at line 2779 of file Solver.java.

◆ makeSolutionsLimit()

RegularLimit com.google.ortools.constraintsolver.Solver.makeSolutionsLimit ( long solutions)

Creates a search limit that constrains the number of solutions found
during the search.

Definition at line 2871 of file Solver.java.

◆ makeSolveOnce() [1/6]

DecisionBuilder com.google.ortools.constraintsolver.Solver.makeSolveOnce ( DecisionBuilder db)

SolveOnce will collapse a search tree described by a decision
builder 'db' and a set of monitors and wrap it into a single point.
If there are no solutions to this nested tree, then SolveOnce will
fail. If there is a solution, it will find it and returns nullptr.

Definition at line 3468 of file Solver.java.

◆ makeSolveOnce() [2/6]

DecisionBuilder com.google.ortools.constraintsolver.Solver.makeSolveOnce ( DecisionBuilder db,
SearchMonitor monitor1 )

Definition at line 3477 of file Solver.java.

◆ makeSolveOnce() [3/6]

DecisionBuilder com.google.ortools.constraintsolver.Solver.makeSolveOnce ( DecisionBuilder db,
SearchMonitor monitor1,
SearchMonitor monitor2 )

Definition at line 3486 of file Solver.java.

◆ makeSolveOnce() [4/6]

DecisionBuilder com.google.ortools.constraintsolver.Solver.makeSolveOnce ( DecisionBuilder db,
SearchMonitor monitor1,
SearchMonitor monitor2,
SearchMonitor monitor3 )

Definition at line 3495 of file Solver.java.

◆ makeSolveOnce() [5/6]

DecisionBuilder com.google.ortools.constraintsolver.Solver.makeSolveOnce ( DecisionBuilder db,
SearchMonitor monitor1,
SearchMonitor monitor2,
SearchMonitor monitor3,
SearchMonitor monitor4 )

Definition at line 3504 of file Solver.java.

◆ makeSolveOnce() [6/6]

DecisionBuilder com.google.ortools.constraintsolver.Solver.makeSolveOnce ( DecisionBuilder db,
SearchMonitor[] monitors )

Definition at line 3513 of file Solver.java.

◆ makeSortingConstraint()

Constraint com.google.ortools.constraintsolver.Solver.makeSortingConstraint ( IntVar[] vars,
IntVar[] sorted )

Creates a constraint binding the arrays of variables "vars" and
"sorted_vars": sorted_vars[0] must be equal to the minimum of all
variables in vars, and so on: the value of sorted_vars[i] must be
equal to the i-th value of variables invars.

This constraint propagates in both directions: from "vars" to
"sorted_vars" and vice-versa.

Behind the scenes, this constraint maintains that:

Definition at line 1882 of file Solver.java.

◆ makeSplitVariableDomain()

Decision com.google.ortools.constraintsolver.Solver.makeSplitVariableDomain ( IntVar var,
long val,
boolean start_with_lower_half )

Definition at line 3132 of file Solver.java.

◆ makeSquare()

IntExpr com.google.ortools.constraintsolver.Solver.makeSquare ( IntExpr expr)

expr * expr

Definition at line 950 of file Solver.java.

◆ makeStatisticsModelVisitor()

ModelVisitor com.google.ortools.constraintsolver.Solver.makeStatisticsModelVisitor ( )

Displays some nice statistics on the model.

Definition at line 3081 of file Solver.java.

◆ makeStoreAssignment()

DecisionBuilder com.google.ortools.constraintsolver.Solver.makeStoreAssignment ( Assignment assignment)

Returns a DecisionBuilder which stores an Assignment
(calls void Assignment::Store())

Definition at line 3598 of file Solver.java.

◆ makeStrictDisjunctiveConstraint()

DisjunctiveConstraint com.google.ortools.constraintsolver.Solver.makeStrictDisjunctiveConstraint ( IntervalVar[] intervals,
String name )

This constraint forces all interval vars into an non-overlapping
sequence. Intervals with zero durations cannot overlap with over
intervals.

Definition at line 2402 of file Solver.java.

◆ makeSubCircuit()

Constraint com.google.ortools.constraintsolver.Solver.makeSubCircuit ( IntVar[] nexts)

Force the "nexts" variable to create a complete Hamiltonian path
for those that do not loop upon themselves.

Definition at line 2022 of file Solver.java.

◆ makeSum() [1/3]

IntExpr com.google.ortools.constraintsolver.Solver.makeSum ( IntExpr expr,
long value )

expr + value.

Definition at line 854 of file Solver.java.

◆ makeSum() [2/3]

IntExpr com.google.ortools.constraintsolver.Solver.makeSum ( IntExpr left,
IntExpr right )

left + right.

Definition at line 846 of file Solver.java.

◆ makeSum() [3/3]

IntExpr com.google.ortools.constraintsolver.Solver.makeSum ( IntVar[] vars)

sum of all vars.

Definition at line 862 of file Solver.java.

◆ makeSumEquality() [1/2]

Constraint com.google.ortools.constraintsolver.Solver.makeSumEquality ( IntVar[] vars,
IntVar var )

Definition at line 1518 of file Solver.java.

◆ makeSumEquality() [2/2]

Constraint com.google.ortools.constraintsolver.Solver.makeSumEquality ( IntVar[] vars,
long cst )

Definition at line 1513 of file Solver.java.

◆ makeSumGreaterOrEqual()

Constraint com.google.ortools.constraintsolver.Solver.makeSumGreaterOrEqual ( IntVar[] vars,
long cst )

Definition at line 1508 of file Solver.java.

◆ makeSumLessOrEqual()

Constraint com.google.ortools.constraintsolver.Solver.makeSumLessOrEqual ( IntVar[] vars,
long cst )

Variation on arrays.

Definition at line 1503 of file Solver.java.

◆ makeSumObjectiveFilter() [1/2]

IntVarLocalSearchFilter com.google.ortools.constraintsolver.Solver.makeSumObjectiveFilter ( IntVar[] vars,
IntVar[] secondary_vars,
LongTernaryOperator values,
int filter_enum )

Definition at line 3945 of file Solver.java.

◆ makeSumObjectiveFilter() [2/2]

IntVarLocalSearchFilter com.google.ortools.constraintsolver.Solver.makeSumObjectiveFilter ( IntVar[] vars,
LongBinaryOperator values,
int filter_enum )

Definition at line 3940 of file Solver.java.

◆ makeSymmetryManager() [1/5]

SearchMonitor com.google.ortools.constraintsolver.Solver.makeSymmetryManager ( SymmetryBreaker v1)

Definition at line 3094 of file Solver.java.

◆ makeSymmetryManager() [2/5]

SearchMonitor com.google.ortools.constraintsolver.Solver.makeSymmetryManager ( SymmetryBreaker v1,
SymmetryBreaker v2 )

Definition at line 3099 of file Solver.java.

◆ makeSymmetryManager() [3/5]

SearchMonitor com.google.ortools.constraintsolver.Solver.makeSymmetryManager ( SymmetryBreaker v1,
SymmetryBreaker v2,
SymmetryBreaker v3 )

Definition at line 3104 of file Solver.java.

◆ makeSymmetryManager() [4/5]

SearchMonitor com.google.ortools.constraintsolver.Solver.makeSymmetryManager ( SymmetryBreaker v1,
SymmetryBreaker v2,
SymmetryBreaker v3,
SymmetryBreaker v4 )

Definition at line 3109 of file Solver.java.

◆ makeSymmetryManager() [5/5]

SearchMonitor com.google.ortools.constraintsolver.Solver.makeSymmetryManager ( SymmetryBreaker[] visitors)

Symmetry Breaking.

Definition at line 3089 of file Solver.java.

◆ makeTabuSearch()

ObjectiveMonitor com.google.ortools.constraintsolver.Solver.makeTabuSearch ( boolean maximize,
IntVar objective,
long step,
IntVar[] vars,
long keep_tenure,
long forbid_tenure,
double tabu_factor )

MetaHeuristics which try to get the search out of local optima.
Creates a Tabu Search monitor.
In the context of local search the behavior is similar to MakeOptimize(),
creating an objective in a given sense. The behavior differs once a local
optimum is reached: thereafter solutions which degrade the value of the
objective are allowed if they are not "tabu". A solution is "tabu" if it
doesn't respect the following rules:

  • improving the best solution found so far
  • variables in the "keep" list must keep their value, variables in the
    "forbid" list must not take the value they have in the list.
    Variables with new values enter the tabu lists after each new solution
    found and leave the lists after a given number of iterations (called
    tenure). Only the variables passed to the method can enter the lists.
    The tabu criterion is softened by the tabu factor which gives the number
    of "tabu" violations which is tolerated; a factor of 1 means no violations
    allowed; a factor of 0 means all violations are allowed.

Definition at line 2757 of file Solver.java.

◆ makeTemporalDisjunction() [1/2]

Constraint com.google.ortools.constraintsolver.Solver.makeTemporalDisjunction ( IntervalVar t1,
IntervalVar t2 )

This constraint implements a temporal disjunction between two
interval vars.

Definition at line 2383 of file Solver.java.

◆ makeTemporalDisjunction() [2/2]

Constraint com.google.ortools.constraintsolver.Solver.makeTemporalDisjunction ( IntervalVar t1,
IntervalVar t2,
IntVar alt )

This constraint implements a temporal disjunction between two
interval vars t1 and t2. 'alt' indicates which alternative was
chosen (alt == 0 is equivalent to t1 before t2).

Definition at line 2374 of file Solver.java.

◆ makeTimeLimit() [1/2]

RegularLimit com.google.ortools.constraintsolver.Solver.makeTimeLimit ( long time_in_ms)

Definition at line 2844 of file Solver.java.

◆ makeTimeLimit() [2/2]

RegularLimit com.google.ortools.constraintsolver.Solver.makeTimeLimit ( SWIGTYPE_p_absl__Duration time)

Creates a search limit that constrains the running time.

Definition at line 2839 of file Solver.java.

◆ makeTransitionConstraint() [1/2]

Constraint com.google.ortools.constraintsolver.Solver.makeTransitionConstraint ( IntVar[] vars,
IntTupleSet transition_table,
long initial_state,
int[] final_states )

This constraint create a finite automaton that will check the
sequence of variables vars. It uses a transition table called
'transition_table'. Each transition is a triple
(current_state, variable_value, new_state).
The initial state is given, and the set of accepted states is decribed
by 'final_states'. These states are hidden inside the constraint.
Only the transitions (i.e. the variables) are visible.

Definition at line 2127 of file Solver.java.

◆ makeTransitionConstraint() [2/2]

Constraint com.google.ortools.constraintsolver.Solver.makeTransitionConstraint ( IntVar[] vars,
IntTupleSet transition_table,
long initial_state,
long[] final_states )

This constraint create a finite automaton that will check the
sequence of variables vars. It uses a transition table called
'transition_table'. Each transition is a triple
(current_state, variable_value, new_state).
The initial state is given, and the set of accepted states is decribed
by 'final_states'. These states are hidden inside the constraint.
Only the transitions (i.e. the variables) are visible.

Definition at line 2113 of file Solver.java.

◆ makeTrueConstraint()

Constraint com.google.ortools.constraintsolver.Solver.makeTrueConstraint ( )

This constraint always succeeds.

Definition at line 1146 of file Solver.java.

◆ makeVariableDomainFilter()

LocalSearchFilter com.google.ortools.constraintsolver.Solver.makeVariableDomainFilter ( )

Definition at line 3935 of file Solver.java.

◆ makeVariableGreaterOrEqualValue()

Decision com.google.ortools.constraintsolver.Solver.makeVariableGreaterOrEqualValue ( IntVar var,
long value )

Definition at line 3127 of file Solver.java.

◆ makeVariableLessOrEqualValue()

Decision com.google.ortools.constraintsolver.Solver.makeVariableLessOrEqualValue ( IntVar var,
long value )

Definition at line 3122 of file Solver.java.

◆ makeWeightedMaximize() [1/2]

OptimizeVar com.google.ortools.constraintsolver.Solver.makeWeightedMaximize ( IntVar[] sub_objectives,
int[] weights,
long step )

Creates a maximization weigthed objective.

Definition at line 2709 of file Solver.java.

◆ makeWeightedMaximize() [2/2]

OptimizeVar com.google.ortools.constraintsolver.Solver.makeWeightedMaximize ( IntVar[] sub_objectives,
long[] weights,
long step )

Creates a maximization weigthed objective.

Definition at line 2701 of file Solver.java.

◆ makeWeightedMinimize() [1/2]

OptimizeVar com.google.ortools.constraintsolver.Solver.makeWeightedMinimize ( IntVar[] sub_objectives,
int[] weights,
long step )

Creates a minimization weighted objective. The actual objective is
scalar_prod(sub_objectives, weights).

Definition at line 2693 of file Solver.java.

◆ makeWeightedMinimize() [2/2]

OptimizeVar com.google.ortools.constraintsolver.Solver.makeWeightedMinimize ( IntVar[] sub_objectives,
long[] weights,
long step )

Creates a minimization weighted objective. The actual objective is
scalar_prod(sub_objectives, weights).

Definition at line 2684 of file Solver.java.

◆ makeWeightedOptimize() [1/2]

OptimizeVar com.google.ortools.constraintsolver.Solver.makeWeightedOptimize ( boolean maximize,
IntVar[] sub_objectives,
int[] weights,
long step )

Creates a weighted objective with a given sense (true = maximization).

Definition at line 2725 of file Solver.java.

◆ makeWeightedOptimize() [2/2]

OptimizeVar com.google.ortools.constraintsolver.Solver.makeWeightedOptimize ( boolean maximize,
IntVar[] sub_objectives,
long[] weights,
long step )

Creates a weighted objective with a given sense (true = maximization).

Definition at line 2717 of file Solver.java.

◆ memoryUsage()

static long com.google.ortools.constraintsolver.Solver.memoryUsage ( )
static

Current memory usage in bytes

Definition at line 643 of file Solver.java.

◆ model_name()

String com.google.ortools.constraintsolver.Solver.model_name ( )

Returns the name of the model.

Definition at line 4178 of file Solver.java.

◆ MultiArmedBanditConcatenateOperators()

LocalSearchOperator com.google.ortools.constraintsolver.Solver.MultiArmedBanditConcatenateOperators ( LocalSearchOperator[] ops,
double memory_coefficient,
double exploration_coefficient,
boolean maximize )

Creates a local search operator which concatenates a vector of operators.
Uses Multi-Armed Bandit approach for choosing the next operator to use.
Sorts operators based on Upper Confidence Bound Algorithm which evaluates
each operator as sum of average improvement and exploration function.

Updates the order of operators when accepts a neighbor with objective
improvement.

Definition at line 3757 of file Solver.java.

◆ nameAllVariables()

boolean com.google.ortools.constraintsolver.Solver.nameAllVariables ( )

Returns whether all variables should be named.

Definition at line 4171 of file Solver.java.

◆ neighbors()

long com.google.ortools.constraintsolver.Solver.neighbors ( )

The number of neighbors created.

Definition at line 693 of file Solver.java.

◆ newSearch() [1/6]

void com.google.ortools.constraintsolver.Solver.newSearch ( DecisionBuilder db)

Definition at line 500 of file Solver.java.

◆ newSearch() [2/6]

void com.google.ortools.constraintsolver.Solver.newSearch ( DecisionBuilder db,
SearchMonitor m1 )

Definition at line 508 of file Solver.java.

◆ newSearch() [3/6]

void com.google.ortools.constraintsolver.Solver.newSearch ( DecisionBuilder db,
SearchMonitor m1,
SearchMonitor m2 )

Definition at line 516 of file Solver.java.

◆ newSearch() [4/6]

void com.google.ortools.constraintsolver.Solver.newSearch ( DecisionBuilder db,
SearchMonitor m1,
SearchMonitor m2,
SearchMonitor m3 )

Definition at line 524 of file Solver.java.

◆ newSearch() [5/6]

void com.google.ortools.constraintsolver.Solver.newSearch ( DecisionBuilder db,
SearchMonitor m1,
SearchMonitor m2,
SearchMonitor m3,
SearchMonitor m4 )

Definition at line 532 of file Solver.java.

◆ newSearch() [6/6]

void com.google.ortools.constraintsolver.Solver.newSearch ( DecisionBuilder db,
SearchMonitor[] monitors )



Decomposed search.
The code for a top level search should look like
solver->NewSearch(db);
while (solver->NextSolution()) {
.. use the current solution
}
solver()->EndSearch();

Definition at line 492 of file Solver.java.

◆ nextSolution()

boolean com.google.ortools.constraintsolver.Solver.nextSolution ( )

Definition at line 540 of file Solver.java.

◆ optimization_direction()

int com.google.ortools.constraintsolver.Solver.optimization_direction ( )

The direction of optimization, getter and setter.

Definition at line 755 of file Solver.java.

◆ parameters()

com.google.ortools.constraintsolver.ConstraintSolverParameters com.google.ortools.constraintsolver.Solver.parameters ( )

Stored Parameters.

Definition at line 309 of file Solver.java.

◆ popState()

void com.google.ortools.constraintsolver.Solver.popState ( )

Definition at line 3976 of file Solver.java.

◆ pushState()

void com.google.ortools.constraintsolver.Solver.pushState ( )

The PushState and PopState methods manipulates the states
of the reversible objects. They are visible only because they
are useful to write unitary tests.

Definition at line 3972 of file Solver.java.

◆ rand32()

int com.google.ortools.constraintsolver.Solver.rand32 ( int size)

Returns a random value between 0 and 'size' - 1;

Definition at line 4014 of file Solver.java.

◆ rand64()

long com.google.ortools.constraintsolver.Solver.rand64 ( long size)

Returns a random value between 0 and 'size' - 1;

Definition at line 4007 of file Solver.java.

◆ randomConcatenateOperators() [1/2]

LocalSearchOperator com.google.ortools.constraintsolver.Solver.randomConcatenateOperators ( LocalSearchOperator[] ops)

Randomized version of local search concatenator; calls a random operator
at each call to MakeNextNeighbor().

Definition at line 3733 of file Solver.java.

◆ randomConcatenateOperators() [2/2]

LocalSearchOperator com.google.ortools.constraintsolver.Solver.randomConcatenateOperators ( LocalSearchOperator[] ops,
int seed )

Randomized version of local search concatenator; calls a random operator
at each call to MakeNextNeighbor(). The provided seed is used to
initialize the random number generator.

Definition at line 3743 of file Solver.java.

◆ registerDemon()

Demon com.google.ortools.constraintsolver.Solver.registerDemon ( Demon demon)

Adds a new demon and wraps it inside a DemonProfiler if necessary.

Definition at line 4102 of file Solver.java.

◆ registerIntervalVar()

IntervalVar com.google.ortools.constraintsolver.Solver.registerIntervalVar ( IntervalVar var)

Registers a new IntervalVar and wraps it inside a TraceIntervalVar
if necessary.

Definition at line 4127 of file Solver.java.

◆ registerIntExpr()

IntExpr com.google.ortools.constraintsolver.Solver.registerIntExpr ( IntExpr expr)

Registers a new IntExpr and wraps it inside a TraceIntExpr if necessary.

Definition at line 4110 of file Solver.java.

◆ registerIntVar()

IntVar com.google.ortools.constraintsolver.Solver.registerIntVar ( IntVar var)

Registers a new IntVar and wraps it inside a TraceIntVar if necessary.

Definition at line 4118 of file Solver.java.

◆ reSeed()

void com.google.ortools.constraintsolver.Solver.reSeed ( int seed)

Reseed the solver random generator.

Definition at line 4021 of file Solver.java.

◆ restartCurrentSearch()

void com.google.ortools.constraintsolver.Solver.restartCurrentSearch ( )

Definition at line 4265 of file Solver.java.

◆ restartSearch()

void com.google.ortools.constraintsolver.Solver.restartSearch ( )

Definition at line 544 of file Solver.java.

◆ RunUncheckedLocalSearch() [1/2]

Assignment com.google.ortools.constraintsolver.Solver.RunUncheckedLocalSearch ( Assignment initial_solution,
LocalSearchFilterManager filter_manager,
LocalSearchOperator ls_operator,
SearchMonitor[] monitors,
RegularLimit limit )

Experimental: runs a local search on the given initial solution, checking
the feasibility and the objective value of solutions using the filter
manager only (solutions are never restored in the CP world). Only greedy
descent is supported.

Definition at line 3852 of file Solver.java.

◆ RunUncheckedLocalSearch() [2/2]

Assignment com.google.ortools.constraintsolver.Solver.RunUncheckedLocalSearch ( Assignment initial_solution,
LocalSearchFilterManager filter_manager,
LocalSearchOperator ls_operator,
SearchMonitor[] monitors,
RegularLimit limit,
SWIGTYPE_p_absl__flat_hash_setT_operations_research__IntVar_p_t touched )

Experimental: runs a local search on the given initial solution, checking
the feasibility and the objective value of solutions using the filter
manager only (solutions are never restored in the CP world). Only greedy
descent is supported.

Definition at line 3841 of file Solver.java.

◆ searchDepth()

int com.google.ortools.constraintsolver.Solver.searchDepth ( )

Gets the search depth of the current active search. Returns -1 if
there is no active search opened.

Definition at line 3984 of file Solver.java.

◆ searchLeftDepth()

int com.google.ortools.constraintsolver.Solver.searchLeftDepth ( )

Gets the search left depth of the current active search. Returns -1 if
there is no active search opened.

Definition at line 3992 of file Solver.java.

◆ set_context()

void com.google.ortools.constraintsolver.Solver.set_context ( String context)

Sets the current context of the search.

Definition at line 741 of file Solver.java.

◆ set_optimization_direction()

void com.google.ortools.constraintsolver.Solver.set_optimization_direction ( int direction)

Definition at line 759 of file Solver.java.

◆ setTmpVector()

void com.google.ortools.constraintsolver.Solver.setTmpVector ( long[] value)

Unsafe temporary vector. It is used to avoid leaks in operations
that need storage and that may fail. See IntVar::SetValues() for
instance. It is not locked; do not use in a multi-threaded or reentrant
setup.

Definition at line 4235 of file Solver.java.

◆ SetUseFastLocalSearch()

void com.google.ortools.constraintsolver.Solver.SetUseFastLocalSearch ( boolean use_fast_local_search)

enabled for metaheuristics.
Disables/enables fast local search.

Definition at line 4081 of file Solver.java.

◆ shouldFail()

void com.google.ortools.constraintsolver.Solver.shouldFail ( )

These methods are only useful for the SWIG wrappers, which need a way
to externally cause the Solver to fail.

Definition at line 4273 of file Solver.java.

◆ solutions()

long com.google.ortools.constraintsolver.Solver.solutions ( )

The number of solutions found since the start of the search.

Definition at line 665 of file Solver.java.

◆ solve() [1/6]

boolean com.google.ortools.constraintsolver.Solver.solve ( DecisionBuilder db)

Definition at line 441 of file Solver.java.

◆ solve() [2/6]

boolean com.google.ortools.constraintsolver.Solver.solve ( DecisionBuilder db,
SearchMonitor m1 )

Definition at line 449 of file Solver.java.

◆ solve() [3/6]

boolean com.google.ortools.constraintsolver.Solver.solve ( DecisionBuilder db,
SearchMonitor m1,
SearchMonitor m2 )

Definition at line 457 of file Solver.java.

◆ solve() [4/6]

boolean com.google.ortools.constraintsolver.Solver.solve ( DecisionBuilder db,
SearchMonitor m1,
SearchMonitor m2,
SearchMonitor m3 )

Definition at line 465 of file Solver.java.

◆ solve() [5/6]

boolean com.google.ortools.constraintsolver.Solver.solve ( DecisionBuilder db,
SearchMonitor m1,
SearchMonitor m2,
SearchMonitor m3,
SearchMonitor m4 )

Definition at line 473 of file Solver.java.

◆ solve() [6/6]

boolean com.google.ortools.constraintsolver.Solver.solve ( DecisionBuilder db,
SearchMonitor[] monitors )


Solves the problem using the given DecisionBuilder and returns true if a
solution was found and accepted.

These methods are the ones most users should use to search for a solution.
Note that the definition of 'solution' is subtle. A solution here is
defined as a leaf of the search tree with respect to the given decision
builder for which there is no failure. What this means is that, contrary
to intuition, a solution may not have all variables of the model bound.
It is the responsibility of the decision builder to keep returning
decisions until all variables are indeed bound. The most extreme
counterexample is calling Solve with a trivial decision builder whose
Next() method always returns nullptr. In this case, Solve immediately
returns 'true', since not assigning any variable to any value is a
solution, unless the root node propagation discovers that the model is
infeasible.

This function must be called either from outside of search,
or from within the Next() method of a decision builder.

Solve will terminate whenever any of the following event arise:
A search monitor asks the solver to terminate the search by calling
solver()->FinishCurrentSearch().
A solution is found that is accepted by all search monitors, and none of
the search monitors decides to search for another one.

Upon search termination, there will be a series of backtracks all the way
to the top level. This means that a user cannot expect to inspect the
solution by querying variables after a call to Solve(): all the
information will be lost. In order to do something with the solution, the
user must either:

Use a search monitor that can process such a leaf. See, in particular,
the SolutionCollector class.
Do not use Solve. Instead, use the more fine-grained approach using
methods NewSearch(...), NextSolution(), and EndSearch().

Parameters
dbThe decision builder that will generate the search tree.
monitorsA vector of search monitors that will be notified of
various events during the search. In their reaction to these events, such
monitors may influence the search.

Definition at line 433 of file Solver.java.

◆ solveAndCommit() [1/5]

boolean com.google.ortools.constraintsolver.Solver.solveAndCommit ( DecisionBuilder db)

Definition at line 571 of file Solver.java.

◆ solveAndCommit() [2/5]

boolean com.google.ortools.constraintsolver.Solver.solveAndCommit ( DecisionBuilder db,
SearchMonitor m1 )

Definition at line 579 of file Solver.java.

◆ solveAndCommit() [3/5]

boolean com.google.ortools.constraintsolver.Solver.solveAndCommit ( DecisionBuilder db,
SearchMonitor m1,
SearchMonitor m2 )

Definition at line 587 of file Solver.java.

◆ solveAndCommit() [4/5]

boolean com.google.ortools.constraintsolver.Solver.solveAndCommit ( DecisionBuilder db,
SearchMonitor m1,
SearchMonitor m2,
SearchMonitor m3 )

Definition at line 595 of file Solver.java.

◆ solveAndCommit() [5/5]

boolean com.google.ortools.constraintsolver.Solver.solveAndCommit ( DecisionBuilder db,
SearchMonitor[] monitors )


SolveAndCommit using a decision builder and up to three
search monitors, usually one for the objective, one for the limits
and one to collect solutions.

The difference between a SolveAndCommit() and a Solve() method
call is the fact that SolveAndCommit will not backtrack all
modifications at the end of the search. This method is only
usable during the Next() method of a decision builder.

Definition at line 563 of file Solver.java.

◆ solveDepth()

int com.google.ortools.constraintsolver.Solver.solveDepth ( )

Gets the number of nested searches. It returns 0 outside search,
1 during the top level search, 2 or more in case of nested searches.

Definition at line 4000 of file Solver.java.

◆ stamp()

long com.google.ortools.constraintsolver.Solver.stamp ( )

The stamp indicates how many moves in the search tree we have performed.
It is useful to detect if we need to update same lazy structures.

Definition at line 727 of file Solver.java.

◆ state()

int com.google.ortools.constraintsolver.Solver.state ( )

State of the solver.

Definition at line 622 of file Solver.java.

◆ swigRelease()

static long com.google.ortools.constraintsolver.Solver.swigRelease ( Solver obj)
staticprotected

Definition at line 89 of file Solver.java.

◆ topPeriodicCheck()

void com.google.ortools.constraintsolver.Solver.topPeriodicCheck ( )

Performs PeriodicCheck on the top-level search; for instance, can be
called from a nested solve to check top-level limits.

Definition at line 3954 of file Solver.java.

◆ topProgressPercent()

int com.google.ortools.constraintsolver.Solver.topProgressPercent ( )

Returns a percentage representing the propress of the search before
reaching the limits of the top-level search (can be called from a nested
solve).

Definition at line 3963 of file Solver.java.

◆ toString()

String com.google.ortools.constraintsolver.Solver.toString ( )

misc debug string.

Definition at line 636 of file Solver.java.

◆ tryDecisions() [1/4]

DecisionBuilder com.google.ortools.constraintsolver.Solver.tryDecisions ( DecisionBuilder db1,
DecisionBuilder db2 )

Creates a decision builder which will create a search tree where each
decision builder is called from the top of the search tree. For instance
the decision builder Try(db1, db2) will entirely explore the search tree
of db1 then the one of db2, resulting in the following search tree:
Tree root |
\ |
db1 tree db2 tree |

This is very handy to try a decision builder which partially explores the
search space and if it fails to try another decision builder.

"Try"-builders "recursively". For instance, Try(a,b,c,d) will give a tree
unbalanced to the right, whereas Try(Try(a,b), Try(b,c)) will give a
balanced tree. Investigate if we should only provide the binary version
and/or if we should balance automatically.

Definition at line 3241 of file Solver.java.

◆ tryDecisions() [2/4]

DecisionBuilder com.google.ortools.constraintsolver.Solver.tryDecisions ( DecisionBuilder db1,
DecisionBuilder db2,
DecisionBuilder db3 )

Definition at line 3251 of file Solver.java.

◆ tryDecisions() [3/4]

DecisionBuilder com.google.ortools.constraintsolver.Solver.tryDecisions ( DecisionBuilder db1,
DecisionBuilder db2,
DecisionBuilder db3,
DecisionBuilder db4 )

Definition at line 3262 of file Solver.java.

◆ tryDecisions() [4/4]

DecisionBuilder com.google.ortools.constraintsolver.Solver.tryDecisions ( DecisionBuilder[] dbs)

Definition at line 3274 of file Solver.java.

◆ unchecked_solutions()

long com.google.ortools.constraintsolver.Solver.unchecked_solutions ( )

The number of unchecked solutions found by local search.

Definition at line 672 of file Solver.java.

◆ UseFastLocalSearch()

boolean com.google.ortools.constraintsolver.Solver.UseFastLocalSearch ( )

Returns true if fast local search is enabled.

Definition at line 4088 of file Solver.java.

◆ wallTime()

long com.google.ortools.constraintsolver.Solver.wallTime ( )

DEPRECATED: Use Now() instead.
Time elapsed, in ms since the creation of the solver.

Definition at line 651 of file Solver.java.

Member Data Documentation

◆ ASSIGN_CENTER_VALUE

final int com.google.ortools.constraintsolver.Solver.ASSIGN_CENTER_VALUE = mainJNI.Solver_ASSIGN_CENTER_VALUE_get()
static

Selects the first possible value which is the closest to the center
of the domain of the selected variable.
The center is defined as (min + max) / 2.

Definition at line 4425 of file Solver.java.

◆ ASSIGN_MAX_VALUE

final int com.google.ortools.constraintsolver.Solver.ASSIGN_MAX_VALUE = mainJNI.Solver_ASSIGN_MAX_VALUE_get()
static

Selects the max value of the selected variable.

Definition at line 4415 of file Solver.java.

◆ ASSIGN_MIN_VALUE

final int com.google.ortools.constraintsolver.Solver.ASSIGN_MIN_VALUE = mainJNI.Solver_ASSIGN_MIN_VALUE_get()
static

Selects the min value of the selected variable.

Definition at line 4411 of file Solver.java.

◆ ASSIGN_RANDOM_VALUE

final int com.google.ortools.constraintsolver.Solver.ASSIGN_RANDOM_VALUE = mainJNI.Solver_ASSIGN_RANDOM_VALUE_get()
static

Selects randomly one of the possible values of the selected variable.

Definition at line 4419 of file Solver.java.

◆ AT_SOLUTION

final int com.google.ortools.constraintsolver.Solver.AT_SOLUTION = mainJNI.Solver_AT_SOLUTION_get()
static

After successful NextSolution and before EndSearch.

Definition at line 4889 of file Solver.java.

◆ AVOID_DATE

final int com.google.ortools.constraintsolver.Solver.AVOID_DATE = mainJNI.Solver_AVOID_DATE_get()
static

STARTS_AFTER or ENDS_BEFORE, i.e. d is not in t.
t starts after d, i.e. Start(t) >= d.
t ends before d, i.e. End(t) <= d.

Definition at line 4819 of file Solver.java.

◆ CHOICE_POINT

final int com.google.ortools.constraintsolver.Solver.CHOICE_POINT = mainJNI.Solver_CHOICE_POINT_get()
static

Definition at line 4866 of file Solver.java.

◆ CHOOSE_DYNAMIC_GLOBAL_BEST

final int com.google.ortools.constraintsolver.Solver.CHOOSE_DYNAMIC_GLOBAL_BEST = mainJNI.Solver_CHOOSE_DYNAMIC_GLOBAL_BEST_get()
static

Pairs are compared each time a variable is selected. That way all pairs
are relevant and evaluation is accurate.
This strategy runs in O(number-of-pairs) at each variable selection,
versus O(1) in the static version.

Definition at line 4464 of file Solver.java.

◆ CHOOSE_FIRST_UNBOUND

final int com.google.ortools.constraintsolver.Solver.CHOOSE_FIRST_UNBOUND = mainJNI.Solver_CHOOSE_FIRST_UNBOUND_get()
static

Select the first unbound variable.
Variables are considered in the order of the vector of IntVars used
to create the selector.

Definition at line 4316 of file Solver.java.

◆ CHOOSE_HIGHEST_MAX

final int com.google.ortools.constraintsolver.Solver.CHOOSE_HIGHEST_MAX = mainJNI.Solver_CHOOSE_HIGHEST_MAX_get()
static

Among unbound variables, select the variable with the highest maximal
value.
In case of a tie, the first one is selected, first being defined by the
order in the vector of IntVars used to create the selector.

Definition at line 4370 of file Solver.java.

◆ CHOOSE_LOWEST_MIN

final int com.google.ortools.constraintsolver.Solver.CHOOSE_LOWEST_MIN = mainJNI.Solver_CHOOSE_LOWEST_MIN_get()
static

Among unbound variables, select the variable with the smallest minimal
value.
In case of a tie, the first one is selected, "first" defined by the
order in the vector of IntVars used to create the selector.

Definition at line 4363 of file Solver.java.

◆ CHOOSE_MAX_REGRET_ON_MIN

final int com.google.ortools.constraintsolver.Solver.CHOOSE_MAX_REGRET_ON_MIN = mainJNI.Solver_CHOOSE_MAX_REGRET_ON_MIN_get()
static

Among unbound variables, select the variable with the largest
gap between the first and the second values of the domain.

Definition at line 4387 of file Solver.java.

◆ CHOOSE_MAX_SIZE

final int com.google.ortools.constraintsolver.Solver.CHOOSE_MAX_SIZE = mainJNI.Solver_CHOOSE_MAX_SIZE_get()
static

Among unbound variables, select the variable with the highest size.
In case of a tie, the first one is selected, first being defined by the
order in the vector of IntVars used to create the selector.

Definition at line 4382 of file Solver.java.

◆ CHOOSE_MIN_SIZE

final int com.google.ortools.constraintsolver.Solver.CHOOSE_MIN_SIZE = mainJNI.Solver_CHOOSE_MIN_SIZE_get()
static

Among unbound variables, select the variable with the smallest size.
In case of a tie, the first one is selected, first being defined by the
order in the vector of IntVars used to create the selector.

Definition at line 4376 of file Solver.java.

◆ CHOOSE_MIN_SIZE_HIGHEST_MAX

final int com.google.ortools.constraintsolver.Solver.CHOOSE_MIN_SIZE_HIGHEST_MAX = mainJNI.Solver_CHOOSE_MIN_SIZE_HIGHEST_MAX_get()
static

Among unbound variables, select the variable with the smallest size,
i.e., the smallest number of possible values.
In case of a tie, the selected variable is the one with the highest max
value.
In case of a tie, the first one is selected, first being defined by the
order in the vector of IntVars used to create the selector.

Definition at line 4356 of file Solver.java.

◆ CHOOSE_MIN_SIZE_HIGHEST_MIN

final int com.google.ortools.constraintsolver.Solver.CHOOSE_MIN_SIZE_HIGHEST_MIN = mainJNI.Solver_CHOOSE_MIN_SIZE_HIGHEST_MIN_get()
static

Among unbound variables, select the variable with the smallest size,
i.e., the smallest number of possible values.
In case of a tie, the selected variable is the one with the highest min
value.
In case of a tie, the first one is selected, first being defined by the
order in the vector of IntVars used to create the selector.

Definition at line 4338 of file Solver.java.

◆ CHOOSE_MIN_SIZE_LOWEST_MAX

final int com.google.ortools.constraintsolver.Solver.CHOOSE_MIN_SIZE_LOWEST_MAX = mainJNI.Solver_CHOOSE_MIN_SIZE_LOWEST_MAX_get()
static

Among unbound variables, select the variable with the smallest size,
i.e., the smallest number of possible values.
In case of a tie, the selected variables is the one with the lowest max
value.
In case of a tie, the first one is selected, first being defined by the
order in the vector of IntVars used to create the selector.

Definition at line 4347 of file Solver.java.

◆ CHOOSE_MIN_SIZE_LOWEST_MIN

final int com.google.ortools.constraintsolver.Solver.CHOOSE_MIN_SIZE_LOWEST_MIN = mainJNI.Solver_CHOOSE_MIN_SIZE_LOWEST_MIN_get()
static

Among unbound variables, select the variable with the smallest size,
i.e., the smallest number of possible values.
In case of a tie, the selected variables is the one with the lowest min
value.
In case of a tie, the first one is selected, first being defined by the
order in the vector of IntVars used to create the selector.

Definition at line 4329 of file Solver.java.

◆ CHOOSE_MIN_SLACK_RANK_FORWARD

final int com.google.ortools.constraintsolver.Solver.CHOOSE_MIN_SLACK_RANK_FORWARD = mainJNI.Solver_CHOOSE_MIN_SLACK_RANK_FORWARD_get()
static

Definition at line 4473 of file Solver.java.

◆ CHOOSE_PATH

final int com.google.ortools.constraintsolver.Solver.CHOOSE_PATH = mainJNI.Solver_CHOOSE_PATH_get()
static

Selects the next unbound variable on a path, the path being defined by
the variables: var[i] corresponds to the index of the next of i.

Definition at line 4392 of file Solver.java.

◆ CHOOSE_RANDOM

final int com.google.ortools.constraintsolver.Solver.CHOOSE_RANDOM = mainJNI.Solver_CHOOSE_RANDOM_get()
static

Randomly select one of the remaining unbound variables.

Definition at line 4320 of file Solver.java.

◆ CHOOSE_RANDOM_RANK_FORWARD

final int com.google.ortools.constraintsolver.Solver.CHOOSE_RANDOM_RANK_FORWARD = mainJNI.Solver_CHOOSE_RANDOM_RANK_FORWARD_get()
static

Definition at line 4474 of file Solver.java.

◆ CHOOSE_STATIC_GLOBAL_BEST

final int com.google.ortools.constraintsolver.Solver.CHOOSE_STATIC_GLOBAL_BEST = mainJNI.Solver_CHOOSE_STATIC_GLOBAL_BEST_get()
static

EvaluatorStrategy.

This enum is used by Solver::MakePhase to specify how to select variables
and values during the search.
In Solver::MakePhase(const std::vector<IntVar*>&, IntVarStrategy,
IntValueStrategy), variables are selected first, and then the associated
value.
In Solver::MakePhase(const std::vector<IntVar*>& vars, IndexEvaluator2,
EvaluatorStrategy), the selection is done scanning every pair
<variable, possible value>. The next selected pair is then the best among
all possibilities, i.e. the pair with the smallest evaluation.
As this is costly, two options are offered: static or dynamic evaluation. Pairs are compared at the first call of the selector, and results are
cached. Next calls to the selector use the previous computation, and so
are not up-to-date, e.g. some <variable, value> pairs may not be
possible anymore due to propagation since the first to call.

Definition at line 4457 of file Solver.java.

◆ CROSS

final int com.google.ortools.constraintsolver.Solver.CROSS = mainJNI.Solver_CROSS_get()
static

Operator which cross exchanges the starting chains of 2 paths, including
exchanging the whole paths.
First and last nodes are not moved.
Possible neighbors for the paths 1 -> 2 -> 3 -> 4 -> 5 and 6 -> 7 -> 8
(where (1, 5) and (6, 8) are first and last nodes of the paths and can
therefore not be moved):
1 -> [7] -> 3 -> 4 -> 5 6 -> [2] -> 8
1 -> [7] -> 4 -> 5 6 -> [2 -> 3] -> 8
1 -> [7] -> 5 6 -> [2 -> 3 -> 4] -> 8

Definition at line 4561 of file Solver.java.

◆ CROSS_DATE

final int com.google.ortools.constraintsolver.Solver.CROSS_DATE = mainJNI.Solver_CROSS_DATE_get()
static

STARTS_BEFORE and ENDS_AFTER at the same time, i.e. d is in t.
t starts before d, i.e. Start(t) <= d.
t ends after d, i.e. End(t) >= d.

Definition at line 4813 of file Solver.java.

◆ DECREMENT

final int com.google.ortools.constraintsolver.Solver.DECREMENT = mainJNI.Solver_DECREMENT_get()
static

Operator which defines a neighborhood to decrement values.
The behavior is the same as INCREMENT, except values are decremented
instead of incremented.

Definition at line 4646 of file Solver.java.

◆ DELAYED_PRIORITY

final int com.google.ortools.constraintsolver.Solver.DELAYED_PRIORITY = mainJNI.Solver_DELAYED_PRIORITY_get()
static

DemonPriority.

This enum represents the three possible priorities for a demon in the
Solver queue.
Note: this is for advanced users only. DELAYED_PRIORITY is the lowest priority: Demons will be processed after
VAR_PRIORITY and NORMAL_PRIORITY demons.

Definition at line 4723 of file Solver.java.

◆ ENDS_AFTER

final int com.google.ortools.constraintsolver.Solver.ENDS_AFTER = mainJNI.Solver_ENDS_AFTER_get()
static

UnaryIntervalRelation.

This enum is used in Solver::MakeIntervalVarRelation to specify the
temporal relation between an interval t and an integer d. t ends after d, i.e. End(t) >= d.

Definition at line 4787 of file Solver.java.

◆ ENDS_AFTER_END

final int com.google.ortools.constraintsolver.Solver.ENDS_AFTER_END = mainJNI.Solver_ENDS_AFTER_END_get()
static

BinaryIntervalRelation.

This enum is used in Solver::MakeIntervalVarRelation to specify the
temporal relation between the two intervals t1 and t2. t1 ends after t2 end, i.e. End(t1) >= End(t2) + delay.

Definition at line 4742 of file Solver.java.

◆ ENDS_AFTER_START

final int com.google.ortools.constraintsolver.Solver.ENDS_AFTER_START = mainJNI.Solver_ENDS_AFTER_START_get()
static

t1 ends after t2 start, i.e. End(t1) >= Start(t2) + delay.

Definition at line 4746 of file Solver.java.

◆ ENDS_AT

final int com.google.ortools.constraintsolver.Solver.ENDS_AT = mainJNI.Solver_ENDS_AT_get()
static

t ends at d, i.e. End(t) == d.

Definition at line 4791 of file Solver.java.

◆ ENDS_AT_END

final int com.google.ortools.constraintsolver.Solver.ENDS_AT_END = mainJNI.Solver_ENDS_AT_END_get()
static

t1 ends at t2 end, i.e. End(t1) == End(t2) + delay.

Definition at line 4750 of file Solver.java.

◆ ENDS_AT_START

final int com.google.ortools.constraintsolver.Solver.ENDS_AT_START = mainJNI.Solver_ENDS_AT_START_get()
static

t1 ends at t2 start, i.e. End(t1) == Start(t2) + delay.

Definition at line 4754 of file Solver.java.

◆ ENDS_BEFORE

final int com.google.ortools.constraintsolver.Solver.ENDS_BEFORE = mainJNI.Solver_ENDS_BEFORE_get()
static

t ends before d, i.e. End(t) <= d.

Definition at line 4795 of file Solver.java.

◆ EQ

final int com.google.ortools.constraintsolver.Solver.EQ = mainJNI.Solver_EQ_get()
static

Move is accepted when the current objective value is in the interval
objective.Min .. objective.Max.

Definition at line 4710 of file Solver.java.

◆ EXCHANGE

final int com.google.ortools.constraintsolver.Solver.EXCHANGE = mainJNI.Solver_EXCHANGE_get()
static

Operator which exchanges the positions of two nodes.
Possible neighbors for the path 1 -> 2 -> 3 -> 4 -> 5
(where (1, 5) are first and last nodes of the path and can therefore not
be moved):
1 -> [3] -> [2] -> 4 -> 5
1 -> [4] -> 3 -> [2] -> 5
1 -> 2 -> [4] -> [3] -> 5

Definition at line 4549 of file Solver.java.

◆ EXTENDEDSWAPACTIVE

final int com.google.ortools.constraintsolver.Solver.EXTENDEDSWAPACTIVE = mainJNI.Solver_EXTENDEDSWAPACTIVE_get()
static

Operator which makes an inactive node active and an active one inactive.
It is similar to SwapActiveOperator except that it tries to insert the
inactive node in all possible positions instead of just the position of
the node made inactive.
Possible neighbors for the path 1 -> 2 -> 3 -> 4 with 5 inactive
(where 1 and 4 are first and last nodes of the path) are:
1 -> [5] -> 3 -> 4 with 2 inactive
1 -> 3 -> [5] -> 4 with 2 inactive
1 -> [5] -> 2 -> 4 with 3 inactive
1 -> 2 -> [5] -> 4 with 3 inactive

Definition at line 4608 of file Solver.java.

◆ FULLPATHLNS

final int com.google.ortools.constraintsolver.Solver.FULLPATHLNS = mainJNI.Solver_FULLPATHLNS_get()
static

Operator which relaxes one entire path and all inactive nodes, thus
defining num_paths neighbors.

Definition at line 4623 of file Solver.java.

◆ GE

final int com.google.ortools.constraintsolver.Solver.GE = mainJNI.Solver_GE_get()
static

LocalSearchFilterBound.

This enum is used in Solver::MakeLocalSearchObjectiveFilter. It specifies
the behavior of the objective filter to create. The goal is to define
under which condition a move is accepted based on the current objective
value. Move is accepted when the current objective value >= objective.Min.

Definition at line 4701 of file Solver.java.

◆ IN_ROOT_NODE

final int com.google.ortools.constraintsolver.Solver.IN_ROOT_NODE = mainJNI.Solver_IN_ROOT_NODE_get()
static

Executing the root node.

Definition at line 4881 of file Solver.java.

◆ IN_SEARCH

final int com.google.ortools.constraintsolver.Solver.IN_SEARCH = mainJNI.Solver_IN_SEARCH_get()
static

Executing the search code.

Definition at line 4885 of file Solver.java.

◆ INCREMENT

final int com.google.ortools.constraintsolver.Solver.INCREMENT = mainJNI.Solver_INCREMENT_get()
static

Operator which defines one neighbor per variable. Each neighbor tries to
increment by one the value of the corresponding variable. When a new
solution is found the neighborhood is rebuilt from scratch, i.e., tries
to increment values in the variable order.
Consider for instance variables x and y. x is incremented one by one to
its max, and when it is not possible to increment x anymore, y is
incremented once. If this is a solution, then next neighbor tries to
increment x.

Definition at line 4640 of file Solver.java.

◆ INT_VALUE_DEFAULT

final int com.google.ortools.constraintsolver.Solver.INT_VALUE_DEFAULT = mainJNI.Solver_INT_VALUE_DEFAULT_get()
static

IntValueStrategy.

This enum describes the strategy used to select the next variable value to
set. The default behavior is ASSIGN_MIN_VALUE.

Definition at line 4403 of file Solver.java.

◆ INT_VALUE_SIMPLE

final int com.google.ortools.constraintsolver.Solver.INT_VALUE_SIMPLE = mainJNI.Solver_INT_VALUE_SIMPLE_get()
static

The simple selection is ASSIGN_MIN_VALUE.

Definition at line 4407 of file Solver.java.

◆ INT_VAR_DEFAULT

final int com.google.ortools.constraintsolver.Solver.INT_VAR_DEFAULT = mainJNI.Solver_INT_VAR_DEFAULT_get()
static

IntVarStrategy.

This enum describes the strategy used to select the next branching
variable at each node during the search. The default behavior is CHOOSE_FIRST_UNBOUND.

Definition at line 4306 of file Solver.java.

◆ INT_VAR_SIMPLE

final int com.google.ortools.constraintsolver.Solver.INT_VAR_SIMPLE = mainJNI.Solver_INT_VAR_SIMPLE_get()
static

The simple selection is CHOOSE_FIRST_UNBOUND.

Definition at line 4310 of file Solver.java.

◆ INTERVAL_DEFAULT

final int com.google.ortools.constraintsolver.Solver.INTERVAL_DEFAULT = mainJNI.Solver_INTERVAL_DEFAULT_get()
static

IntervalStrategy.

This enum describes the straregy used to select the next interval variable
and its value to be fixed. The default is INTERVAL_SET_TIMES_FORWARD.

Definition at line 4485 of file Solver.java.

◆ INTERVAL_SET_TIMES_BACKWARD

final int com.google.ortools.constraintsolver.Solver.INTERVAL_SET_TIMES_BACKWARD = mainJNI.Solver_INTERVAL_SET_TIMES_BACKWARD_get()
static

Selects the variable with the highest ending time of all variables,
and fixes the ending time to this highest values.

Definition at line 4499 of file Solver.java.

◆ INTERVAL_SET_TIMES_FORWARD

final int com.google.ortools.constraintsolver.Solver.INTERVAL_SET_TIMES_FORWARD = mainJNI.Solver_INTERVAL_SET_TIMES_FORWARD_get()
static

Selects the variable with the lowest starting time of all variables,
and fixes its starting time to this lowest value.

Definition at line 4494 of file Solver.java.

◆ INTERVAL_SIMPLE

final int com.google.ortools.constraintsolver.Solver.INTERVAL_SIMPLE = mainJNI.Solver_INTERVAL_SIMPLE_get()
static

The simple is INTERVAL_SET_TIMES_FORWARD.

Definition at line 4489 of file Solver.java.

◆ KEEP_LEFT

final int com.google.ortools.constraintsolver.Solver.KEEP_LEFT = mainJNI.Solver_KEEP_LEFT_get()
static

Right branches are ignored. This is used to make the code faster when
backtrack makes no sense or is not useful.
This is faster as there is no need to create one new node per decision.

Definition at line 4840 of file Solver.java.

◆ KEEP_RIGHT

final int com.google.ortools.constraintsolver.Solver.KEEP_RIGHT = mainJNI.Solver_KEEP_RIGHT_get()
static

Left branches are ignored. This is used to make the code faster when
backtrack makes no sense or is not useful.
This is faster as there is no need to create one new node per decision.

Definition at line 4846 of file Solver.java.

◆ KILL_BOTH

final int com.google.ortools.constraintsolver.Solver.KILL_BOTH = mainJNI.Solver_KILL_BOTH_get()
static

Backtracks to the previous decisions, i.e. left and right branches are
not applied.

Definition at line 4851 of file Solver.java.

◆ kNumPriorities

final int com.google.ortools.constraintsolver.Solver.kNumPriorities = mainJNI.Solver_kNumPriorities_get()
static

Number of priorities for demons.

Definition at line 4296 of file Solver.java.

◆ LE

final int com.google.ortools.constraintsolver.Solver.LE = mainJNI.Solver_LE_get()
static

Move is accepted when the current objective value <= objective.Max.

Definition at line 4705 of file Solver.java.

◆ LK

final int com.google.ortools.constraintsolver.Solver.LK = mainJNI.Solver_LK_get()
static

EvaluatorLocalSearchOperators.

This enum is used in Solver::MakeOperator associated with an evaluator
to specify the neighborhood to create. Lin-Kernighan local search.
While the accumulated local gain is positive, perform a 2opt or a 3opt
move followed by a series of 2opt moves. Return a neighbor for which the
global gain is positive.

Definition at line 4670 of file Solver.java.

◆ MAKEACTIVE

final int com.google.ortools.constraintsolver.Solver.MAKEACTIVE = mainJNI.Solver_MAKEACTIVE_get()
static

Operator which inserts an inactive node into a path.
Possible neighbors for the path 1 -> 2 -> 3 -> 4 with 5 inactive
(where 1 and 4 are first and last nodes of the path) are:
1 -> [5] -> 2 -> 3 -> 4
1 -> 2 -> [5] -> 3 -> 4
1 -> 2 -> 3 -> [5] -> 4

Definition at line 4570 of file Solver.java.

◆ MAKECHAININACTIVE

final int com.google.ortools.constraintsolver.Solver.MAKECHAININACTIVE = mainJNI.Solver_MAKECHAININACTIVE_get()
static

Operator which makes a "chain" of path nodes inactive.
Possible neighbors for the path 1 -> 2 -> 3 -> 4 (where 1 and 4 are
first and last nodes of the path) are:
1 -> 3 -> 4 with 2 inactive
1 -> 2 -> 4 with 3 inactive
1 -> 4 with 2 and 3 inactive

Definition at line 4587 of file Solver.java.

◆ MAKEINACTIVE

final int com.google.ortools.constraintsolver.Solver.MAKEINACTIVE = mainJNI.Solver_MAKEINACTIVE_get()
static

Operator which makes path nodes inactive.
Possible neighbors for the path 1 -> 2 -> 3 -> 4 (where 1 and 4 are
first and last nodes of the path) are:
1 -> 3 -> 4 with 2 inactive
1 -> 2 -> 4 with 3 inactive

Definition at line 4578 of file Solver.java.

◆ MAXIMIZATION

final int com.google.ortools.constraintsolver.Solver.MAXIMIZATION = mainJNI.Solver_MAXIMIZATION_get()
static

Definition at line 4905 of file Solver.java.

◆ MINIMIZATION

final int com.google.ortools.constraintsolver.Solver.MINIMIZATION = mainJNI.Solver_MINIMIZATION_get()
static

Definition at line 4906 of file Solver.java.

◆ NO_CHANGE

final int com.google.ortools.constraintsolver.Solver.NO_CHANGE = mainJNI.Solver_NO_CHANGE_get()
static

DecisionModification.

The Solver is responsible for creating the search tree. Thanks to the
DecisionBuilder, it creates a new decision with two branches at each node:
left and right.
The DecisionModification enum is used to specify how the branch selector
should behave. Keeps the default behavior, i.e. apply left branch first, and then right
branch in case of backtracking.

Definition at line 4834 of file Solver.java.

◆ NO_MORE_SOLUTIONS

final int com.google.ortools.constraintsolver.Solver.NO_MORE_SOLUTIONS = mainJNI.Solver_NO_MORE_SOLUTIONS_get()
static

After failed NextSolution and before EndSearch.

Definition at line 4893 of file Solver.java.

◆ NORMAL_PRIORITY

final int com.google.ortools.constraintsolver.Solver.NORMAL_PRIORITY = mainJNI.Solver_NORMAL_PRIORITY_get()
static

NORMAL_PRIORITY is the highest priority: Demons will be processed first.

Definition at line 4731 of file Solver.java.

◆ NOT_SET

final int com.google.ortools.constraintsolver.Solver.NOT_SET = mainJNI.Solver_NOT_SET_get()
static

OptimizationDirection.

Optimization directions.

Definition at line 4904 of file Solver.java.

◆ OROPT

final int com.google.ortools.constraintsolver.Solver.OROPT = mainJNI.Solver_OROPT_get()
static

Relocate: OROPT and RELOCATE.
Operator which moves a sub-chain of a path to another position; the
specified chain length is the fixed length of the chains being moved.
When this length is 1, the operator simply moves a node to another
position.
Possible neighbors for the path 1 -> 2 -> 3 -> 4 -> 5, for a chain
length of 2 (where (1, 5) are first and last nodes of the path and can
therefore not be moved):
1 -> 4 -> [2 -> 3] -> 5
1 -> [3 -> 4] -> 2 -> 5

Using Relocate with chain lengths of 1, 2 and 3 together is equivalent
to the OrOpt operator on a path. The OrOpt operator is a limited
version of 3Opt (breaks 3 arcs on a path).

Definition at line 4535 of file Solver.java.

◆ OUTSIDE_SEARCH

final int com.google.ortools.constraintsolver.Solver.OUTSIDE_SEARCH = mainJNI.Solver_OUTSIDE_SEARCH_get()
static

SolverState.

This enum represents the state of the solver w.r.t. the search. Before search, after search.

Definition at line 4877 of file Solver.java.

◆ PATHLNS

final int com.google.ortools.constraintsolver.Solver.PATHLNS = mainJNI.Solver_PATHLNS_get()
static

Operator which relaxes two sub-chains of three consecutive arcs each.
Each sub-chain is defined by a start node and the next three arcs. Those
six arcs are relaxed to build a new neighbor.
PATHLNS explores all possible pairs of starting nodes and so defines
n^2 neighbors, n being the number of nodes.
Note that the two sub-chains can be part of the same path; they even may
overlap.

Definition at line 4618 of file Solver.java.

◆ PROBLEM_INFEASIBLE

final int com.google.ortools.constraintsolver.Solver.PROBLEM_INFEASIBLE = mainJNI.Solver_PROBLEM_INFEASIBLE_get()
static

After search, the model is infeasible.

Definition at line 4897 of file Solver.java.

◆ RELOCATE

final int com.google.ortools.constraintsolver.Solver.RELOCATE = mainJNI.Solver_RELOCATE_get()
static

Relocate neighborhood with length of 1 (see OROPT comment).

Definition at line 4539 of file Solver.java.

◆ REVERSIBLE_ACTION

final int com.google.ortools.constraintsolver.Solver.REVERSIBLE_ACTION = mainJNI.Solver_REVERSIBLE_ACTION_get()
static

Definition at line 4867 of file Solver.java.

◆ SENTINEL

final int com.google.ortools.constraintsolver.Solver.SENTINEL = mainJNI.Solver_SENTINEL_get()
static

MarkerType.

This enum is used internally in private methods Solver::PushState and
Solver::PopState to tag states in the search tree.

Definition at line 4864 of file Solver.java.

◆ SEQUENCE_DEFAULT

final int com.google.ortools.constraintsolver.Solver.SEQUENCE_DEFAULT = mainJNI.Solver_SEQUENCE_DEFAULT_get()
static

SequenceStrategy.

Used for scheduling. Not yet implemented.

Definition at line 4471 of file Solver.java.

◆ SEQUENCE_SIMPLE

final int com.google.ortools.constraintsolver.Solver.SEQUENCE_SIMPLE = mainJNI.Solver_SEQUENCE_SIMPLE_get()
static

Definition at line 4472 of file Solver.java.

◆ SIMPLE_MARKER

final int com.google.ortools.constraintsolver.Solver.SIMPLE_MARKER = mainJNI.Solver_SIMPLE_MARKER_get()
static

Definition at line 4865 of file Solver.java.

◆ SIMPLELNS

final int com.google.ortools.constraintsolver.Solver.SIMPLELNS = mainJNI.Solver_SIMPLELNS_get()
static

Operator which defines one neighbor per variable. Each neighbor relaxes
one variable.
When a new solution is found the neighborhood is rebuilt from scratch.
Consider for instance variables x and y. First x is relaxed and the
solver is looking for the best possible solution (with only x relaxed).
Then y is relaxed, and the solver is looking for a new solution.
If a new solution is found, then the next variable to be relaxed is x.

Definition at line 4656 of file Solver.java.

◆ SPLIT_LOWER_HALF

final int com.google.ortools.constraintsolver.Solver.SPLIT_LOWER_HALF = mainJNI.Solver_SPLIT_LOWER_HALF_get()
static

Split the domain in two around the center, and choose the lower
part first.

Definition at line 4430 of file Solver.java.

◆ SPLIT_UPPER_HALF

final int com.google.ortools.constraintsolver.Solver.SPLIT_UPPER_HALF = mainJNI.Solver_SPLIT_UPPER_HALF_get()
static

Split the domain in two around the center, and choose the lower
part first.

Definition at line 4435 of file Solver.java.

◆ STARTS_AFTER

final int com.google.ortools.constraintsolver.Solver.STARTS_AFTER = mainJNI.Solver_STARTS_AFTER_get()
static

t starts after d, i.e. Start(t) >= d.

Definition at line 4799 of file Solver.java.

◆ STARTS_AFTER_END

final int com.google.ortools.constraintsolver.Solver.STARTS_AFTER_END = mainJNI.Solver_STARTS_AFTER_END_get()
static

t1 starts after t2 end, i.e. Start(t1) >= End(t2) + delay.

Definition at line 4758 of file Solver.java.

◆ STARTS_AFTER_START

final int com.google.ortools.constraintsolver.Solver.STARTS_AFTER_START = mainJNI.Solver_STARTS_AFTER_START_get()
static

t1 starts after t2 start, i.e. Start(t1) >= Start(t2) + delay.

Definition at line 4762 of file Solver.java.

◆ STARTS_AT

final int com.google.ortools.constraintsolver.Solver.STARTS_AT = mainJNI.Solver_STARTS_AT_get()
static

t starts at d, i.e. Start(t) == d.

Definition at line 4803 of file Solver.java.

◆ STARTS_AT_END

final int com.google.ortools.constraintsolver.Solver.STARTS_AT_END = mainJNI.Solver_STARTS_AT_END_get()
static

t1 starts at t2 end, i.e. Start(t1) == End(t2) + delay.

Definition at line 4766 of file Solver.java.

◆ STARTS_AT_START

final int com.google.ortools.constraintsolver.Solver.STARTS_AT_START = mainJNI.Solver_STARTS_AT_START_get()
static

t1 starts at t2 start, i.e. Start(t1) == Start(t2) + delay.

Definition at line 4770 of file Solver.java.

◆ STARTS_BEFORE

final int com.google.ortools.constraintsolver.Solver.STARTS_BEFORE = mainJNI.Solver_STARTS_BEFORE_get()
static

t starts before d, i.e. Start(t) <= d.

Definition at line 4807 of file Solver.java.

◆ STAYS_IN_SYNC

final int com.google.ortools.constraintsolver.Solver.STAYS_IN_SYNC = mainJNI.Solver_STAYS_IN_SYNC_get()
static

STARTS_AT_START and ENDS_AT_END at the same time.
t1 starts at t2 start, i.e. Start(t1) == Start(t2) + delay.
t1 ends at t2 end, i.e. End(t1) == End(t2).

Definition at line 4776 of file Solver.java.

◆ SWAPACTIVE

final int com.google.ortools.constraintsolver.Solver.SWAPACTIVE = mainJNI.Solver_SWAPACTIVE_get()
static

Operator which replaces an active node by an inactive one.
Possible neighbors for the path 1 -> 2 -> 3 -> 4 with 5 inactive
(where 1 and 4 are first and last nodes of the path) are:
1 -> [5] -> 3 -> 4 with 2 inactive
1 -> 2 -> [5] -> 4 with 3 inactive

Definition at line 4595 of file Solver.java.

◆ swigCMemOwn

transient boolean com.google.ortools.constraintsolver.Solver.swigCMemOwn
protected

Definition at line 78 of file Solver.java.

◆ SWITCH_BRANCHES

final int com.google.ortools.constraintsolver.Solver.SWITCH_BRANCHES = mainJNI.Solver_SWITCH_BRANCHES_get()
static

Applies right branch first. Left branch will be applied in case of
backtracking.

Definition at line 4856 of file Solver.java.

◆ TSPLNS

final int com.google.ortools.constraintsolver.Solver.TSPLNS = mainJNI.Solver_TSPLNS_get()
static

TSP-base LNS.
Randomly merge consecutive nodes until n "meta"-nodes remain and solve
the corresponding TSP.
This is an "unlimited" neighborhood which must be stopped by search
limits. To force diversification, the operator iteratively forces each
node to serve as base of a meta-node.

Definition at line 4688 of file Solver.java.

◆ TSPOPT

final int com.google.ortools.constraintsolver.Solver.TSPOPT = mainJNI.Solver_TSPOPT_get()
static

Sliding TSP operator.
Uses an exact dynamic programming algorithm to solve the TSP
corresponding to path sub-chains.
For a subchain 1 -> 2 -> 3 -> 4 -> 5 -> 6, solves the TSP on
nodes A, 2, 3, 4, 5, where A is a merger of nodes 1 and 6 such that
cost(A,i) = cost(1,i) and cost(i,A) = cost(i,6).

Definition at line 4679 of file Solver.java.

◆ TWOOPT

final int com.google.ortools.constraintsolver.Solver.TWOOPT = mainJNI.Solver_TWOOPT_get()
static

LocalSearchOperators.

This enum is used in Solver::MakeOperator to specify the neighborhood to
create. Operator which reverses a sub-chain of a path. It is called TwoOpt
because it breaks two arcs on the path; resulting paths are called
two-optimal.
Possible neighbors for the path 1 -> 2 -> 3 -> 4 -> 5
(where (1, 5) are first and last nodes of the path and can therefore not
be moved):
1 -> [3 -> 2] -> 4 -> 5
1 -> [4 -> 3 -> 2] -> 5
1 -> 2 -> [4 -> 3] -> 5

Definition at line 4518 of file Solver.java.

◆ UNACTIVELNS

final int com.google.ortools.constraintsolver.Solver.UNACTIVELNS = mainJNI.Solver_UNACTIVELNS_get()
static

Operator which relaxes all inactive nodes and one sub-chain of six
consecutive arcs. That way the path can be improved by inserting
inactive nodes or swapping arcs.

Definition at line 4629 of file Solver.java.

◆ VAR_PRIORITY

final int com.google.ortools.constraintsolver.Solver.VAR_PRIORITY = mainJNI.Solver_VAR_PRIORITY_get()
static

VAR_PRIORITY is between DELAYED_PRIORITY and NORMAL_PRIORITY.

Definition at line 4727 of file Solver.java.


The documentation for this class was generated from the following file: