Cumulate variable expression

80 views
Skip to first unread message

Alberto Manzini

unread,
Aug 6, 2025, 11:18:38 AMAug 6
to or-tools-discuss
Hi, I was looking for a way to get the cumulative sum of variables over time, like the one used in Reservoir constraint in which
cumsum_t must be between min_capacity and max_capacity for all t
and cumsum_t = sum_tau (demands_tau) for tau = 0, 1, ..., t
I need the expression of the cumsum_t to be set into a soft constraint with boundaries

Thanks in advance,
Alberto

blind.line

unread,
Aug 6, 2025, 12:05:41 PMAug 6
to or-tools...@googlegroups.com
Which solver?

James

On Aug 6, 2025, at 08:18, Alberto Manzini <albertom...@gmail.com> wrote:

Hi, I was looking for a way to get the cumulative sum of variables over time, like the one used in Reservoir constraint in which
--
You received this message because you are subscribed to the Google Groups "or-tools-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to or-tools-discu...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/or-tools-discuss/aceaa973-24d8-447d-84a5-07ef442f045bn%40googlegroups.com.
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted

Alberto Manzini

unread,
Aug 6, 2025, 12:31:44 PMAug 6
to or-tools-discuss
Don't know why it keeps deleting my message

Message has been deleted

Alberto Manzini

unread,
Aug 6, 2025, 10:52:57 PMAug 6
to or-tools-discuss
solver is CP SAT
Reply all
Reply to author
Forward
0 new messages