5.84. cumulative_product

DESCRIPTIONLINKSGRAPH
Origin

Derived from ๐šŒ๐šž๐š–๐šž๐š•๐šŠ๐š๐š’๐šŸ๐šŽ.

Constraint

๐šŒ๐šž๐š–๐šž๐š•๐šŠ๐š๐š’๐šŸ๐šŽ_๐š™๐š›๐š˜๐š๐šž๐šŒ๐š(๐šƒ๐™ฐ๐š‚๐™บ๐š‚,๐™ป๐™ธ๐™ผ๐™ธ๐šƒ)

Arguments
๐šƒ๐™ฐ๐š‚๐™บ๐š‚๐šŒ๐š˜๐š•๐š•๐šŽ๐šŒ๐š๐š’๐š˜๐š—๐š˜๐š›๐š’๐š๐š’๐š—-๐š๐šŸ๐šŠ๐š›,๐š๐šž๐š›๐šŠ๐š๐š’๐š˜๐š—-๐š๐šŸ๐šŠ๐š›,๐šŽ๐š—๐š-๐š๐šŸ๐šŠ๐š›,๐š‘๐šŽ๐š’๐š๐š‘๐š-๐š๐šŸ๐šŠ๐š›
๐™ป๐™ธ๐™ผ๐™ธ๐šƒ๐š’๐š—๐š
Restrictions
๐š›๐šŽ๐šš๐šž๐š’๐š›๐šŽ_๐šŠ๐š_๐š•๐šŽ๐šŠ๐šœ๐š(2,๐šƒ๐™ฐ๐š‚๐™บ๐š‚,[๐š˜๐š›๐š’๐š๐š’๐š—,๐š๐šž๐š›๐šŠ๐š๐š’๐š˜๐š—,๐šŽ๐š—๐š])
๐š›๐šŽ๐šš๐šž๐š’๐š›๐šŽ๐š(๐šƒ๐™ฐ๐š‚๐™บ๐š‚,๐š‘๐šŽ๐š’๐š๐š‘๐š)
๐šƒ๐™ฐ๐š‚๐™บ๐š‚.๐š๐šž๐š›๐šŠ๐š๐š’๐š˜๐š—โ‰ฅ0
๐šƒ๐™ฐ๐š‚๐™บ๐š‚.๐š˜๐š›๐š’๐š๐š’๐š—โ‰ค๐šƒ๐™ฐ๐š‚๐™บ๐š‚.๐šŽ๐š—๐š
๐šƒ๐™ฐ๐š‚๐™บ๐š‚.๐š‘๐šŽ๐š’๐š๐š‘๐šโ‰ฅ1
๐™ป๐™ธ๐™ผ๐™ธ๐šƒโ‰ฅ0
Purpose

Consider a set ๐’ฏ of tasks described by the ๐šƒ๐™ฐ๐š‚๐™บ๐š‚ collection. The ๐šŒ๐šž๐š–๐šž๐š•๐šŠ๐š๐š’๐šŸ๐šŽ_๐š™๐š›๐š˜๐š๐šž๐šŒ๐š constraint enforces that at each point in time, the product of the heights of the set of tasks that overlap that point, does not exceed a given limit. A task overlaps a point i if and only if (1)ย its origin is less than or equal to i, and (2)ย its end is strictly greater than i. It also imposes for each task of ๐’ฏ the constraint ๐š˜๐š›๐š’๐š๐š’๐š—+๐š๐šž๐š›๐šŠ๐š๐š’๐š˜๐š—=๐šŽ๐š—๐š.

Example
๐š˜๐š›๐š’๐š๐š’๐š—-1๐š๐šž๐š›๐šŠ๐š๐š’๐š˜๐š—-3๐šŽ๐š—๐š-4๐š‘๐šŽ๐š’๐š๐š‘๐š-1,๐š˜๐š›๐š’๐š๐š’๐š—-2๐š๐šž๐š›๐šŠ๐š๐š’๐š˜๐š—-9๐šŽ๐š—๐š-11๐š‘๐šŽ๐š’๐š๐š‘๐š-2,๐š˜๐š›๐š’๐š๐š’๐š—-3๐š๐šž๐š›๐šŠ๐š๐š’๐š˜๐š—-10๐šŽ๐š—๐š-13๐š‘๐šŽ๐š’๐š๐š‘๐š-1,๐š˜๐š›๐š’๐š๐š’๐š—-6๐š๐šž๐š›๐šŠ๐š๐š’๐š˜๐š—-6๐šŽ๐š—๐š-12๐š‘๐šŽ๐š’๐š๐š‘๐š-1,๐š˜๐š›๐š’๐š๐š’๐š—-7๐š๐šž๐š›๐šŠ๐š๐š’๐š˜๐š—-2๐šŽ๐š—๐š-9๐š‘๐šŽ๐š’๐š๐š‘๐š-3,6

