Java Reference

Java Reference

SequenceVar

Detailed Description

A sequence variable is a variable whose domain is a set of possible orderings of the interval variables.

It allows ordering of tasks. It has two sets of methods: ComputePossibleFirstsAndLasts(), which returns the list of interval variables that can be ranked first or last; and RankFirst/RankNotFirst/RankLast/RankNotLast, which can be used to create the search decision.

Definition at line 14 of file SequenceVar.java.

Public Member Functions

synchronized void delete ()
 
 SequenceVar (Solver s, IntervalVar[] intervals, IntVar[] nexts, String name)
 
String toString ()
 
void rankFirst (int index)
 Ranks the index_th interval var first of all unranked interval vars. More...
 
void rankNotFirst (int index)
 Indicates that the index_th interval var will not be ranked first of all currently unranked interval vars. More...
 
void rankLast (int index)
 Ranks the index_th interval var first of all unranked interval vars. More...
 
void rankNotLast (int index)
 Indicates that the index_th interval var will not be ranked first of all currently unranked interval vars. More...
 
void rankSequence (int[] rank_first, int[] rank_last, int[] unperformed)
 Applies the following sequence of ranks, ranks first, then rank last. More...
 
IntervalVar interval (int index)
 Returns the index_th interval of the sequence. More...
 
IntVar next (int index)
 Returns the next of the index_th interval of the sequence. More...
 
long size ()
 Returns the number of interval vars in the sequence. More...
 
void accept (ModelVisitor visitor)
 Accepts the given visitor. More...
 
Solver solver ()
 
void freezeQueue ()
 This method freezes the propagation queue. More...
 
void unfreezeQueue ()
 This method unfreezes the propagation queue. More...
 
void enqueueDelayedDemon (Demon d)
 This method pushes the demon onto the propagation queue. More...
 
void enqueueVar (Demon d)
 
void reset_action_on_fail ()
 This method clears the failure callback. More...
 
void set_variable_to_clean_on_fail (IntVar v)
 Shortcut for variable cleaner. More...
 
String name ()
 Object naming. More...
 
void setName (String name)
 
boolean hasName ()
 Returns whether the object has been named or not. More...
 
String baseName ()
 Returns a base name for automatic naming. More...
 

Protected Member Functions

 SequenceVar (long cPtr, boolean cMemoryOwn)
 

Constructor & Destructor Documentation

◆ SequenceVar() [1/2]

SequenceVar ( long  cPtr,
boolean  cMemoryOwn 
)
inlineprotected

Definition at line 17 of file SequenceVar.java.

◆ SequenceVar() [2/2]

SequenceVar ( Solver  s,
IntervalVar[]  intervals,
IntVar[]  nexts,
String  name 
)
inline

Definition at line 42 of file SequenceVar.java.

Member Function Documentation

◆ accept()

void accept ( ModelVisitor  visitor)
inline

Accepts the given visitor.

Definition at line 111 of file SequenceVar.java.

◆ baseName()

String baseName ( )
inlineinherited

Returns a base name for automatic naming.

Reimplemented in BooleanVar.

Definition at line 115 of file PropagationBaseObject.java.

◆ delete()

synchronized void delete ( )
inline

Reimplemented from PropagationBaseObject.

Definition at line 31 of file SequenceVar.java.

◆ enqueueDelayedDemon()

void enqueueDelayedDemon ( Demon  d)
inlineinherited

This method pushes the demon onto the propagation queue.

It will be processed directly if the queue is empty. It will be enqueued according to its priority otherwise.

Definition at line 72 of file PropagationBaseObject.java.

◆ enqueueVar()

void enqueueVar ( Demon  d)
inlineinherited

Definition at line 76 of file PropagationBaseObject.java.

◆ freezeQueue()

void freezeQueue ( )
inlineinherited

This method freezes the propagation queue.

It is useful when you need to apply multiple modifications at once.

Definition at line 58 of file PropagationBaseObject.java.

◆ hasName()

boolean hasName ( )
inlineinherited

Returns whether the object has been named or not.

Definition at line 108 of file PropagationBaseObject.java.

◆ interval()

IntervalVar interval ( int  index)
inline

Returns the index_th interval of the sequence.

Definition at line 88 of file SequenceVar.java.

◆ name()

String name ( )
inlineinherited

Object naming.

Definition at line 97 of file PropagationBaseObject.java.

◆ next()

IntVar next ( int  index)
inline

Returns the next of the index_th interval of the sequence.

Definition at line 96 of file SequenceVar.java.

◆ rankFirst()

void rankFirst ( int  index)
inline

Ranks the index_th interval var first of all unranked interval vars.

After that, it will no longer be considered ranked.

Definition at line 53 of file SequenceVar.java.

◆ rankLast()

void rankLast ( int  index)
inline

Ranks the index_th interval var first of all unranked interval vars.

After that, it will no longer be considered ranked.

Definition at line 67 of file SequenceVar.java.

◆ rankNotFirst()

void rankNotFirst ( int  index)
inline

Indicates that the index_th interval var will not be ranked first of all currently unranked interval vars.

Definition at line 60 of file SequenceVar.java.

◆ rankNotLast()

void rankNotLast ( int  index)
inline

Indicates that the index_th interval var will not be ranked first of all currently unranked interval vars.

Definition at line 74 of file SequenceVar.java.

◆ rankSequence()

void rankSequence ( int[]  rank_first,
int[]  rank_last,
int[]  unperformed 
)
inline

Applies the following sequence of ranks, ranks first, then rank last.

rank_first and rank_last represents different directions. rank_first[0] corresponds to the first interval of the sequence. rank_last[0] corresponds to the last interval of the sequence. All intervals in the unperformed vector will be marked as such.

Definition at line 81 of file SequenceVar.java.

◆ reset_action_on_fail()

void reset_action_on_fail ( )
inlineinherited

This method clears the failure callback.

Definition at line 83 of file PropagationBaseObject.java.

◆ set_variable_to_clean_on_fail()

void set_variable_to_clean_on_fail ( IntVar  v)
inlineinherited

Shortcut for variable cleaner.

Definition at line 90 of file PropagationBaseObject.java.

◆ setName()

void setName ( String  name)
inlineinherited

Definition at line 101 of file PropagationBaseObject.java.

◆ size()

long size ( )
inline

Returns the number of interval vars in the sequence.

Definition at line 104 of file SequenceVar.java.

◆ solver()

Solver solver ( )
inlineinherited

Definition at line 50 of file PropagationBaseObject.java.

◆ toString()

String toString ( )
inline

Reimplemented from PropagationBaseObject.

Definition at line 46 of file SequenceVar.java.

◆ unfreezeQueue()

void unfreezeQueue ( )
inlineinherited

This method unfreezes the propagation queue.

All modifications that happened when the queue was frozen will be processed.

Definition at line 65 of file PropagationBaseObject.java.


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