FRAMES NO FRAMES

Class IloTransitionCost

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

The class IloTransitionCost allows definition of a transition cost for a unary resource. More precisely, an instance of IloTransitionCost allows association of an instance of either IloTransitionParam or a user-defined IloTransitionCostObject with a unary resource.

If the IloTransitionCost is defined with an instance of IloTransitionParam, the transition costs on that unary resource will then be computed by using the IloTransitionParam and the transition types of activities.

If the IloTransitionCost is defined with an instance of IloTransitionCostObject, the transition costs on that unary resource will then be computed by using the object extracted from the IloTransitionCostObject and the virtual transition costs it defines.

Note that several transition costs can be defined on the same unary resource.

The type of the transition cost is set to Next whenever one of these member functions is called: IloTransitionCost::getNextCostExpr, or IloTransitionCost::getSetupCostExpr.

The type of the transition cost is set to Prev whenever either of these member functions is called: IloTransitionCost::getPrevCostExpr, or IloTransitionCost::getTeardownCostExpr.

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 Transition Costs.

See Also:

Constructor Summary
public IloTransitionCost()
public IloTransitionCost(IloTransitionCostI * impl)
public IloTransitionCost(const IloUnaryResource resource, const IloTransitionParam param, const char * name=0)
public IloTransitionCost(const IloUnaryResource resource, const IloTransitionParam param, IloBool isNext, const char * name=0)
public IloTransitionCost(const IloUnaryResource resource, const IloTransitionCostObject tobj, const char * name=0)
public IloTransitionCost(const IloUnaryResource resource, const IloTransitionCostObject tobj, IloBool isNext, const char * name=0)
Method Summary
public IloNumgetCost(const IloResourceConstraint rct1x, const IloResourceConstraint rct2x) const
public IloNumVargetCostSumVar() const
public IloTransitionCostI *getImpl() const
public IloIntExprArggetNextCostExpr(const IloResourceConstraint rct) const
public IloNumgetNextCostMax(IloResourceConstraint rct) const
public IloNumgetNextCostMin(IloResourceConstraint rct) const
public IloIntExprArggetPrevCostExpr(const IloResourceConstraint rct) const
public IloNumgetPrevCostMax(IloResourceConstraint rct) const
public IloNumgetPrevCostMin(IloResourceConstraint rct) const
public IloNumgetSetupCost(const IloResourceConstraint rct) const
public IloIntExprArggetSetupCostExpr() const
public IloNumgetSetupCostMax() const
public IloNumgetSetupCostMin() const
public IloNumgetTeardownCost(IloResourceConstraint rct) const
public IloIntExprArggetTeardownCostExpr() const
public IloNumgetTeardownCostMax() const
public IloNumgetTeardownCostMin() const
public IloTransitionCostObjectgetTransitionCostObject() const
public IloBoolhasCostSumVar() const
public IloBoolisNextTransitionCost() const
public IloBoolisPrevTransitionCost() const
public voidsetCostSumVar(const IloNumVar sum) const
public voidsetNextCostMax(IloResourceConstraint rct, IloNum value)
public voidsetNextCostMin(IloResourceConstraint rct, IloNum value)
public voidsetPrevCostMax(IloResourceConstraint rct, IloNum value)
public voidsetPrevCostMin(IloResourceConstraint rct, IloNum value)
public voidsetSetupCostMax(IloInt value) const
public voidsetSetupCostMin(IloInt value) const
public voidsetTeardownCostMax(IloInt value) const
public voidsetTeardownCostMin(IloInt value) const
public voidsetTransitionParam(const IloTransitionParam param) const
Constructor Detail

IloTransitionCost

public IloTransitionCost()
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.

IloTransitionCost

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

IloTransitionCost

public IloTransitionCost(const IloUnaryResource resource, const IloTransitionParam param, const char * name=0)

This constructor creates a transition cost for the unary resource resource and adds it to the set of transition costs managed by the resource. Transition costs on this resource will be computed using the transition parameter param.


IloTransitionCost

public IloTransitionCost(const IloUnaryResource resource, const IloTransitionParam param, IloBool isNext, const char * name=0)

This constructor creates a transition cost for the unary resource resource and adds it to the set of transition costs managed by the resource. Transition costs on this resource will be computed by using the transition parameter param. If isNext equals IloTrue, the transition cost will be of type Next; that is, the member functions IloTransitionCost::getPrevCostExpr and IloTransitionCost::getTeardownCostExpr will not be available. If isNext equals IloFalse, the transition cost will be of type Prev; that is, the member functions IloTransitionCost::getNextCostExpr and IloTransitionCost::getSetupCostExpr will not be available.


