.Net 中线性规划的推荐库?

发布于 2024-09-03 22:28:31 字数 1536 浏览 4 评论 0原文

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

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

发布评论

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

评论(3

沧笙踏歌 2024-09-10 22:28:32

首先,我猜您可能需要比简单的 LP 求解器更复杂的东西。大多数手机服务都有断点,您可能希望根据通话时长、频率、一天中的时间等从一种服务切换到另一种服务。这种切换意味着需要整数变量,这意味着您可能需要 MILP(混合整数线性规划) ) 求解器。 (如果所有成本函数和约束都是凸的,那么您可以使用 LP 求解器来解决,但这有点超前了)。好消息是,还有开源且经济实惠的 MILP 求解器。

我会从 LP SOLVE 或 SYMPHONY 开始。请访问此处查看 COIN-OR 网站,了解一些有用的背景信息。

针对您增强的问题描述,我认为您可以简单地选取 50 个用户中的每一个并计算每个计划的成本,然后单独应用每个选项。有 n 个用户、m 个可能的计划和 p 个可能的选项,您需要查看每个用户的 m*p 个选项 - 但这有点无聊。

从用户角度来看,一个更有趣的问题是:计划之间的断点在哪里?您能否定义无差异曲线 - 用户在两个计划之间无差异的使用组合?这个问题可以使用一些线性代数技术在数学上解决,但实际上没有目标函数,所以它看起来不像 MILP。

从提供商的角度来看,另一个有趣的问题是如何制定计划以实现利润最大化?如果您将 50 个用户作为总体的代表,则可以在此处应用一些优化。您需要对用户的总成本设置上限,并增加成本才能获得利润,但我认为有一个公式是可能的。

First off, I'm guessing that you might need something more complex than a simple LP solver. Most cell phone services have breakpoints where you may want to switch from one service to another based on call length, frequency, time of day, etc. This switching implies the need for integer variables which means you might need a MILP (mixed integer linear programming) solver. (If all of your cost functions and constraints are convex, you could get by with an LP solver, but that's getting ahead of ourselves a little). The good news is that there are also open source and affordable MILP solvers out there as well.

I'd start with LP SOLVE or SYMPHONY. Check out the COIN-OR site here for some useful background info.

In response to your enhanced problem description, I think you could simply take each of the 50 users and cost out each plan then apply each of the options individually. With n users and m possible plans and p possible options, you need to look at m*p options for each user - but that's kind of boring.

A more interesting question from the user perspective is: Where are the break points between plans? Can you define indifference curves - combinations of usage where the user would be indifferent between two plans? This question could be address mathematically probably using some linear algebra techniques, but there's really not an objective function so it doesn't seem like a MILP.

Another interesting question from the provider perspective - how to set plans to maximize profits? Here you could apply some optimization if you take your 50 users to be representative of the population. You would need to put a cap on the total cost for a user and add costs to get profits, but I think a formulation is possible.

阪姬 2024-09-10 22:28:32

查看 GNU 线性编程套件。

http://www.gnu.org/software/glpk/

Check out the GNU Linear Programming Kit.

http://www.gnu.org/software/glpk/

暮年 2024-09-10 22:28:31

您可以尝试Microsoft Solver Foundation。它是一个数学规划库,支持求解线性规划、混合整数规划、随机规划以及其他优化和建模问题。

它有 Express(免费)、Standard 和 Enterprise(MSDN 订阅)版本。

You can try Microsoft Solver Foundation. It is a mathematical programming library, which supports solving linear programming, mixed integer programming, stochastic programming, and other optimization and modeling problems.

It is available in Express (Free), Standard, and Enterprise (MSDN Subscriptions) editions.

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