FRAMES NO FRAMES

Class IloTimeWindowNHood

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 member function IloSchedulerLargeNHoodI::setRestoreActivityStartPredicate.

See Also:

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

IloTimeWindowNHood

public IloTimeWindowNHood(IloEnv env, IloInt windowSize, IloInt windowStep, 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.

An error is raised if windowStep and windowSize are not positive numbers, or if windowStep is greater than windowSize.


IloTimeWindowNHood

public IloTimeWindowNHood(IloEnv env, IloInt windowSize, IloInt windowStep, IloComparator< IloTimeWindowNHoodI::IloTimeWindow > comparator, 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 to specify in which order the time windows should be considered.


IloTimeWindowNHood

public IloTimeWindowNHood(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 to specify in which order the time windows should be considered.

The parameter predicate is used to specify the activities in the current solution to use to build the time windows.


Method Detail

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 with 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.