FRAMES NO FRAMES

Class IloDiscreteEnergy

Definition file: ilsched/iloenergy.h
Include file: <ilsched/iloscheduler.h>
Discrete Energy Resource.

An instance of the class IloDiscreteEnergy represents a resource available as a certain amount of energy (for example, in watt-hours, in human-months) over certain time buckets (for example, minutes, hours, months, years). The available energy of a time bucket is used by the activities executed on that time bucket, and as a consequence, energy capacity constraints use the energy of the discrete energy resource.

For example, let's assume that each unit of time corresponds to an hour, and that we have defined a discrete energy resource that has a time step of 24 (corresponding to a day), and energy 10. Then if we have an activity of duration 3 (hours) that requires the resource with capacity 2 (machines), it uses energy of 6 (machine-hours). Thus, if this activity is scheduled on the first day, the remaining energy for that first day is 4 (machine-hours).

An instance of the class IloDiscreteEnergy uses the concept of energy, differing from the class IloDiscreteResource, which uses the concept of instantaneous capacity. However, when the time step of the resource is 1 (one), the energy over an interval corresponds to the instantaneous capacity, and thus in that case, there is no difference between the two classes. The time buckets of the discrete energy resource are defined by the capacity enforcement intervals parameter.

Parameter classes

Minimal and maximal capacity: (class IloNumToNumStepFunction)

These parameters describe the minimal and maximal energy per time bucket over time. They are directly modified by the member functions IloDiscreteEnergy::setEnergyMin and IloDiscreteEnergy::setEnergyMax. IloNumToNumStepFunction is documented in the extensions section of the IBM ILOG Concert Technology Reference Manual.

Refer to Scheduler Overview for more information on how to share parameters among resources, and how the direct modification of parameters through the resource API may affect them. Also see Resource Usage Profiles.

See Also:

Constructor Summary
public IloDiscreteEnergy()
public IloDiscreteEnergy(IloDiscreteEnergyI * impl)
public IloDiscreteEnergy(const IloEnv env, IloNum timeStep, IloNum capacity, const char * name=0)
Method Summary
public IloNumgetEnergyMax(IloNum time) const
public IloNumgetEnergyMaxMax(IloNum timeMin, IloNum timeMax) const
public IloNumgetEnergyMaxMin(IloNum timeMin, IloNum timeMax) const
public IloNumgetEnergyMin(IloNum time) const
public IloNumgetEnergyMinMax(IloNum timeMin, IloNum timeMax) const
public IloNumgetEnergyMinMin(IloNum timeMin, IloNum timeMax) const
public IloDiscreteEnergyI *getImpl() const
public voidsetEnergyMax(IloNum timeMin, IloNum timeMax, IloNum energy) const
public voidsetEnergyMaxParam(const IloNumToNumStepFunction tfp) const
public voidsetEnergyMin(IloNum timeMin, IloNum timeMax, IloNum energy) const
public voidsetEnergyMinParam(const IloNumToNumStepFunction tfp) const
Inherited Methods from IloCapResource
addMaxTextureIgnoreInterval, addMaxTextureIgnoreInterval, addMaxTextureIgnoreIntervalOnDuration, addMaxTexturePeriodicIgnoreInterval, addMinTextureIgnoreInterval, addMinTextureIgnoreInterval, addMinTextureIgnoreIntervalOnDuration, addMinTexturePeriodicIgnoreInterval, emptyMaxTextureIgnoreIntervals, emptyMinTextureIgnoreIntervals, getCapacity, getImpl, getInitialOccupation, getInitialOccupationMax, getInitialOccupationMin, hasInitialOccupation, hasMaxTextureMeasurement, hasMinTextureMeasurement, removeMaxTextureIgnoreInterval, removeMaxTextureIgnoreInterval, removeMaxTextureIgnoreIntervalOnDuration, removeMaxTexturePeriodicIgnoreInterval, removeMinTextureIgnoreInterval, removeMinTextureIgnoreInterval, removeMinTextureIgnoreIntervalOnDuration, removeMinTexturePeriodicIgnoreInterval, setCapacity, setInitialOccupation, setInitialOccupation, setInitialOccupationParam, setInitialOccupationParam, setMaxTextureHeuristicBeta, setMaxTextureParam, setMaxTextureRandomGenerator, setMinTextureHeuristicBeta, setMinTextureParam, setMinTextureRandomGenerator, unsetMaxTextureRandomGenerator, unsetMinTextureRandomGenerator
Inherited Methods from IloResource
addCapacityEnforcementInterval, addTransitionTimeEnforcementInterval, areCalendarConstraintsIgnored, areCapacityConstraintsIgnored, arePrecedenceConstraintsIgnored, areSequenceConstraintsIgnored, areTransitionTimeConstraintsIgnored, getCalendar, getCalendarEnforcement, getCapacityEnforcement, getDurationEnforcement, getImpl, getPrecedenceEnforcement, getSequenceEnforcement, getTransitionTimeEnforcement, hasCalendar, ignoreCalendarConstraints, ignoreCapacityConstraints, ignorePrecedenceConstraints, ignoreSequenceConstraints, ignoreTransitionTimeConstraints, isCapacityResource, isContinuousReservoir, isDiscreteEnergy, isDiscreteResource, isKeptOpen, isReservoir, isStateResource, isUnaryResource, keepOpen, removeCapacityEnforcementInterval, removeTransitionTimeEnforcementInterval, setCalendar, setCalendarEnforcement, setCapacityEnforcement, setCapacityEnforcementIntervalsParam, setDurationEnforcement, setPrecedenceEnforcement, setResourceParam, setSequenceEnforcement, setTransitionTimeEnforcement, setTransitionTimeEnforcementIntervalsParam
Constructor Detail

