Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
com.google.ortools.constraintsolver.OptimizeVar Class Reference
Inheritance diagram for com.google.ortools.constraintsolver.OptimizeVar:
com.google.ortools.constraintsolver.ObjectiveMonitor com.google.ortools.constraintsolver.SearchMonitor com.google.ortools.constraintsolver.BaseObject

Public Member Functions

synchronized void delete ()
 
void keepAliveDecisionBuilder (DecisionBuilder db)
 
 OptimizeVar (Solver solver, boolean maximize, IntVar var, long step)
 
 OptimizeVar (Solver solver, SWIGTYPE_p_std__vectorT_bool_t maximize, IntVar[] vars, long[] steps)
 
long best ()
 
IntVar var ()
 
void beginNextDecision (DecisionBuilder db)
 
void refuteDecision (Decision d)
 
boolean atSolution ()
 
boolean acceptSolution ()
 
String Name ()
 
String toString ()
 
void applyBound ()
 
- Public Member Functions inherited from com.google.ortools.constraintsolver.ObjectiveMonitor
 ObjectiveMonitor (Solver solver, SWIGTYPE_p_std__vectorT_bool_t maximize, IntVar[] vars, long[] steps)
 
IntVar ObjectiveVar (int index)
 
IntVar MinimizationVar (int index)
 
long Step (int index)
 
boolean Maximize (int index)
 
long BestValue (int index)
 
int Size ()
 
void enterSearch ()
 
boolean acceptDelta (Assignment delta, Assignment deltadelta)
 
void accept (ModelVisitor visitor)
 
- Public Member Functions inherited from com.google.ortools.constraintsolver.SearchMonitor
void swigReleaseOwnership ()
 
void swigTakeOwnership ()
 
 SearchMonitor (Solver s)
 
void restartSearch ()
 
void exitSearch ()
 
void endNextDecision (DecisionBuilder b, Decision d)
 
void applyDecision (Decision d)
 
void afterDecision (Decision d, boolean apply)
 
void beginFail ()
 
void endFail ()
 
void beginInitialPropagation ()
 
void endInitialPropagation ()
 
void noMoreSolutions ()
 
boolean localOptimum ()
 
void acceptNeighbor ()
 
void AcceptUncheckedNeighbor ()
 
boolean IsUncheckedSolutionLimitReached ()
 
void periodicCheck ()
 
int progressPercent ()
 
void install ()
 
Solver solver ()
 
- Public Member Functions inherited from com.google.ortools.constraintsolver.BaseObject
 BaseObject ()
 

Protected Member Functions

 OptimizeVar (long cPtr, boolean cMemoryOwn)
 
void finalize ()
 
- Protected Member Functions inherited from com.google.ortools.constraintsolver.ObjectiveMonitor
 ObjectiveMonitor (long cPtr, boolean cMemoryOwn)
 
- Protected Member Functions inherited from com.google.ortools.constraintsolver.SearchMonitor
 SearchMonitor (long cPtr, boolean cMemoryOwn)
 
void swigDirectorDisconnect ()
 
- Protected Member Functions inherited from com.google.ortools.constraintsolver.BaseObject
 BaseObject (long cPtr, boolean cMemoryOwn)
 

Static Protected Member Functions

static long getCPtr (OptimizeVar obj)
 
static long swigRelease (OptimizeVar obj)
 
- Static Protected Member Functions inherited from com.google.ortools.constraintsolver.ObjectiveMonitor
static long getCPtr (ObjectiveMonitor obj)
 
static long swigRelease (ObjectiveMonitor obj)
 
- Static Protected Member Functions inherited from com.google.ortools.constraintsolver.SearchMonitor
static long getCPtr (SearchMonitor obj)
 
static long swigRelease (SearchMonitor obj)
 
- Static Protected Member Functions inherited from com.google.ortools.constraintsolver.BaseObject
static long getCPtr (BaseObject obj)
 
