Question: Q 4 . Consider the following optimization problem that is coded in CBC . from pulp import * Factory = [ A , B ]

Q4. Consider the following optimization problem that is coded in CBC.
from pulp import*
Factory =[A,B]
Ma11=["M1","M2","M3","M4"]
Prod ={A:1000,B:2000}
Sales M1": 1500,M2:600,M3:700,M4:200
cost ,
"B": {"M1":3,"M2":1,"M3":3,"M4":2}}
prob = LpProblem("Final Exam", LpMinimize)
x= LpVariable.dicts ("x",(Factory, Mall), lowBound =0,
upBound = None, cat = const. LpInteger)
prob +=1 pSum(Cost [f][s]**x[f][s] for f in Factory for s in
Mal1)
for f in Factory:
prob t= IpSum(X[f][s] for s in Mall)= Prod[f]
for s in Mall:
prob for f in Factory)>=Sales[s]
We are trying to model the sales distribution channel of a supply chain. There are two factories (A,B) and four Malls (M1,M2,M3,M4). On the left you can see the Python code of the optimization problem for CBC library. Please solve the following questions.
a. Write the mathematical model of the first for loop that is written in bold and italic.
b. Assume factory A can serve only M1 and M3. Write the necessary mathematical equation for this constraint.
 Q4. Consider the following optimization problem that is coded in CBC.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!