Solver constraints with OR function

isabel80

New Member
Joined
Aug 18, 2009
Messages
1
Hi

I am using solver to find the optimal volumes of products from different suppliers to total 100% of required volumes at minimum costs.

My target cell is the total cost set to minimum.

My changing cells are the volumes of product with each supplier.

My constraints are:

- Total volume must be equal to 100%
- Volume must be less than or equal to maximum volume available from supplier
- Volume must be more than or equal to minimum volume available from supplier OR volume must be zero

Is it possible to set up the 'OR' function?

Thanks

Isabel
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
I solved this by adding some additional columns. Beside your amount orded column, add another column I'll call "USE" . This will be filled with 1's and 0's by solver. Beside that I have the "Bought" Column which is just the product of the Ordered column and the Use Column. The sum of the Bought column is what I use as the target cell. Your cost should be the "Bought Column times the Price column and you sum this up for for your target cell. Allow solver to change the values in the Amount column AND the Use column.

Constraints should have your 100% for the bought column, minimum in Order column is min order from supplier, max in order column should be maximumn from supplier. Also make them integers if you want. The key part here is to make the USE column a binary constraint so it will choose a 1 or 0.

Allow to solve and solver will have to at least do the minimum from a supplier and if it doesn't need that minimum inventory it will change the USE cells to 0 to reduce costs. Hopefully you can solve your problem with my convoluted explanation.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,230
Messages
6,170,883
Members
452,364
Latest member
springate

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top