FRAMES NO FRAMES

Class IloTransitionParam

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

The class IloTransitionParam allows representation of transition, setup and teardown times and/or costs on a resource.

In the class IloTransitionParam, setup and teardown times and/or costs are stored as an array of non-negative numbers indexed by the transition type of activities. By default, the setup and teardown values are considered to be zero.

Transition times and/or costs between resource constraints are stored as a square table of non-negative numbers, indexed by the transition type of activities. By default, it is initially filled with zeros. The table may or may not be symmetric, that is, the transition time and/or cost may or may not be different if an activity follows or precedes another one. If a table is declared as symmetric, only the required triangular half of the table is allocated and only that half needs to be filled. The index of the line of the table is the transition type of the preceding activity. The index of the column of the table is the transition type of the following activity.

Instances of IloTransitionParam are used to build transition times on resources (see also IloTransitionTime) and transition costs on unary resources (see also IloTransitionCost).

For more information, see Transition Costs, Transition Times, Parameter Classes.

See Also:

Constructor Summary
public IloTransitionParam()
public IloTransitionParam(IloTransitionParamI * impl)
public IloTransitionParam(const IloEnv env, IloInt size, IloBool isSymmetric=IloFalse, const char * name=0)
public IloTransitionParam(const IloEnv env, IloInt size, IloNum ** ttable, const char * name=0)
public IloTransitionParam(const IloEnv env, IloInt size, IloNum ** ttable, const IloNumArray setups, const IloNumArray teardowns, const char * name=0)
public IloTransitionParam(const IloEnv env, IloInt size, IloNum ** ttable, const IloNumArray setupOrTeardowns, IloBool setup=IloTrue, const char * name=0)
Method Summary
public IloBoolcheckTriangularInequality() const
public IloTransitionParamI *getImpl() const
public IloNumgetSetup(IloInt line) const
public IloIntgetSize() const
public IloNumgetTeardown(IloInt line) const
public IloNumgetValue(IloInt line, IloInt column) const
public IloBoolisSymmetric() const
public voidsetSetup(IloInt line, IloNum value) const
public voidsetSetupArray(const IloNumArray setups) const
public voidsetTeardown(IloInt line, IloNum value) const
public voidsetTeardownArray(const IloNumArray teardowns) const
public voidsetTransitionTable(IloNum ** ttable) const
public voidsetValue(IloInt line, IloInt column, IloNum value) const
Constructor Detail

IloTransitionParam

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

IloTransitionParam

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

IloTransitionParam

public IloTransitionParam(const IloEnv env, IloInt size, IloBool isSymmetric=IloFalse, const char * name=0)

This constructor creates a new instance of IloTransitionParam. The argument size, which must be a strictly non-negative integer, gives the number of lines and columns of the transition table as well as the size of the arrays of setup and teardown values. The table and arrays are initially filled with zeroes. The boolean argument isSymmetric expresses the fact that the table is symmetric. If isSymmetric is IloTrue, only half the table needs to be defined. By default, a transition time parameter is not symmetric.


IloTransitionParam

public IloTransitionParam(const IloEnv env, IloInt size, IloNum ** ttable, const char * name=0)

This constructor creates a new instance of IloTransitionParam. The argument size, which must be a strictly non-negative integer, gives the number of lines and columns of the transition table as well as the size of the arrays of setup and teardown values. The table is initially filled with the values of the array of arrays ttable. The setup and teardown values are assumed to be zero.


IloTransitionParam

public IloTransitionParam(const IloEnv env, IloInt size, IloNum ** ttable, const IloNumArray setups, const IloNumArray teardowns, const char * name=0)

This constructor creates a new instance of IloTransitionParam. The argument size, which must be a strictly non-negative integer, gives the number of lines and columns of the transition table as well as the size of the arrays of setup and teardown values. The table is initially filled with the values of the array of arrays ttable. The setup and teardown values are initialized by copying the numerical arrays setups and teardowns.


IloTransitionParam

public IloTransitionParam(const IloEnv env, IloInt size, IloNum ** ttable, const IloNumArray setupOrTeardowns, IloBool setup=IloTrue, const char * name=0)

This constructor creates a new instance of IloTransitionParam. The argument size, which must be a strictly non-negative integer, gives the number of lines and columns of the transition table as well as the size of the arrays of setup and teardown values. The table is initially filled with the values of the array of arrays ttable. If the value of the argument setup is IloTrue, the setup values are initialized by copying the numerical array setupOrTeardowns and the teardown values are supposed to be equal to zero. If the value of the argument setup is IloFalse, the teardown values are initialized by copying the numerical array setupOrTeardowns and the setup values are supposed to be equal to zero.


Method Detail

checkTriangularInequality

public IloBool checkTriangularInequality() const

This member function returns IloTrue if and only if the invoking transition param satisfies the triangular inequality. Triangular inequality is defined as:


getImpl

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

getSetup

public IloNum getSetup(IloInt line) const

This member function returns the value of the setup for the argument line. An assert will be violated if the argument line is not a non-negative integer strictly smaller than the size of the transition parameter.


getSize

public IloInt getSize() const

This member function returns the size of the invoking transition parameter.


getTeardown

public IloNum getTeardown(IloInt line) const

This member function returns the value of the teardown for the argument line. An assert will be violated if the argument line is not a non-negative integer strictly smaller than the size of the transition parameter.


getValue

public IloNum getValue(IloInt line, IloInt column) const

This member function returns the value of the table of the invoking transition parameter for the line line and for the column column. The argument line is the transition type of the preceding activity. The argument column is the transition type of the following activity. An assert will be violated if the arguments line and column are not non-negative integers strictly smaller than the size of the transition parameter.


isSymmetric

public IloBool isSymmetric() const

This member function returns IloTrue if the table of the invoking transition parameter was initially created as a symmetric table. Otherwise, it returns IloFalse.


setSetup

public void setSetup(IloInt line, IloNum value) const

This member function sets value as the new setup value for the index index. An assert will be violated if the argument line is not a non-negative integer strictly smaller than the size of the transition parameter, or if the argument value is not a non-negative number.


setSetupArray

public void setSetupArray(const IloNumArray setups) const

This member function initializes the array of setups with a copy of the numerical array setups. An assert will be violated if the size of the array setups not the same as the size of the invoking transition parameter.


setTeardown

public void setTeardown(IloInt line, IloNum value) const

This member function sets value as the new teardown value for the argument line. An assert will be violated if the argument line is not a non-negative integer strictly smaller than the size of the transition parameter or if the argument value is not a non-negative number.


setTeardownArray

public void setTeardownArray(const IloNumArray teardowns) const

This member function initializes the array of teardowns with a copy of the numerical array teardowns. An assert will be violated if the size of the array teardown is not the same as the size of the invoking transition parameter.


setTransitionTable

public void setTransitionTable(IloNum ** ttable) const

This member function initializes the table of the invoking transition parameter with the values of the array of arrays ttable.


setValue

public void setValue(IloInt line, IloInt column, IloNum value) const

This member function sets value as the value of the table of the invoking transition parameter for line and column. The argument line is the transition type of the preceding activity. The argument column is the transition type of the following activity. An assert will be violated if the arguments line and column are not non-negative integers strictly smaller than the size of the transition parameter or if the argument value is not a non-negative number.