Professional Documents
Culture Documents
Mep 501 Ass1 JMGB
Mep 501 Ass1 JMGB
Coursework #1
The cost of transmitting electricity from each plant to each city is different due to varying transmission
distances and infrastructure costs. The cost per MW of electricity transmission is as follows (in dollars):
• Plant 1 to City A: $5 per MW
• Plant 1 to City B: $7 per MW
• Plant 1 to City C: $6 per MW
• Plant 2 to City A: $6 per MW
• Plant 2 to City B: $5 per MW
• Plant 2 to City C: $8 per MW
• Plant 3 to City A: $8 per MW
• Plant 3 to City B: $6 per MW
• Plant 3 to City C: $7 per MW
The goal of the power distribution company is to minimize the total cost of electricity distribution while
meeting the demands of all three cities.
Solution
To minimize the total cost of electricity distribution while meeting the demands of all three cities, we can
formulate this as a linear optimization problem. Let's define our decision variables:
Let x ijrepresent the amount of electricity (in MW) transmitted from Plant ito City j , where i can be 1, 2,
or 3, and j can be A, B, or C.
Objective function:
We want to minimize the total cost of electricity distribution, so our objective function is:
Minimize Z = 5 x 1 A +7 x1 B+ 6 x 1C +6 x 2 A +5 x 2 B +8 x 2 C + 8 x 3 A + 6 x 3 B+ 7 x3 C
Subject to the following constraints:
1. Demand constraints:
x 1 A+ x 2 A+ x 3 A=250
x 1 B+ x 2 B+ x 3 B=350
x 1 C+ x 2 C+ x 3C=400
2. Capacity constraints:
x 1 A+ x 1 B+ x 1C ≤ 300
x 2 A+ x 2 B+ x 2C ≤ 400
x 3 A+ x 3 B+ x 3 C ≤ 500
3. Non-negativity constraints:
x ij ≥ 0
Now, we can solve this linear optimization problem using techniques such as the simplex method or
linear programming software.
Code in Python:
Optimal Solution:
Total cost: $5750.0
The construction cost of the Gas Plant is $20 million, and it can generate 100 MW of electricity.
The construction cost of the Solar Plant is $15 million, and it can generate 50 MW of electricity.
The construction cost of the Wind Plant is $25 million, and it can generate 75 MW of electricity.
The company also needs to consider environmental impact. The Gas Plant has the lowest
environmental impact, followed by the Solar Plant, and the Wind Plant has the highest environmental
impact. To meet the electricity demand, the company must ensure it generates at least 300 MW. The
goal of the power company is to minimize the construction costs while considering environmental
impact. Use the simplex method to determine the optimal mix of power plants to build, including how
many of each type should be constructed.
Set up the linear optimization problem and find the optimal solution using the simplex method.
What is the minimum construction cost, and how many of each type of power plant should be built to
achieve this minimum cost?
Solution
Decision Variables:
Objective Function:
Constraints:
1 x1 , 2 x 2 ,3 x 3 ≥0
Code in Python:
from scipy.optimize import linprog
# Coefficients of the objective function (construction costs)
c = [20, 15, 25] # Cost coefficients for Gas, Solar, and Wind plants
# Inequality constraints matrix (A_ub x <= b_ub)
A_ub = [(-100, -50, -75), (-1, -2, -3)] # Corrected the structure of A_ub
# Inequality constraints vector
b_ub = [-300, -6] # Negative because of demand constraint flipped
# Bounds for each decision variable
x_bounds = [(0, None), (0, None), (0, None)] # Non-negativity constraints
# Solve the linear programming problem
result = linprog(c, A_ub=A_ub, b_ub=b_ub, bounds=x_bounds, method='highs')
# Print the result
print ("Optimal Solution:")
print ("Total Cost: $", round(result.fun),"Million") # Million
print ("Power Plants to construct:")
print ("Gas Plant:", round(result.x[0]))
print ("Solar Plant:", round(result.x[1]))
print ("Wind Plant:", round(result.x[2]))
Optimal Solution:
Total Cost: $ 70 Million
Power Plants to construct:
Gas Plant: 2
Solar Plant: 2
Wind Plant: 0