Figureย 5.84.1 shows the solution associated with the example. To each task of the ๐šŒ๐šž๐š–๐šž๐š•๐šŠ๐š๐š’๐šŸ๐šŽ_๐š™๐š›๐š˜๐š๐šž๐šŒ๐š constraint corresponds a set of rectangles coloured with the same colour: the sum of the lengths of the rectangles corresponds to the duration of the task, while the height of the rectangles (i.e.,ย all the rectangles associated with a task have the same height) corresponds to the height of the task. The profile corresponding to the product of the heights of the tasks that overlap a given point is depicted by a thick red line. The ๐šŒ๐šž๐š–๐šž๐š•๐šŠ๐š๐š’๐šŸ๐šŽ_๐š™๐š›๐š˜๐š๐šž๐šŒ๐š constraint holds since at each point in time the product of the heights of the tasks that overlap that point is not strictly greater than the upper limit 6 enforced by the last argument of the ๐šŒ๐šž๐š–๐šž๐š•๐šŠ๐š๐š’๐šŸ๐šŽ_๐š™๐š›๐š˜๐š๐šž๐šŒ๐š constraint.

Figure 5.84.1. Solution of the ๐šŒ๐šž๐š–๐šž๐š•๐šŠ๐š๐š’๐šŸ๐šŽ_๐š™๐š›๐š˜๐š๐šž๐šŒ๐š constraint
ctrs/cumulative_product1
Typical
|๐šƒ๐™ฐ๐š‚๐™บ๐š‚|>1
๐š›๐šŠ๐š—๐š๐šŽ(๐šƒ๐™ฐ๐š‚๐™บ๐š‚.๐š˜๐š›๐š’๐š๐š’๐š—)>1
๐š›๐šŠ๐š—๐š๐šŽ(๐šƒ๐™ฐ๐š‚๐™บ๐š‚.๐š๐šž๐š›๐šŠ๐š๐š’๐š˜๐š—)>1
๐š›๐šŠ๐š—๐š๐šŽ(๐šƒ๐™ฐ๐š‚๐™บ๐š‚.๐šŽ๐š—๐š)>1
๐š›๐šŠ๐š—๐š๐šŽ(๐šƒ๐™ฐ๐š‚๐™บ๐š‚.๐š‘๐šŽ๐š’๐š๐š‘๐š)>1
๐šƒ๐™ฐ๐š‚๐™บ๐š‚.๐š๐šž๐š›๐šŠ๐š๐š’๐š˜๐š—>0
๐™ป๐™ธ๐™ผ๐™ธ๐šƒ<๐š™๐š›๐š˜๐š(๐šƒ๐™ฐ๐š‚๐™บ๐š‚.๐š‘๐šŽ๐š’๐š๐š‘๐š)
Symmetries
  • Items of ๐šƒ๐™ฐ๐š‚๐™บ๐š‚ are permutable.

  • ๐šƒ๐™ฐ๐š‚๐™บ๐š‚.๐š‘๐šŽ๐š’๐š๐š‘๐š can be decreased to any value โ‰ฅ0.

  • One and the same constant can be added to the ๐š˜๐š›๐š’๐š๐š’๐š— and ๐šŽ๐š—๐š attributes of all items of ๐šƒ๐™ฐ๐š‚๐™บ๐š‚.

  • ๐™ป๐™ธ๐™ผ๐™ธ๐šƒ can be increased.

Reformulation

