简体   繁体   中英

EXCEL: Solver constraints

I would like to ask assistance on setting up the solver.

Assuming I have 5 cells that must be allocated value that sum up to 1000. However, some of them can be zero if that will accommodate other constraints. At this point I get some solver outputs that make 4 of the 5 zero, and allocates 1000 to the 1 cell.

I would like to know how do I add another constraints that tells the solver that, say at least 3 of the 5 cannot be zero (any 5).

Your assistance would be appreciated. Thanks

Add the constraints such as the sum of these 3 cells has to be greater than x or each of these cells has to be greater or equal to y.

So, if cells b1 to b5 have the results you are looking for then in cells c1 to c5 can be set to 10, 20, 30 or whatever and then in the solver you have:

$B$1:$B$5 >= $C$1:$C$5

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM