Interesting question, and I'm afraid my response won't be that helpful, but in the routing solver, there is the concept of slack to address this sort of thing. Perhaps implement something similar...an intvar with a range from 0 to max-memory?? With a constraint that memory state + memory slack = max memory.
But scanning very quickly the reservoir constraint code, it seems it needs an int64, not an IntVar.
(Mostly I'm replying to bump this question and so that I pay attention to future responses to this question)
James
-- 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 on the web visit https://groups.google.com/d/msgid/or-tools-discuss/030f2267-19cf-4976-9ba5-897610fc2c9dn%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/or-tools-discuss/YpDxYBA6MsIV1UeF%40055559173be0.
To view this discussion on the web visit https://groups.google.com/d/msgid/or-tools-discuss/cced9d38-862b-4ef5-a68e-2f21fc446a00n%40googlegroups.com.