KDiscreteResource

class KDiscreteResource : public KResource

Discrete resource

A discrete resource can process several tasks at the same time.

The following schema shows an example with three tasks A,B and C executing on a disjunctive resource and on a cumulative resource with resource usage 3 for task A, 1 for task B and 1 for task C :

../../_images/resources.png

Tasks may require, provide, consume and produce resources :

  • A task requires a resource if some amount of the resource capacity must be made available for the execution of the activity. The capacity is renewable which means that the required capacity is available after the end of the task.

  • A task provides a resource if some amount of the resource capacity is made available through the execution of the task. The capacity is renewable which means that the provided capacity is available only during the execution of the task.

  • A task consumes a resource if some amount of the resource capacity must be made available for the execution of the task and the capacity is non-renewable which means that the consumed capacity if no longer available at the end of the task.

  • A task produces a resource if some amount of the resource capacity is made available through the execution of the task and the capacity is non-renewable which means that the produced capacity is definitively available after the starting of the task.

Public Types

enum PropagationHint

Propagation Hint Attributes

Values:

enumerator TimeTabling

TimeTabling propagation scheme.

enumerator TasksIntervals

Tasks Intervals propagation scheme.

enumerator EdgeFinding

Tasks Intervals + EdgeFinding propagation scheme.

enumerator MaxAvailMinUsage

Constrain and keep track of max availability,and minimum usage of the resource.

enumerator BoundConsistency

TimeTabling Bound consistency.

enumerator ArcConsistency

TimeTabling Arc Consistency.

Public Functions

KDiscreteResource(KSchedule &s, const char *name, int initialCapacity, int propagation = TimeTabling | TasksIntervals | EdgeFinding)

Constructor

See

KDiscreteResource::PropagationHint

Parameters
  • s – the schedule

  • name – name for this resource

  • initialCapacity – Initial capacity for the resource (positive or zero)

  • propagation – propagation scheme

virtual ~KDiscreteResource()

Destructor.