If solver is unable to find a solution within the time frame or number of iterations allowed (or if there is no correct answer possible) it will not return binary answers.
One possible work-around, depending on the type of problem you are trying to solve and how exact an answer you need, is to set a few cells (probably the ones with the smallest values in the cells you are calculating for) with the contstraints <=1
and >=0
rather than binary. The image you provided is not showing up, so I'm not exactly sure what you were after.
(It may be helpful to set up a cell with a sumproduct for the cells not set as binary; see below.)
As an example, if you are trying to solve for a total of 22 (which has no solution), you start with:
9 1
9 1
9 1
6 1
3 1
If you set all the values in the second column as binary, you will end up with:
9 0.5625
9 0.5625
9 0.5625
6 0.708333333
3 0.854166667
If you set the first 3 as binary, and the last two as <=1
& >=0
, you end up with:
9 0
9 1
9 1
6 0.333333333
3 0.666666667
The sumproduct for the last two rows = 4, which you could then use to manually set one of the last two as 1 and the other 0, depending on whether you want an answer slightly below or above the target.