纸浆:最小化决策变量的标准偏差

发布于 2025-01-31 21:51:26 字数 478 浏览 3 评论 0原文

在纸浆I中出现的优化问题中,使用以下目标函数:

objective = p.lpSum(vec[r] for r in range(0,len(vec)))

所有变量均为非负整数,因此矢量上的总和给出了我问题的总单位数。 现在,我为这一事实而苦苦挣扎,纸浆只提供了许多解决方案之一,我想缩小解决方案空间的范围,从而有利于决策变量的最小标准偏差的溶液设置。 例如,Say VEC是具有元素612的向量。然后7/11、8/10、9/9是同样可行的解决方案,我希望纸浆到达9/9。 然后,该目标

objective = p.lpSum(vec[r]*vec[r] for r in range(0,len(vec)))

显然会创建一个成本函数,这将有助于情况,但是可惜,这是非线性和纸浆会引发错误。 谁能将我指向潜在的解决方案?

In an optimization problem developed in PuLP i use the following objective function:

objective = p.lpSum(vec[r] for r in range(0,len(vec)))

All variables are non-negative integers, hence the sum over the vector gives the total number of units for my problem.
Now i am struggling with the fact, that PuLP only gives one of many solutions and i would like to narrow down the solution space to results that favors the solution set with the smallest standard deviation of the decision variables.
E.g. say vec is a vector with elements 6 and 12. Then 7/11, 8/10, 9/9 are equally feasible solutions and i would like PuLP to arrive at 9/9.
Then the objective

objective = p.lpSum(vec[r]*vec[r] for r in range(0,len(vec)))

would obviously create a cost function, that would help the case, but alas, it is non-linear and PuLP throws an error.
Anyone who can point me to a potential solution?

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

花开半夏魅人心 2025-02-07 21:51:26

您可以最大程度地减少标准偏差(本质上是非线性的),而可以最大程度地减少范围或带宽。沿着:

 minimize maxv-minv
 maxv >= vec[r]   for all r
 minv <= vec[r]   for all r

Instead of minimizing the standard deviation (which is inherently non-linear), you could minimize the range or bandwidth. Along the lines of:

 minimize maxv-minv
 maxv >= vec[r]   for all r
 minv <= vec[r]   for all r
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文