IloDiscreteEnergy

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

IloDiscreteEnergy

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

IloDiscreteEnergy

public IloDiscreteEnergy(const IloEnv env, IloNum timeStep, IloNum capacity, const char * name=0)

This constructor creates a new instance of IloDiscreteEnergy and adds it to the set of resources managed in the given environment. The argument timeStep represents the default size of time buckets. The energy of the resource is limited to capacity for each time bucket.


Method Detail

getEnergyMax

public IloNum getEnergyMax(IloNum time) const

This member function returns the maximal energy that can be used at the given time.


getEnergyMaxMax

public IloNum getEnergyMaxMax(IloNum timeMin, IloNum timeMax) const

This member function returns the maximal energy that can be used throughout the interval [timeMin, timeMax) (that is, the maximal value over the interval [timeMin, timeMax) of the maximal resource energy).


getEnergyMaxMin

public IloNum getEnergyMaxMin(IloNum timeMin, IloNum timeMax) const

This member function returns the maximal value, over the interval [timeMin, timeMax), of the minimal resource energy.


getEnergyMin

public IloNum getEnergyMin(IloNum time) const

This member function returns the minimal energy that must be used at the given time.


getEnergyMinMax

public IloNum getEnergyMinMax(IloNum timeMin, IloNum timeMax) const

This member function returns the minimal value, over the interval [timeMin, timeMax), of the maximal resource energy.


getEnergyMinMin

public IloNum getEnergyMinMin(IloNum timeMin, IloNum timeMax) const

This member function returns the minimal energy that must be used throughout the interval [timeMin, timeMax) (that is, the minimal value over the interval [timeMin, timeMax) of the minimal resource energy).


getImpl

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

setEnergyMax

public void setEnergyMax(IloNum timeMin, IloNum timeMax, IloNum energy) const

This member function states that the maximal energy per time bucket required throughout the interval [timeMin, timeMax) is at least energy.


setEnergyMaxParam

public void setEnergyMaxParam(const IloNumToNumStepFunction tfp) const

This member function sets the maximal energy per time bucket over time to be the function defined in tfp.


setEnergyMin

public void setEnergyMin(IloNum timeMin, IloNum timeMax, IloNum energy) const

This member function states that the minimal energy per time bucket required throughout the interval [timeMintimeMax) is at least energy.


setEnergyMinParam

public void setEnergyMinParam(const IloNumToNumStepFunction tfp) const

This member function sets the minimal energy per time bucket over time to be the function defined in tfp.