Clear Filters
Clear Filters

Adding additional constraints to the optimal generator dispatch MILP example

5 views (last 30 days)
Hi I would very much appreciate some help in amending the solution for one of the given examples for the MILP in documentation: https://uk.mathworks.com/help/optim/ug/optimal-dispatch-of-power-generators-solver-based.html?s_tid=srchtitle_optimal%20dispatch%20of%20power%20generators_1
In this example, I want to count the number of periods z(i,j) for which each generator is off (i.e. 0) consecutively and vary the cost of start accordingly. I thought about creating a sort of inactivity_cost for each period but that will not work because I want to cap the cost of start to a max value which may not be the case with inactivity cost. The idea here being that if the generator is off for 1 period, it is hot start, if it is off for 2-4 periods, it is warm start and if it is off for more than 4 periods then it is cold start. I know the constraints got to be linear but if I can capture the essential essence of the idea, it will work.
Additionally, I want to define a constraint on the number of starts for example max starts <=5.
If you could please help me with slight modifications in the given example, I'd be very grateful.

Answers (1)

arushi
arushi on 17 Jan 2024
Hi Abhinav,
I understand that you want to amend the solution for one of the given examples for the MILP in documentation. To modify the given example for the MILP problem , need to incorporate the concept of hot, warm, and cold starts with a cap on the cost ,a constraint on the maximum number of starts. For this you'll need to introduce additional binary variables and constraints. The binary variables will track the status of each generator in the previous periods, and the constraints will determine the cost of starting based on the generator's status.
Here's a rough outline of how you can approach this:
Binary Variables for Generator Status: Introduce binary variables that indicate whether a generator is off (0) or on (1) in each period.
Tracking Consecutive Off Periods: Introduce binary variables to track the number of consecutive off periods for each generator. This will require additional constraints to ensure that these variables correctly reflect the generator's status over time.
Cost of Starting: Define the cost of starting based on the number of consecutive off periods. You can use piecewise linear functions to represent the hot, warm, and cold start costs.
Maximum Number of Starts: Introduce a constraint to limit the maximum number of starts for each generator.
Step 1: Binary Variables for Generator Status
You already have binary variables u(i,t) in the example that indicate whether generator i is on (1) or off (0) at time t.
Step 2: Tracking Consecutive Off Periods
You can use additional binary variables z(i,t,k) where i is the generator index, t is the time period, and k is the number of consecutive off periods you want to track (e.g., k = 1 for hot, k = 2-4 for warm, k > 4 for cold). You will need to add constraints to make sure these variables correctly count the number of consecutive off periods.
Step 3: Cost of Starting
Define the cost of starting as a piecewise linear function of the number of consecutive off periods. For example, let c_hot, c_warm, and c_cold be the costs for hot, warm, and cold starts, respectively.
Step 4: Maximum Number of Starts
Introduce a constraint to limit the total number of starts for each generator. Let s(i) be the number of starts for generator i, then you would have a constraint like:
sum(s(i)) <= 5, for all i
Hope this helps.

Categories

Find more on Systems of Nonlinear Equations in Help Center and File Exchange

Products


Release

R2022a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!