FRAMES NO FRAMES

Class IloTimeWindowNHoodI

Definition file: ilsched/ilolnsgoals.h
Include file: <ilsched/iloscheduler.h>

An instance of this class represents a time window neighborhood.

The size of this neighborhood is the number of time windows created internally and depends on two parameters (integers) provided to the constructor: windowSize and windowStep.

The parameter windowSize represents the number of activities in any time window.

The parameter windowStep represents the number of activities skipped to move to the next time window.

For example, suppose there are 20 activities and windowSize equals 10 and windowStep is 5. Three time windows are then created, with the first one containing the first 10 activities with index in [0..10), the second one containing the activities with index in [5..15), and the last one containing the activities with index from [15..20).

New member functions are available to check if an activity or a resource constraint is before or after the selected activities and resource constraints.

Default behavior is to only restore resource constraints that are not selected (not in the current time window). This behavior can be changed by specifying appropriate predicates (for example, see the member function IloSchedulerLargeNHoodI::setRestoreActivityStartPredicate.

See Also:

Constructor and Destructor Summary
public IloTimeWindowNHoodI(IloEnv env, IloInt windowSize, IloInt windowStep, IloComparator< IloTimeWindowNHoodI::IloTimeWindow > comparator, IloPredicate< IloActivity > predicate, const char * name=0)
Method Summary
public virtual IloSolutiondefineSelected(IloSolver solver, IloInt index)
public IloBoolisAfterSelected(IloResourceConstraint rc) const
public IloBoolisAfterSelected(IloActivity activity) const
public IloBoolisBeforeSelected(IloResourceConstraint rc) const
public IloBoolisBeforeSelected(IloActivity activity) const
Inherited Methods from IloSchedulerLargeNHoodI
define, defineRestoreInfo, defineSelected, finalizeDelta, getCurrentSolution, getRestoreActivityDurationPredicate, getRestoreActivityEndPredicate, getRestoreActivityExternalPredicate, getRestoreActivityProcessingTimePredicate, getRestoreActivityStartPredicate, getRestoreExtractablePredicate, getRestoreInfo, getRestoreRCCapacityPredicate, getRestoreRCDirectPredecessorPredicate, getRestoreRCDirectSuccessorPredicate, getRestoreRCNextPredicate, getRestoreRCPrevPredicate, getRestoreRCSelectedPredicate, getRestoreRCSetupPredicate, getRestoreRCTeardownPredicate, isSelected, setRestoreActivityDurationPredicate, setRestoreActivityEndPredicate, setRestoreActivityExternalPredicate, setRestoreActivityProcessingTimePredicate, setRestoreActivityStartPredicate, setRestoreExtractablePredicate, setRestoreRCCapacityPredicate, setRestoreRCDirectPredecessorPredicate, setRestoreRCDirectSuccessorPredicate, setRestoreRCNextPredicate, setRestoreRCPrevPredicate, setRestoreRCSelectedPredicate, setRestoreRCSetupPredicate, setRestoreRCTeardownPredicate
Inner Class
IloTimeWindowNHoodI::IloTimeWindow
Constructor and Destructor Detail

IloTimeWindowNHoodI

public IloTimeWindowNHoodI(IloEnv env, IloInt windowSize, IloInt windowStep, IloComparator< IloTimeWindowNHoodI::IloTimeWindow > comparator, IloPredicate< IloActivity > predicate, const char * name=0)

This constructor creates a time window neighborhood. The parameter windowSize specifies the number of activities of any time window considered, and the parameter windowStep specifies the number of activities to skip to move to the next time window.

The parameter comparator is used (if not an empty handle) to specify in which order the time windows should be considered.

The parameter predicate is used (if not an empty handle) to specify the activities in the current solution to use to build the time windows.

Parameters windowSize and windowStep must be positive integers. An error is raised if the parameter windowStep is greater than parameter windowSize.


Method Detail

defineSelected

public virtual IloSolution defineSelected(IloSolver solver, IloInt index)

This pure virtual member function returns the set of decision variables, or instances of IloExtractable, on which to focus the search.


isAfterSelected

public IloBool isAfterSelected(IloResourceConstraint rc) const

This member function returns IloTrue if the start in the current solution of the activity associated with the resource constraint is greater than the end of the time interval.


isAfterSelected

public IloBool isAfterSelected(IloActivity activity) const

This member function returns IloTrue if the end in the current solution of the activity is greater than or equal to the end of the time interval.


isBeforeSelected

public IloBool isBeforeSelected(IloResourceConstraint rc) const

This member function returns IloTrue if the start in the current solution of the activity associated to the resource contraint is less than the start of the time interval.


isBeforeSelected

public IloBool isBeforeSelected(IloActivity activity) const

This member function returns IloTrue if the start in the current solution of the activity is less than the start of the time interval.