IloTransitionCost

public IloTransitionCost(const IloUnaryResource resource, const IloTransitionCostObject tobj, const char * name=0)

This constructor creates a transition cost for the unary resource resource and adds it to the set of transition costs managed by the resource. Transition costs on this resource will be computed using the transition cost object tobj.


IloTransitionCost

public IloTransitionCost(const IloUnaryResource resource, const IloTransitionCostObject tobj, IloBool isNext, const char * name=0)

This constructor creates a transition cost for the unary resource resource and adds it to the set of transition costs managed by the resource. Transition costs on this resource will be computed by using the transition cost object tobj. If isNext equals IloTrue, the transition cost will be of type Next; that is, the member functions IloTransitionCost::getPrevCostExpr and IloTransitionCost::getTeardownCostExpr will not be available. If isNext equals IloFalse, the transition cost will be of type Prev; that is, the member functions IloTransitionCost::getNextCostExpr and IloTransitionCost::getSetupCostExpr will not be available.


Method Detail

getCost

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

This member function returns the transition cost between the two resource constraints given as arguments. The transition cost 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 line 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 cost is defined with a transition cost object, as the transition function will be created only at extraction time.


getCostSumVar

public IloNumVar getCostSumVar() const

This member function returns the cost sum variable. The cost sum variable represents the sum of the transition costs (including setup and transition costs) of all the resource constraints on the resource of the invoking transition cost.


getImpl

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

getNextCostExpr

public IloIntExprArg getNextCostExpr(const IloResourceConstraint rct) const

This member function returns an expression that represents the cost between rct and the resource constraint that will be next to rct. If rct is the last resource constraint on the resource, then this cost is the teardown cost of rct. rct must be a resource constraint of the resource of the invoking transition cost. The transition cost is set to type Next.


getNextCostMax

public IloNum getNextCostMax(IloResourceConstraint rct) const

This member function returns the maximum transition cost between rct and the resource constraint that will be next to rct. If rct is the last resource constraint on the resource, then this cost is the maximum teardown cost of rct. rct must be a resource constraint of the resource of the invoking transition cost.


getNextCostMin

public IloNum getNextCostMin(IloResourceConstraint rct) const

This member function returns the minimimum transition cost between rct and the resource constraint that will be next to rct. If rct is the last resource constraint on the resource, then this cost is the minimum teardown cost of rct. rct must be a resource constraint of the resource of the invoking transition cost.


getPrevCostExpr

public IloIntExprArg getPrevCostExpr(const IloResourceConstraint rct) const

This member function returns an expression that represents the cost between rct and the resource constraint that will be previous to rct. If rct is the first resource constraint on the resource, then this cost is the setup cost of rct. rct must be a resource constraint of the resource of the invoking transition cost. The transition cost is set to type Prev.


getPrevCostMax

public IloNum getPrevCostMax(IloResourceConstraint rct) const

This member function returns the maximum transition cost between rct and the resource constraint that will be previous to rct. If rct is the first resource constraint on the resource, then this cost is the maximum setup cost of rct. rct must be a resource constraint of the resource of the invoking transition cost.


getPrevCostMin

public IloNum getPrevCostMin(IloResourceConstraint rct) const

This member function returns the minimum transition cost between rct and the resource constraint that will be previous to rct. If rct is the first resource constraint on the resource, then this cost is the minimum setup cost of rct. rct must be a resource constraint of the resource of the invoking transition cost.


getSetupCost

public IloNum getSetupCost(const IloResourceConstraint rct) const

This member function returns the setup cost of the resource constraint rct. The setup cost is computed by using the transition type of the activity and the current transition parameter. This member function will throw an exception if the transition cost is defined with a transition cost object, as the transition function will be created only at extraction time.


getSetupCostExpr

public IloIntExprArg getSetupCostExpr() const

This member function returns an expression that represents the setup cost for the invoking transition cost. That is, the setup cost of the first resource constraint to be processed on the resource is returned. The transition cost is set to type Next.


getSetupCostMax

public IloNum getSetupCostMax() const

This member function returns the maximum setup cost of the invoking transition cost. That is, the maximum setup cost of the first resource constraint to be processed on the resource is returned.


getSetupCostMin

public IloNum getSetupCostMin() const

This member function returns the minimum setup cost of the invoking transition cost. That is, the minimum setup cost of the first resource constraint to be processed on the resource is returned.


getTeardownCost

public IloNum getTeardownCost(IloResourceConstraint rct) const

