FRAMES NO FRAMES

Class IloTransitionTime

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

The class IloTransitionTime allows definition of transition time for a resource.

More precisely, an instance of IloTransitionTime allows association of an instance of either an IloTransitionParam or a user-defined IloTransitionTimeObject with a resource.

If the IloTransitionTime is defined with an instance of IloTransitionParam, the transition times on that resource will be computed by using the IloTransitionParam and the transition types of the activities.

If the IloTransitionTime is defined with an instance of IloTransitionTimeObject, the transition times on that resource will be computed by using the object extracted from the IloTransitionTimeObject and the virtual transition times it defines.

Note that at most one transition time can be active on a resource. Any attempt to create a transition time on a resource that has already been associated with a transition time will override the previous transition time.

This class inherits from the IBM® ILOG® Concert Technology class IloExtractable. That class is documented in the IBM ILOG Concert Technology Reference Manual.

For more information, see Calendars and Transition Times.

See Also:

Constructor Summary
public IloTransitionTime()
public IloTransitionTime(IloTransitionTimeI * impl)
public IloTransitionTime(const IloResource resource, const IloTransitionParam param, const char * name=0)
public IloTransitionTime(const IloResource resource, const IloTransitionTimeObject tobj, const char * name=0)
Method Summary
public IloTransitionTimeI *getImpl() const
public IloNumgetTime(const IloResourceConstraint rct1x, const IloResourceConstraint rct2x) const
public IloTransitionTimeObjectgetTransitionTimeObject() const
public IloBoolisSuspended() const
public voidsetSuspended(IloBool suspended=IloTrue)
public voidsetTransitionParam(const IloTransitionParam param) const
Constructor Detail

IloTransitionTime

public IloTransitionTime()
This constructor creates an instance that is empty, that is, one whose handle pointer is null. You must assign it a value before you access it. Any attempt to access it before assignment leads to undefined behaviour.

IloTransitionTime

public IloTransitionTime(IloTransitionTimeI * impl)
This constructor creates an instance of the handle class from the pointer to an instance of the implementation class.

IloTransitionTime

public IloTransitionTime(const IloResource resource, const IloTransitionParam param, const char * name=0)

This constructor creates a transition time for resource. Transition times on resource will be computed by using the transition parameter param. If the resource resource was already associated a transition time, the new transition time overrides the previous one.


IloTransitionTime

public IloTransitionTime(const IloResource resource, const IloTransitionTimeObject tobj, const char * name=0)

This constructor creates a transition time for resource. Transition times on resource will be computed by using the transition time object tobj. If resource was already associated a transition time, the new transition time overrides the previous one.


Method Detail

getImpl

public IloTransitionTimeI * getImpl() const
This member function returns a pointer to the implementation object of the invoking handle.

getTime

public IloNum getTime(const IloResourceConstraint rct1x, const IloResourceConstraint rct2x) const

This member function returns the transition time between the two resource constraints given as arguments. The transition time is computed by using the transition type of the activities and the current transition parameter. More precisely, if activity of rct1x is of type t1, and activity rct2x is of type t2, then this member function will return the value corresponding to row t1 and column t2 on the transition parameter. In other words, it will return the value that was set by using IloTransitionParam::setValue(t1,t2). This member function will throw an exception if the transition time is defined with a transition time object as the transition function will be created only at extraction time.


getTransitionTimeObject

public IloTransitionTimeObject getTransitionTimeObject() const

If the invoking transition time has been created with a user-defined transition time object, this member function will return this transition time object. Otherwise, it will return an empty handle.


isSuspended

public IloBool isSuspended() const

This member function returns IloTrue if and only if the invoking transition time has been declared to be suspended by breaks.


setSuspended

public void setSuspended(IloBool suspended=IloTrue)

This member function allows specifying whether the invoking transition time is suspended by breaks or not. By default, a transition time is not suspended by breaks.


setTransitionParam

public void setTransitionParam(const IloTransitionParam param) const

This member function allows changing the transition parameter used to compute the transition times of the resources of the invoking instance of IloTransitionTime.