简体   繁体   中英

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 :

  • I have a set W of wallet with money
  • I have a set P of project on which I can spend my money
  • Each wallet w has an amount of money M, and I can spend this money only on several project and only a specific amount
  • Each project p needs an amount d of money

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%.

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

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

And I have 200€ my second wallet where I can spend 30% on project 1, 50% on project 2 and 20% and project 3.

About my projects :

  1. Project 1 needs at least 120€
  2. Project 2 needs at least 100€
  3. Project 3 needs at least 110€

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM