CP求解器中储层约束的有效公式

发布于 2025-01-27 23:08:40 字数 627 浏览 0 评论 0原文

我是限制编程的新手,因此对任何误解表示歉意。

假设以下示例问题:

泵以固定的速度将水从无底湖移动到紧密约束的储层中。每天都有对水库的需求,每个小时的需求都不同。目的是通过打开和关闭泵来确保储层保持在极限之内。

6小时问题的示例数据:

res_bounds = [0, 20]
demand = [0,8,1,13,11,12]

可行的解决方案是:

pump_schedule = [1,1,0,1,1,1]

用MIP建模

[10,12,11,8,7,5]

上述示例时,“标准”公式通过基本的质量平衡模型离散化了1小时步骤。但是,当时间步骤变得太好或问题的大小失控时,这些模型往往会缩放较差。

乍一看,CP提供了一个解决方案,该解决方案具有诸如间隔变量之类的功能,以便以非常精细的分辨率有效地安排泵。但是,跟踪储层水平证明了挑战,因为该模型在泵运​​行间隔中间的水平看不见。

Google的Or-Tools提供

简而言之,在约束编程中是否有办法对没有布尔时间变量的这种储层约束进行建模?我尝试在网上环顾四周,但没有发现到目前为止的帮助。

提前致谢。

I am fairly new to constraint programming, so apologies for any misconceptions.

Assume the following example problem:

A pump is moving water from a bottomless lake into a tightly constrained reservoir at a set rate. There is demand on the reservoir over the day with each hour having different demand. The goal is to ensure the reservoir stays within limits by turning the pump on and off.

Example data for a 6hr problem:

res_bounds = [0, 20]
demand = [0,8,1,13,11,12]

A feasible solution would be:

pump_schedule = [1,1,0,1,1,1]

Giving a volume profile of

[10,12,11,8,7,5]

When modelling the above example with a MIP, the "standard" formulation is discretized 1-hour steps with an underlying mass-balance model. These models, however, tend to scale poorly when the time steps become too fine or the size of the problem gets out of hand.

At first glance, CP offers a solution with features such as interval variables for efficiently scheduling the pump at a very fine resolution. However, tracking the reservoir levels proves a challenge as the model has no visibility of the levels in the middle of the pump running interval.

Google's or-tools offers AddReservoirConstraintWithActive to model the problem exactly as I described it, but seems to require discrete boolean time variables, running into the same issue as the MIP solvers.

In short, is there a way in constraint programming to model such reservoir constraints without boolean time variables? I tried looking around online but found nothing that would help so far.

Thanks in advance.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文