Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 5

MEP 501: Applied Optimization Methods

Coursework #1

Submitted by: Jan Michael Batilo

Problem 1: Power Distribution Optimization


A power distribution company is responsible for supplying electricity to three cities: City A, City B,
and City C. The company has three power plants, Plant 1, Plant 2, and Plant 3, each located in different
regions. Each power plant has a different capacity for generating electricity.
• Plant 1 has a capacity of 300 megawatts (MW).
• Plant 2 has a capacity of 400 MW.
• Plant 3 has a capacity of 500 MW.

The electricity demand for each city is as follows:


• City A requires 250 MW of electricity.
• City B requires 350 MW of electricity.
• City C requires 400 MW of electricity.

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:

from scipy.optimize import linprog

# Objective function coefficients


c = [5, 7, 6, 6, 5, 8, 8, 6, 7]

# Coefficients of the inequality constraints (demand constraints)


A_eq = [[1, 0, 0, 1, 0, 0, 1, 0, 0],
[0, 1, 0, 0, 1, 0, 0, 1, 0],
[0, 0, 1, 0, 0, 1, 0, 0, 1]]

# Right-hand side of the inequality constraints (demand values)


b_eq = [250, 350, 400]

# Coefficients of the inequality constraints (capacity constraints)


A_ub = [[1, 1, 1, 0, 0, 0, 0, 0, 0],
[0, 0, 0, 1, 1, 1, 0, 0, 0],
[0, 0, 0, 0, 0, 0, 1, 1, 1]]

# Right-hand side of the inequality constraints (plant capacities)


b_ub = [300, 400, 500]

# Bounds for decision variables (non-negativity constraints)


bounds = [(0, None)] * 9

# Solve the linear optimization problem


result = linprog(c, A_eq=A_eq, b_eq=b_eq, A_ub=A_ub, b_ub=b_ub, bounds=bounds, method='highs')
# Print the result
print("Optimal Solution:")
print("Total cost:", result.fun)
print("Amount of electricity transmitted from each plant to each city:")
print("Plant 1:", result.x[:3])
print("Plant 2:", result.x[3:6])
print("Plant 3:", result.x[6:])

Optimal Solution:
Total cost: $5750.0

Amount of electricity transmitted from each plant to each city:


Plant 1: [250. 0. 50.]
Plant 2: [ 0. 350. 0.]
Plant 3: [ 0. 0. 350.]

Plant 1 will supply 250MW to City A and 50MW to City C


Plant 2 will supply 350MW to City B
Plant 3 will supply 350MW to City C

Problem 2: Problem: Power System Expansion Planning


Aboitiz Power Corporation is planning to expand its power generation capacity to meet the
growing electricity demand in a region. The company has three options for adding new power plants:
Gas Plant, Solar Plant, and Wind Plant. Each option has different construction costs, operating costs, and
capacity.

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:

x 1=number of Gas Plants ¿ build


x 2=number of Solar Plants ¿ build
x 3=number of Wind Plants ¿ build

Objective Function:

min Z=20 x1 +15 x 2+ 25 x 3

Constraints:

Electricity generation constraint>>>


100 x 1+50 x 2 +75 x3 ≥ 300

Non-negativity constraint >>>


x1 , x2 , x3 ≥ 0

Environmental impact constraint >>>

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

You might also like