The ๐šŒ๐šž๐š–๐šž๐š•๐šŠ๐š๐š’๐šŸ๐šŽ_๐š™๐š›๐š˜๐š๐šž๐šŒ๐š constraint can be expressed in term of a set of reified constraints and of |๐šƒ๐™ฐ๐š‚๐™บ๐š‚| constraints of the form h 1 ยทh 2 ยท...ยทh |๐šƒ๐™ฐ๐š‚๐™บ๐š‚| โ‰คl:

  1. For each pair of tasks ๐šƒ๐™ฐ๐š‚๐™บ๐š‚[i],๐šƒ๐™ฐ๐š‚๐™บ๐š‚[j] (i,jโˆˆ[1,|๐šƒ๐™ฐ๐š‚๐™บ๐š‚|]) of the ๐šƒ๐™ฐ๐š‚๐™บ๐š‚ collection we create a variable H ij which is set to the height of task ๐šƒ๐™ฐ๐š‚๐™บ๐š‚[j] if task ๐šƒ๐™ฐ๐š‚๐™บ๐š‚[j] overlaps the origin attribute of task ๐šƒ๐™ฐ๐š‚๐™บ๐š‚[i], and to 1 otherwise:

    • If i=j:

      • H ij =๐šƒ๐™ฐ๐š‚๐™บ๐š‚[i].๐š‘๐šŽ๐š’๐š๐š‘๐š.

    • If iโ‰ j:

      • H ij =๐šƒ๐™ฐ๐š‚๐™บ๐š‚[j].๐š‘๐šŽ๐š’๐š๐š‘๐šโˆจH ij =1.

      • ((๐šƒ๐™ฐ๐š‚๐™บ๐š‚[j].๐š˜๐š›๐š’๐š๐š’๐š—โ‰ค๐šƒ๐™ฐ๐š‚๐™บ๐š‚[i].๐š˜๐š›๐š’๐š๐š’๐š— โˆง

        ย ย ย ๐šƒ๐™ฐ๐š‚๐™บ๐š‚[j].๐šŽ๐š—๐š>๐šƒ๐™ฐ๐š‚๐™บ๐š‚[i].๐š˜๐š›๐š’๐š๐š’๐š—)โˆง(H ij =๐šƒ๐™ฐ๐š‚๐™บ๐š‚[j].๐š‘๐šŽ๐š’๐š๐š‘๐š)) โˆจ

        ((๐šƒ๐™ฐ๐š‚๐™บ๐š‚[j].๐š˜๐š›๐š’๐š๐š’๐š—>๐šƒ๐™ฐ๐š‚๐™บ๐š‚[i].๐š˜๐š›๐š’๐š๐š’๐š— โˆจ

        ย ย ย ๐šƒ๐™ฐ๐š‚๐™บ๐š‚[j].๐šŽ๐š—๐šโ‰ค๐šƒ๐™ฐ๐š‚๐™บ๐š‚[i].๐š˜๐š›๐š’๐š๐š’๐š—)โˆง(H ij =1))

  2. For each task ๐šƒ๐™ฐ๐š‚๐™บ๐š‚[i] (iโˆˆ[1,|๐šƒ๐™ฐ๐š‚๐™บ๐š‚|]) we impose a constraint of the form H i1 ยทH i2 ยท...ยทH i|๐šƒ๐™ฐ๐š‚๐™บ๐š‚| โ‰ค๐™ป๐™ธ๐™ผ๐™ธ๐šƒ.

See also

common keyword: ๐šŒ๐šž๐š–๐šž๐š•๐šŠ๐š๐š’๐šŸ๐šŽย (resource constraint).

used in graph description: ๐š™๐š›๐š˜๐š๐šž๐šŒ๐š_๐šŒ๐š๐š›.

Keywords

characteristic of a constraint: product.

constraint type: scheduling constraint, resource constraint, temporal constraint.

filtering: compulsory part.

modelling: zero-duration task.

Arc input(s)

๐šƒ๐™ฐ๐š‚๐™บ๐š‚

Arc generator
๐‘†๐ธ๐ฟ๐นโ†ฆ๐šŒ๐š˜๐š•๐š•๐šŽ๐šŒ๐š๐š’๐š˜๐š—(๐š๐šŠ๐šœ๐š”๐šœ)

Arc arity
Arc constraint(s)
๐š๐šŠ๐šœ๐š”๐šœ.๐š˜๐š›๐š’๐š๐š’๐š—+๐š๐šŠ๐šœ๐š”๐šœ.๐š๐šž๐š›๐šŠ๐š๐š’๐š˜๐š—=๐š๐šŠ๐šœ๐š”๐šœ.๐šŽ๐š—๐š
Graph property(ies)
๐๐€๐‘๐‚=|๐šƒ๐™ฐ๐š‚๐™บ๐š‚|

Arc input(s)

๐šƒ๐™ฐ๐š‚๐™บ๐š‚ ๐šƒ๐™ฐ๐š‚๐™บ๐š‚

