Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Maintenance planning

Open in vLab iLab Assistant

This example is available in the following formats:

Introduction

Short-term hydro scheduling aims at determining the optimal generation schedules for the available hydro resources for the coming hours and days by utilizing the water potential in the most economical way. Maintenance, in general, is the activity to recover or keep a system in a functioning state. At present, the maintenance strategy is included in SHOP as pre-scheduled events. That is to say, the decision regarding which units in which stations at which time and for how long the units should be shut down for maintenance is given as time series input data. Whenever possible, the outages are planned at a time when they have the least impact on electricity production. This decision originates from the traditional corrective and preventive maintenance strategy.

In SHOP, maintenance can be given on the plant level with the maintenance_flag or on the generator and pump level with attributes also called maintenance_flag. If the flag is set to 1, it indicates that the plant or unit is under maintenance, and hence it is not available. If the flag is set to 0, the plant or unit functions as normal.

Maintenance has the highest priority. Once a hydropower plant or a unit is under maintenance, it will not be included in the optimization model. Make sure that there are bypass or spill options so that water can bypass the plant under maintenance.

In this example, the cost of having a generator on maintenance will be calculated by running two SHOP models with and without maintenance. Multiple runs can be used to try to find the best period for maintenance, but is not shown in this example due to the computational burden.

Model setup

Load in the fairly large model from YAML and show the topology:

Loading...

The price and inflow used in the example is shown below.

Loading...
Loading...

Run the optimization model

First we run the original model without maintenance:

Then we create a fresh SHOP run where G1 in PLANT004 is set to be on maintenance for the whole period and compare the objective values.

The cost of maintenance is 12422.75 €

We see that the amount of energy sold in the market is lower when the generator is on maintenance, and the hydropower producer is unable to fully utilize the highest price periods.

Loading...

The reservoir trajectories are also impacted by the generator on maintenance:

The history saving thread hit an unexpected error (OperationalError('database is locked')).History will not be written to the database.
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...

The generator production in both the original and maintenance case are shown below.

Loading...
Loading...