[英]Resource Allocation Algorithm with Constraints
I know that some algorithms exist for my kind of problem but I'm having problems naming it and the solution associated. 我知道有些算法可以解决我的问题,但是我在命名它和相关解决方案时遇到了问题。 Here is my problem :
这是我的问题:
Goal : Maximize the allocation of my wallet money so I can fund most of my project. 目标 :最大化分配我的钱包资金,以便我可以为我的大部分项目提供资金。
Also I would rather have all my project funded at for instance 95%, than having some project funded at 100% and other at 0%. 同样,我宁愿让我的所有项目获得95%的资金,而不是让某些项目获得100%的资金而其他项目获得0%的资金。
So I guess the function to minimize would be the sum of all (d-(all the money allocted to this project))² assuming I have not enough money to fund all my projects 因此,假设我没有足够的资金来资助我所有的项目,那么我想将要最小化的函数就是所有(d-(分配给该项目的所有资金))²的总和。
Example : 范例:
I have 100€ on my first wallet, and I can spend 70% on project 1, 20% on project 3 and 10% on project 3 我的第一个钱包有100欧元,我可以在项目1上花费70%,在项目3上花费20%,在项目3上花费10%
And I have 200€ my second wallet where I can spend 30% on project 1, 50% on project 2 and 20% and project 3. 我有第二个钱包200欧元,可以在项目1上花费30%,在项目2上花费50%,在项目2上花费20%。
About my projects : 关于我的项目:
Thank you for help ! 谢谢你的帮助 !
You can formulate this as a maximum flow problem. 您可以将其公式化为最大流量问题。 Connect a source vertex to vertices corresponding to the wallets, where the capacity of each arc is the amount of money in the wallet.
将源顶点连接到与钱包相对应的顶点,其中每个弧的容量就是钱包中的货币数量。 Connect vertices corresponding to the projects to a sink vertex, where the capacity of each arc is the amount of money needed for that project.
将与项目相对应的顶点连接到汇接点顶点,其中每个弧的容量就是该项目所需的资金量。 Connect wallets to projects with arcs whose capacity reflect the amount of money from that wallet that can be spent on that project.
使用弧线将钱包连接到项目,这些项目的容量反映了可以从该钱包中花费的钱数。
Handling the piecewise quadratic objective is a bit tricky. 处理分段二次目标有些棘手。 Luckily, it's convex, so I bet you could use a quadratic program solver to good effect.
幸运的是,它是凸的,所以我敢打赌,您可以使用二次程序求解器来达到良好的效果。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.