I'm trying to use solver to solve an optimization problem in Excel, but have trouble with my IF binary (0 or 1) function, as they*re not updated when I use solver. A simplified version of my spreadsheet looks like this;
t Q1 Q2 Binary1 Binary2 Marginal Rent1 Marginal Rent2 Total Rent
0 0 3 0 1 0 Y Y
1 5 0 1 0 X 0 X
2 7 3 1 1 X Y X+Y
3 0 0 0 0 0 0 0
My changing variable cells are Q1 and Q2, and the binary cells are IF functions connected to the variable cells, (if Q1>0,1,if not,0). I wan't the marginal rent cell (equation) to be zero if no units are produced at Q1 or Q2, so I multiply the Marginal Rent cells with the binary cells (IF function). When I try to optimize Total Rent, solver doesn't update my IF functions, so that even though 0 units of Q1 or Q2 are produced, the Marginal Rent is positive when they should be zero.
I'm pretty inexperienced with Excel, so I would appreciate practical suggestions. If there's a better solutions to replace the IF functions, please let me know.
Aucun commentaire:
Enregistrer un commentaire