Constraint Modeling for Solver

IrishHawk01

New Member
Joined
Mar 20, 2014
Messages
4
I think my logic is a little off...

I have three products (Small, Medium, Large)-produced across 3 plants/locations:

Product
S=Small
M=Medium
L= Large

Plant 1=1
Plant 2=2
Plant 3=3

Constraint: Production of Small cannot be greater than 5x the production of Medium

5(Xs1+Xs2+Xs3)<= (Xm1+Xm2+Xm3)
5(Xs1+Xs2+Xc3) - 1(Xm1+Xm2+Xm3) <= 0
5(Xs1+Xs2+Xs3) - 1(Xm1+Xm2+Xm3) + 0(XL1+XL2+XL3) <= 0

Production of Large cannot be greater than 5x the production of medium

5(XL1+XL2+XL3)<= (Xm1+Xm2+Xm3)
5(XL1+XL2+XL3) - 1(Xm1+Xm2+Xm3) <= 0
5(XL1+XL2+XL3) - 1(Xm1+Xm2+Xm3) + 0(Xs1+Xs2+Xs3) <= 0

Cell Ranges that I've created:

[TABLE="width: 1306"]
<tbody>[TR]
[TD][/TD]
[TD="colspan: 5"]Small[/TD]
[TD][/TD]
[TD="colspan: 5"]Medium[/TD]
[TD][/TD]
[TD="colspan: 5"]Large[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]Xs1[/TD]
[TD][/TD]
[TD]Xs2[/TD]
[TD][/TD]
[TD]Xs3[/TD]
[TD][/TD]
[TD]Xm1[/TD]
[TD][/TD]
[TD]Xm2[/TD]
[TD][/TD]
[TD]Xm3[/TD]
[TD][/TD]
[TD]XL1[/TD]
[TD][/TD]
[TD]XL2[/TD]
[TD] XL3 [/TD]
[TD][TABLE="width: 197"]
<tbody>[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD] -[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD]Production of Small cannot be greater than 5x production of Medium[/TD]
[TD]5[/TD]
[TD]+[/TD]
[TD]5[/TD]
[TD]+[/TD]
[TD]5[/TD]
[TD]+[/TD]
[TD]-1[/TD]
[TD]+[/TD]
[TD]-1[/TD]
[TD]+[/TD]
[TD]-1[/TD]
[TD]+[/TD]
[TD]0[/TD]
[TD]+[/TD]
[TD]0[/TD]
[TD]+[/TD]
[TD]0 (0) <= 0[/TD]
[/TR]
[TR]
[TD]Production of Large cannot be greater than 5x production of Medium[/TD]
[TD]0[/TD]
[TD]+[/TD]
[TD]0[/TD]
[TD]+[/TD]
[TD]0[/TD]
[TD]+[/TD]
[TD]-1[/TD]
[TD]+[/TD]
[TD]-1[/TD]
[TD]+[/TD]
[TD]-1[/TD]
[TD]+[/TD]
[TD]5[/TD]
[TD]+[/TD]
[TD]5[/TD]
[TD]+[/TD]
[TD]5 (0) <= 0[/TD]
[/TR]
</tbody>[/TABLE]


Something appears to be off in my results.....just want to double check my logic on this one.
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).

Forum statistics

Threads
1,223,275
Messages
6,171,119
Members
452,381
Latest member
Nova88

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