Rookie Needs help regarding Binary Variables in Solver

hogo1502

New Member
Joined
Mar 24, 2011
Messages
2
Hi

I would appreciate if anybody could answer this small question: In Solver, If a I have a cell whose value is set to be binary, + the cell is also a changing cell, Do I need to set the value equal to 1, before running the Solver?

Example:

Set C3 = 0 <--- this is my x variable, set to be Integer, and a Changing Cell in Solver
Set C4 = 0 <--- this is my y variable, set to be Binary, and a Changing Cell

Constraint: C6=2*x*y <= 11

Target Cell: Maximizing C8: = C3*C4

Why is it that if C4=0 before running the Solver it gives me 0's in all cells after running it, but if C4=1 it actually does succeed to solve the problem (giving me x=5)? Surely when C4 is set as Changing Cell it should still find the solution!!
 
Last edited:

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
Trivially, C4 must be something other than 0 to maximize C8. Why set it as a changing cell at all?

In my experience, Solver works best with smooth functions, where it can get its whole partial derivative thing going. Evaluation of multiple functions (induced by binary constraints), evaluations involving enumerated values (induced by integer constraints) and flat spots (induced by rounding anywhere in the calculation chain) make its life more difficult.
 
Upvote 0
This is just a very simplified version of a bigger problem. I have an inventory management problem where at every quarter of the year I need to decide whether I am going to order a particular item or not. I have modelled this decision variable as a binary variable y. The problem is that

  1. if I initialize these variables to 0, then run the Solver, it immediately says "Solver could not find a feasible solution."
  2. If I set them to 1, Solver gives a solution (but not the one I want. I know the correct solution already).
Normally the best case would be able to leave these blank and let the Solver do its magic but when I do that, it returns "Solver could not find a feasible solution."

That's why I came with this simple example. Don't understand why the Solver can't even find the wrong answer when y cell is set to 0 or left blank.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,996
Messages
6,175,862
Members
452,676
Latest member
woodyp

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top