FRAMES NO FRAMES

Class IloResourceValue

Definition file: ilsched/iloresvaluect.h
This class allows associating an integer value (or an integer variable) for each resource in an environment. A default can be specified for all the resources that are not explicitely associated a value.
Constructor Summary
public IloResourceValue()
public IloResourceValue(IloResourceValueI * impl)
public IloResourceValue(IloEnv env, const char * name=0)
Method Summary
public IloResourceValueI *getImpl() const
public IloIntExprArgoperator[](IloResourceConstraint rct)
public voidsetDefault(IloInt defaultValue)
public voidsetValue(IloResource resource, IloIntVar var)
public voidsetValue(IloResource resource, IloInt value)
Constructor Detail

IloResourceValue

public IloResourceValue()
This constructor creates an empty handle. You must initialize it before you use it.

IloResourceValue

public IloResourceValue(IloResourceValueI * impl)
This constructor creates a handle object from a pointer to an implementation object.

IloResourceValue

public IloResourceValue(IloEnv env, const char * name=0)

This constructor creates a new instance of IloResourceValue to associate an integer value (or integer variable) with each resource in the environment.


Method Detail

getImpl

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

operator[]

public IloIntExprArg operator[](IloResourceConstraint rct)

This member function returns an integer expression whose value is the value of the resource that is selected by the resource constraint given as parameter.


setDefault

public void setDefault(IloInt defaultValue)

This member function defines a default value associated with each resource in the environment. It means that the invoking IloResourceValue will associate the value defaultValue with each resource but those which have explicitely been associated a value thanks to the member functions setValue.


setValue

public void setValue(IloResource resource, IloIntVar var)

This member function associates the variable value var with resource resource.


setValue

public void setValue(IloResource resource, IloInt value)

This member function associates the value value with resource resource.