Solver query

  • Thread starter Thread starter Damien
  • Start date Start date
D

Damien

I'm trying to use the Solver to solve a problem for me,
but even though I've set binary constraints on the
changing cells (ie I want them to be 1 or 0), the solver
keeps making them into decimals, and producing solutions.

How can I prevent this ?

Basically, I've got a list of 30 amounts, of which I know
a combination of 28 or 29 adds up to the target amount.
I'm using a 1 or 0 in the changing cells as a multiplier,
to try and work out which combination is correct.

eg if the target is 100, the solution would be as follows:
(imagine this set up in Excel)

multiplier amount result
0 100 0
1 100 100

Total 100


My real problem is a bit more complicated, and even with
binary constraints (and I've tried integer constraints),
the Solver will invariable set the multiplier to a decimal
and show it as the solution

eg
multiplier amount result
0.5 100 50
0.5 100 50

Total 100

Thanks
 
Solver, as with other programs in its class, works with decimal values
and towards the end of its processing ensures that the decimal values
are (close) to the specified integer/binary constraints. So, if Solver
fails to find a solution and you accept its current values, you will
get all kinds of decimal numbers.

If your problem is linear (from your description, it would appear to
be), in the Solver dialog box click the Options button. In the
resulting Solver Options dialog box, check the 'Assume Linear Model'
checkbox.

--
Regards,

Tushar Mehta
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top