Arc generator
๐‘ƒ๐‘…๐‘‚๐ท๐‘ˆ๐ถ๐‘‡โ†ฆ๐šŒ๐š˜๐š•๐š•๐šŽ๐šŒ๐š๐š’๐š˜๐š—(๐š๐šŠ๐šœ๐š”๐šœ1,๐š๐šŠ๐šœ๐š”๐šœ2)

Arc arity
Arc constraint(s)
โ€ข ๐š๐šŠ๐šœ๐š”๐šœ1.๐š๐šž๐š›๐šŠ๐š๐š’๐š˜๐š—>0
โ€ข ๐š๐šŠ๐šœ๐š”๐šœ2.๐š˜๐š›๐š’๐š๐š’๐š—โ‰ค๐š๐šŠ๐šœ๐š”๐šœ1.๐š˜๐š›๐š’๐š๐š’๐š—
โ€ข ๐š๐šŠ๐šœ๐š”๐šœ1.๐š˜๐š›๐š’๐š๐š’๐š—<๐š๐šŠ๐šœ๐š”๐šœ2.๐šŽ๐š—๐š
Graph class
โ€ข ๐™ฐ๐™ฒ๐šˆ๐™ฒ๐™ป๐™ธ๐™ฒ
โ€ข ๐™ฑ๐™ธ๐™ฟ๐™ฐ๐š๐šƒ๐™ธ๐šƒ๐™ด
โ€ข ๐™ฝ๐™พ_๐™ป๐™พ๐™พ๐™ฟ

Sets
๐–ฒ๐–ด๐–ข๐–ขโ†ฆ๐šœ๐š˜๐šž๐š›๐šŒ๐šŽ,๐šŸ๐šŠ๐š›๐š’๐šŠ๐š‹๐š•๐šŽ๐šœ-๐šŒ๐š˜๐š•๐š…๐™ฐ๐š๐™ธ๐™ฐ๐™ฑ๐™ป๐™ด๐š‚-๐šŒ๐š˜๐š•๐š•๐šŽ๐šŒ๐š๐š’๐š˜๐š—(๐šŸ๐šŠ๐š›-๐š๐šŸ๐šŠ๐š›),๐š’๐š๐šŽ๐š–(๐šŸ๐šŠ๐š›-๐™ธ๐šƒ๐™ด๐™ผ๐š‚.๐š‘๐šŽ๐š’๐š๐š‘๐š)]

Constraint(s) on sets
๐š™๐š›๐š˜๐š๐šž๐šŒ๐š_๐šŒ๐š๐š›(๐šŸ๐šŠ๐š›๐š’๐šŠ๐š‹๐š•๐šŽ๐šœ,โ‰ค,๐™ป๐™ธ๐™ผ๐™ธ๐šƒ)
Graph model

Partsย (A) andย (B) of Figureย 5.84.2 respectively show the initial and final graph associated with the second graph constraint of the Example slot. On the one hand, each source vertex of the final graph can be interpreted as a time point. On the other hand the successors of a source vertex correspond to those tasks that overlap that time point. The ๐šŒ๐šž๐š–๐šž๐š•๐šŠ๐š๐š’๐šŸ๐šŽ_๐š™๐š›๐š˜๐š๐šž๐šŒ๐š constraint holds since for each successor set ๐’ฎ of the final graph the product of the heights of the tasks in ๐’ฎ does not exceed the limit ๐™ป๐™ธ๐™ผ๐™ธ๐šƒ=6.

Figure 5.84.2. Initial and final graph of the ๐šŒ๐šž๐š–๐šž๐š•๐šŠ๐š๐š’๐šŸ๐šŽ_๐š™๐š›๐š˜๐š๐šž๐šŒ๐š constraint
ctrs/cumulative_productA
(a)
ctrs/cumulative_productB
(b)
Signature

Since ๐šƒ๐™ฐ๐š‚๐™บ๐š‚ is the maximum number of vertices of the final graph of the first graph constraint we can rewrite ๐๐€๐‘๐‚ = |๐šƒ๐™ฐ๐š‚๐™บ๐š‚| to ๐๐€๐‘๐‚ โ‰ฅ |๐šƒ๐™ฐ๐š‚๐™บ๐š‚|. This leads to simplify ๐๐€๐‘๐‚ ยฏ ฬฒ to ๐๐€๐‘๐‚ ยฏ.