Hi all,

I have this problem where there are n bottles which need to be filled with m(j) marbles, with j going from 1 thru N, and a z marbles available.

I could choose whether to fill the greater number of bottles possible without caring how many marbles the other bottles get, or I could choose to minimize the difference between each bottle's objective and the real amount of marbles assigned to it.

1st question: which programming would you think would best address this problem? 2nd question: which technique would use to diminish the number of iterations?

Thank you very much in advance!

asked 01 Oct '10, 22:06

SMM's gravatar image

accept rate: 0%

In the case you want to minimize the sum of (squared) absolute difference between the each bottle objective and the real amount of marbles assigned to it, this is a resource allocation problem and you don't need any solver to solve it. You can find a reference on these problems here http://mitpress.mit.edu/catalog/item/default.asp?tid=6505&ttype=2

The algorithm is a greedy that converge to the optimum (convex problem). You start with an arbitrary assignment then you successively take a marble from one bottle to put it in another one such that the objective function decreases (the most). You do that until you cannot improve it. You reach the optimum.


answered 02 Oct '10, 04:54

pschaus%201's gravatar image

pschaus 1
accept rate: 100%

Thanks a lot for your guidance!

(04 Oct '10, 17:40) SMM
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: 01 Oct '10, 22:06

Seen: 667 times

Last updated: 02 Oct '10, 04:54

OR-Exchange! Your site for questions, answers, and announcements about operations research.