Hello,
you can use an additional cumulative function, with capacity 3 for representing the new resource.
Then a task, say from trade A, that can also be handled by this new resource, instead of being represented by a single interval and a pulse over this interval that appears in the cumul function of Trade A, is now represented by:
- 1 interval (masterInterval),
- 2 optional intervals (optInt1, optInt2),
- and an alternative constraint linking the 3 intervals.
One optional interval requires the resource for trade A, the second one requires the new resource (using pulses in their respective cumul functions).
The constraint alternative(masterInterval, [optInt1, optInt2]) ensures that one of the optional intervals is equal to the master interval, and that the other optional interval is absent.
------------------------------
Olivier Lhomme
------------------------------
Original Message:
Sent: Thu April 24, 2025 01:02 PM
From: brent patchin
Subject: Need help with CP Cumulative Functions
I have a cumulative function for resources across several trades over time. I have a capacity for each trade (ie: trade A has capacity 10, trade B has capacity 5, and trade C has capacity 2). I have setup a pulse function that reduces the cumulative function over all of the task intervals. This all works great, but I also have additional capacity of 3 that I can use across all of the trades. How can I model this additional capacity? for example I can use the 2 on trade B and 1 on Trade A, or all 3 on trade C, BUT I cant use 3 on trade A and 1 on trade C.
Thanks in advance for you help!
------------------------------
brent patchin
------------------------------