Forum Discussion

Richard Lemmer's avatar
Richard Lemmer
Copper Contributor
Aug 07, 2017

Solver claims there is no feasible solution when one is glaringly obvious.

Hello,

 

I am trying to use Solver to find out if there are numbers in a data set that add to a specific number. For example, I am trying to use Solver to find out if there are are numbers in the set 2, 3, 7, 15, 26, and 44 that add up to 5.

 

I read on several other sites how this could be done. Using the data set above, let us imagine that I have put 2 in Cell A1, 3 in Cell A2, 7 in Cell A3, 15 in Cell A4, 26 in Cell A5, and 44 in Cell A6. These websites would tell me to enter =sumproduct(A1:A6) in Cell B7, causing the sum of the six numbers (97) to appear. Then, the sites would tell me to run Solver in the following way: Set Objective: $B$7 to value of 5 by changing variable cells $B$1:$B$6 subject to the constraints $B$1:$B$6 = binary. I would use the Simplex LP solver. Solver would then tell me that it has found a solution, display a "1" in the cells next to the 2 and the 3 (which, when added together, make 5), and a "0" next to the cells with the numbers 7, 15, 26, and 44.

 

That is what is supposed to happen. However, after running Solver a few times, when I do the exact same thing, one of two things happens. Either Solver will tell me that there is no feasible solution, or Solver will tell me that it has found a solution and then display zeroes in all of the variable cells as though there were no feasible solution. If Solver tells me that there is a feasible solution and I run Solver on the data set a second time, Solver tells me that there is no feasible solution when I run the test a second time.

 

Any help on this matter will be greatly appreciated. Please let me know if there are any questions, and thank you for your help.  

No RepliesBe the first to reply

Resources