Frage

I have this:

A B C
2 3 A1+B1
4 5 A2+B2

constraint_1: A1 + A2 = 5
constraint_2: B1 + B2 <= 4

Objective cell: C3, which is sum(C1,C2), it should be 0.

When I start with the state above, A1+A2 = 6, solver won't work because constraint_1 is broken in the first place (A1+A2=6). Is there a workaround for this?

War es hilfreich?

Lösung

Try unchecking the "Make Unconstrained Variables Non-Negative" box in the Solver Parameters Dialog. When I do this, I get a feasible solution of A1=5, B1=0, A2=0, B2=-5.

The nature of your problem is such that there is no feasible solution unless some of the variables are allowed to be negative.

Andere Tipps

The constraint values need to be put in in the correct order in the solver, for example A1 = B1 might not work, but B1 = A1 will. It depends which is a fixed value and which is the calculated value.

The calculated value should be on the left. If you place the fixed value on the left it simply wont work.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top