This member function returns the teardown cost of the resource constraint rct. The teardown cost is computed by using the transition type of the activity and the current transition parameter. This member function will throw an exception if the transition cost is defined with a transition cost object, as the transition function will be created only at extraction time.


getTeardownCostExpr

public IloIntExprArg getTeardownCostExpr() const

This member function returns an expression that represents the teardown cost for the invoking transition cost. That is, the teardown cost of the last resource constraint to be processed on the resource is returned. The transition cost is set to type Prev.


getTeardownCostMax

public IloNum getTeardownCostMax() const

This member function returns the maximum teardown cost of the invoking transition cost. That is, the maximum teardown cost of the last resource constraint to be processed on the resource is returned.


getTeardownCostMin

public IloNum getTeardownCostMin() const

This member function returns the minimum teardown cost of the invoking transition cost. That is, the minimum teardown cost of the last resource constraint to be processed on the resource is returned.


getTransitionCostObject

public IloTransitionCostObject getTransitionCostObject() const

In case the invoking transition cost has been created with a user defined transition cost object, this member function will return this transition cost object. Otherwise, it will return an empty handle.


hasCostSumVar

public IloBool hasCostSumVar() const

This member function returns IloTrue if the invoking transition cost has been created as a cost sum variable. The cost sum variable represents the sum of the transition costs (including setup and transition costs) of all the resource constraints on the resource of the invoking transition cost. A cost sum variable is automatically created when calling the member function IloTransitionCost::getCostSumVar or IloTransitionCost::setCostSumVar.


isNextTransitionCost

public IloBool isNextTransitionCost() const

This member function returns IloTrue if the invoking transition cost is of type next. Otherwise it returns false.


isPrevTransitionCost

public IloBool isPrevTransitionCost() const

This member function returns IloTrue if the invoking transition cost is of type next. Otherwise it returns false.


setCostSumVar

public void setCostSumVar(const IloNumVar sum) const

This member function sets sum as the cost sum variable of the invoking transition cost. The cost sum variable represents the sum of the transition costs (including setup and transition costs) of all the resource constraints on the resource of the invoking transition cost.


setNextCostMax

public void setNextCostMax(IloResourceConstraint rct, IloNum value)

This member function sets the maximum transition cost between rct and the resource constraint that will be next to rct. If rct is the last resource constraint on the resource, then this cost is the maximum teardown cost of rct. rct must be a resource constraint of the resource of the invoking transition cost. The transition cost is set to type Next.


setNextCostMin

public void setNextCostMin(IloResourceConstraint rct, IloNum value)

This member function sets the minimimum transition cost between rct and the resource constraint that will be next to rct. If rct is the last resource constraint on the resource, then this cost is the minimum teardown cost of rct. rct must be a resource constraint of the resource of the invoking transition cost. The transition cost is set to type Next.


setPrevCostMax

public void setPrevCostMax(IloResourceConstraint rct, IloNum value)

This member function sets the maximum transition cost between rct and the resource constraint that will be previous to rct. If rct is the first resource constraint on the resource, then this cost is the maximum setup cost of rct. rct must be a resource constraint of the resource of the invoking transition cost. The transition cost is set to type Prev.


setPrevCostMin

public void setPrevCostMin(IloResourceConstraint rct, IloNum value)

This member function sets the minimum transition cost between rct and the resource constraint that will be previous to rct. If rct is the first resource constraint on the resource, then this cost is the minimum setup cost of rct. rct must be a resource constraint of the resource of the invoking transition cost. The transition cost is set to type Prev.


setSetupCostMax

public void setSetupCostMax(IloInt value) const

This member function sets the maximum setup cost of the invoking transition cost. That is, the maximum setup cost of the first resource constraint to be processed on the resource is returned. The transition cost is set to type Next.


setSetupCostMin

public void setSetupCostMin(IloInt value) const

This member function sets the minimum setup cost of the invoking transition cost. That is, the minimum setup cost of the first resource constraint to be processed on the resource is returned. The transition cost is set to type Next.


setTeardownCostMax

public void setTeardownCostMax(IloInt value) const

This member function sets the maximum teardown cost of the invoking transition cost. That is, the maximum teardown cost of the last resource constraint to be processed on the resource is returned. The transition cost is set to type Prev.


setTeardownCostMin

public void setTeardownCostMin(IloInt value) const

This member function sets the minimum teardown cost of the invoking transition cost. That is, the minimum teardown cost of the last resource constraint to be processed on the resource is returned. The transition cost is set to type Prev.


setTransitionParam

public void setTransitionParam(const IloTransitionParam param) const

This member function allows changing the transition parameter used to compute the transition cost.