static long swigRelease (BaseObject obj)
 

Additional Inherited Members

- Static Public Attributes inherited from com.google.ortools.constraintsolver.SearchMonitor
static final int kNoProgress = mainJNI.SearchMonitor_kNoProgress_get()
 
- Protected Attributes inherited from com.google.ortools.constraintsolver.BaseObject
transient boolean swigCMemOwn
 

Detailed Description

This class encapsulates an objective. It requires the direction
(minimize or maximize), the variable to optimize, and the
improvement step.

Definition at line 16 of file OptimizeVar.java.

Constructor & Destructor Documentation

◆ OptimizeVar() [1/3]

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

Definition at line 19 of file OptimizeVar.java.

◆ OptimizeVar() [2/3]

com.google.ortools.constraintsolver.OptimizeVar.OptimizeVar ( Solver solver,
boolean maximize,
IntVar var,
long step )

Definition at line 58 of file OptimizeVar.java.

◆ OptimizeVar() [3/3]

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

Definition at line 62 of file OptimizeVar.java.

Member Function Documentation

◆ acceptSolution()

boolean com.google.ortools.constraintsolver.OptimizeVar.acceptSolution ( )

This method is called when a solution is found. It asserts whether the
solution is valid. A value of false indicates that the solution
should be discarded.

Reimplemented from com.google.ortools.constraintsolver.SearchMonitor.

Definition at line 100 of file OptimizeVar.java.

◆ applyBound()

void com.google.ortools.constraintsolver.OptimizeVar.applyBound ( )

Definition at line 112 of file OptimizeVar.java.

◆ atSolution()

boolean com.google.ortools.constraintsolver.OptimizeVar.atSolution ( )

This method is called when a valid solution is found. If the
return value is true, then search will resume after. If the result
is false, then search will stop there.

Reimplemented from com.google.ortools.constraintsolver.ObjectiveMonitor.

Definition at line 96 of file OptimizeVar.java.

◆ beginNextDecision()

void com.google.ortools.constraintsolver.OptimizeVar.beginNextDecision ( DecisionBuilder db)

Internal methods.

Reimplemented from com.google.ortools.constraintsolver.SearchMonitor.

Definition at line 84 of file OptimizeVar.java.

◆ best()

long com.google.ortools.constraintsolver.OptimizeVar.best ( )

Returns the best value found during search.

Definition at line 69 of file OptimizeVar.java.

◆ delete()

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

Reimplemented from com.google.ortools.constraintsolver.ObjectiveMonitor.

Definition at line 45 of file OptimizeVar.java.

◆ finalize()

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

Reimplemented from com.google.ortools.constraintsolver.ObjectiveMonitor.

Definition at line 41 of file OptimizeVar.java.

◆ getCPtr()

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

Definition at line 24 of file OptimizeVar.java.

◆ keepAliveDecisionBuilder()

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

Reimplemented from com.google.ortools.constraintsolver.SearchMonitor.

Definition at line 56 of file OptimizeVar.java.

◆ Name()

String com.google.ortools.constraintsolver.OptimizeVar.Name ( )

Definition at line 104 of file OptimizeVar.java.

◆ refuteDecision()

void com.google.ortools.constraintsolver.OptimizeVar.refuteDecision ( Decision d)

Before refuting the decision.

Reimplemented from com.google.ortools.constraintsolver.SearchMonitor.

Definition at line 92 of file OptimizeVar.java.

◆ swigRelease()

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

Definition at line 28 of file OptimizeVar.java.

◆ toString()

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

Reimplemented from com.google.ortools.constraintsolver.BaseObject.

Definition at line 108 of file OptimizeVar.java.

◆ var()

IntVar com.google.ortools.constraintsolver.OptimizeVar.var ( )

Returns the variable that is optimized.

Definition at line 76 of file OptimizeVar.java.


The documentation for this class was generated from the following file: