Skip to content

Commit

Permalink
figure location
Browse files Browse the repository at this point in the history
  • Loading branch information
Tars Verschelde committed Oct 16, 2023
1 parent 9859d64 commit bd4029b
Showing 1 changed file with 22 additions and 22 deletions.
44 changes: 22 additions & 22 deletions docs/src/tutorial/unit_commitment.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ In this tutorial, you will learn how to add unit commitment constraints to the S
- Change the *Parameter type* to *Time series fixed resolution*, *Resolution* to *1h*, and the demand values to the time series as in the image below.
- Finish by pressing *OK* in the *Edit value* menu. In the *Object parameter* table you will see that the value of the *demand* has changed to *Time series*.

![image](../figs_unit_commitment/uc_electricity_demand.png)
![image](figs_unit_commitment/uc_electricity_demand.png)

### Editing the temporal block

Expand All @@ -50,7 +50,7 @@ You might or might not notice that the Simple System has, by default, a temporal
- Right click on the value cell and then select *edit* from the context menu. The *Edit value* dialog will pop up.
- Change the *Duration* from *1D* to *1h* as shown in the image below.

![image](../figs_unit_commitment/uc_temporal_block.png)
![image](figs_unit_commitment/uc_temporal_block.png)

### Establishing new output relationships

Expand All @@ -61,13 +61,13 @@ Since we will have the new unit commitment variables, we want to see the results
- Enter *report1* under *report*, and *units\_on* under *output*. Repete the same procedure for the following outputs as seen in the image below; then press *OK*.
- This will write the unit commitment variable values and costs in the objective function to the output database as a part of *report1*.

![image](../figs_unit_commitment/uc_output_definition.png)
![image](figs_unit_commitment/uc_output_definition.png)

When you're ready, commit all changes to the database.

### Executing the workflow

- Go back to Spine Toolbox's main window, and hit the **Execute project** button ![image](../figs_simple_system/play-circle.png) from the tool bar. You should see 'Executing All Directed Acyclic Graphs' printed in the *Event log* (at the bottom left by default).
- Go back to Spine Toolbox's main window, and hit the **Execute project** button ![image](figs_simple_system/play-circle.png) from the tool bar. You should see 'Executing All Directed Acyclic Graphs' printed in the *Event log* (at the bottom left by default).

- Select the 'Run SpineOpt' Tool. You should see the output from SpineOpt in the *Julia Console* after clicking the *object activity control*.

Expand All @@ -79,11 +79,11 @@ When you're ready, commit all changes to the database.
- In the *Relationship parameter value* table, double click in the *Time series* values to explore the results of the different variables.
- The image below shows the electricity flow results for both power plants. As expected, the *power\_plant\_a* (i.e., the cheapest unit) always covers the demand first until its maximum capacity, and then the *power\_plant\_b* (i.e., the more expensive unit) covers the demand that is left. This is the most economical dispatch since the problem has no extra constraints (so far!).

![image](../figs_unit_commitment/uc_flow_results_no_uc.png)
![image](figs_unit_commitment/uc_flow_results_no_uc.png)

To explore the cost results, the pivot table view shows a more user-friendly option to analyze the results. Remember that you can find a description of how to create the pivot table view in the Simple System tutorial [here](https://spine-tools.github.io/SpineOpt.jl/latest/tutorial/simple_system/). The cost components in the objective function are shown in the image below. As expected, all the costs are associated with the *variable\_om\_costs* since we haven't included the unit-commitment constraints yet.

![image](../figs_unit_commitment/uc_costs_results_no_uc.png)
![image](figs_unit_commitment/uc_costs_results_no_uc.png)

## Step 2 - Include the minimum operating point

Expand All @@ -95,7 +95,7 @@ Let's assume that the *power\_plant\_b* has a minimum operating point of *10%*,
- In *Relationship tree*, expand the *unit\_\_to\_node* class and select *power\_plant\_b | electricity\_node*.
- In the *Relationship parameter* table (typically at the bottom-center), select the *minimum\_operating\_point* parameter and the *Base* alternative, and enter the value *0.1* as seen in the image below. This will set the minimum operating point of *power\_plant\_b* when producing electricity.

![image](../figs_unit_commitment/uc_power_plant_b_electricity_node_data_definition.png)
![image](figs_unit_commitment/uc_power_plant_b_electricity_node_data_definition.png)

### Adding the unit commitment costs and initial states

Expand All @@ -108,13 +108,13 @@ Let's assume that the *power\_plant\_b* has a minimum operating point of *10%*,
- *units\_on\_cost* parameter and the *Base* alternative, and enter the value *3*. This will establish that there's a cost of '3' EUR per units on (e.g., idling cost).
- *initial\_units\_on* parameter and the *Base* alternative, and enter the value *0*. This will establish that there are no units 'on' before the first time step.

![image](../figs_unit_commitment/uc_power_plant_b_costs_definition.png)
![image](figs_unit_commitment/uc_power_plant_b_costs_definition.png)

When you're ready, commit all changes to the database.

### Executing the workflow including the minimum operating point

- Go back to Spine Toolbox's main window, and hit the **Execute project** button ![image](../figs_simple_system/play-circle.png) from the tool bar. You should see 'Executing All Directed Acyclic Graphs' printed in the *Event log* (at the bottom left by default).
- Go back to Spine Toolbox's main window, and hit the **Execute project** button ![image](figs_simple_system/play-circle.png) from the tool bar. You should see 'Executing All Directed Acyclic Graphs' printed in the *Event log* (at the bottom left by default).

- Select the 'Run SpineOpt' Tool. You should see the output from SpineOpt in the *Julia Console* after clicking the *object activity control*.

Expand All @@ -128,15 +128,15 @@ When you're ready, commit all changes to the database.
- In the *Relationship parameter value* table, double click in the *Time series* values to explore the results of the different variables.
- The image below shows the electricity flow results for both power plants. Any difference? What happended to the flows in *power\_plant\_a* and *power\_plant\_b*?

![image](../figs_unit_commitment/uc_flow_results_min_op_point.png)
![image](figs_unit_commitment/uc_flow_results_min_op_point.png)

- Let's take a look to the *units\_on* and *units\_started\_up* in the image below to get wider perspective.

![image](../figs_unit_commitment/uc_results_min_op_point.png)
![image](figs_unit_commitment/uc_results_min_op_point.png)

- So, since *power\_plant\_b* needs to be at least producing *20MW* when it is 'on', then *power\_plant\_a* needs to reduce its output even though it has the lower variable cost, making the total system cost (i.e., objective function) more expensive than in the previous run. The image below shows the cost components, where we can see the costs of having the *power\_plant\_b* on, its start-up and shutdown costs, and the increase in the *variable\_om\_costs* due to flow changes.

![image](../figs_unit_commitment/uc_costs_results_min_op_point.png)
![image](figs_unit_commitment/uc_costs_results_min_op_point.png)

## Step 3 - Include the minimum uptime

Expand All @@ -148,11 +148,11 @@ Let's assume that the *power\_plant\_b* also has a minimum uptime of 8 hours, me
- Expand the [unit] class, and select the *power\_plant\_b* from the expanded tree.
- In the *Object parameter* table (typically at the top-center), select the *min\_up\_time* parameter, the *Base* alternative, and then right click on the value and select the *Edit* option in the context menu, as shown in the image below.

![image](../figs_unit_commitment/uc_power_plant_b_min_up_time_1.png)
![image](figs_unit_commitment/uc_power_plant_b_min_up_time_1.png)

- The *Edit value* dialog will pop up. Select the *Parameter\_type* as *Duration* and enter the value *8h*. This will establish that minimum uptime is eight hours.

![image](../figs_unit_commitment/uc_power_plant_b_min_up_time_2.png)
![image](figs_unit_commitment/uc_power_plant_b_min_up_time_2.png)

When you're ready, commit all changes to the database.

Expand All @@ -168,15 +168,15 @@ You know the drill, go ahead :wink:
- In the *Relationship parameter value* table, double click in the *Time series* values to explore the results of the different variables.
- The image below shows the electricity flow results for both power plants. Interesting. Don't you think?

![image](../figs_unit_commitment/uc_flow_results_min_up_time.png)
![image](figs_unit_commitment/uc_flow_results_min_up_time.png)

- Let's take a look again to the *units\_on* and *units\_started\_up* in the image below.

![image](../figs_unit_commitment/uc_results_min_up_time.png)
![image](figs_unit_commitment/uc_results_min_up_time.png)

- So, since *power\_plant\_b* needs to be at least producing *20MW* when it is 'on' and also needs to be at least *8h* 'on' each time it starts, then *power\_plant\_b* starts even before the demand is greater than the capacity of *power\_plant\_a*. Therefore, *power\_plant\_a* needs to reduce even further its output, making the total system cost more expensive than in the previous runs. The image below shows the cost components, where we can see the costs of having the *power\_plant\_b* on, its start-up and shutdown costs, and the increase in the *variable\_om\_costs* due to flow changes.

![image](../figs_unit_commitment/uc_costs_results_min_up_time.png)
![image](figs_unit_commitment/uc_costs_results_min_up_time.png)

## Step 4 - Include the minimum downtime

Expand All @@ -188,11 +188,11 @@ Let's assume that the *power\_plant\_b* also has a minimum downtime of 8 hours,
- Expand the [unit] class, and select the *power\_plant\_b* from the expanded tree.
- In the *Object parameter* table (typically at the top-center), select the *min\_down\_time* parameter, the *Base* alternative, and then right click on the value and select the *Edit* option in the context menu, as shown in the image below.

![image](../figs_unit_commitment/uc_power_plant_b_min_down_time_1.png)
![image](figs_unit_commitment/uc_power_plant_b_min_down_time_1.png)

- The *Edit value* dialog will pop up. Select the *Parameter\_type* as *Duration* and enter the value *8h*. This will establish that minimum downtime is eight hours.

![image](../figs_unit_commitment/uc_power_plant_b_min_down_time_2.png)
![image](figs_unit_commitment/uc_power_plant_b_min_down_time_2.png)

When you're ready, commit all changes to the database.

Expand All @@ -208,14 +208,14 @@ One last time, don't give up!
- In the *Relationship parameter value* table, double click in the *Time series* values to explore the results of the different variables.
- The image below shows the electricity flow results for both power plants. Wow! This result is even more interesting :stuck_out_tongue_winking_eye:. Do you know what happened?

![image](../figs_unit_commitment/uc_flow_results_min_down_time.png)
![image](figs_unit_commitment/uc_flow_results_min_down_time.png)

- Let's take a look again to the *units\_on* and *units\_started\_up* in the image below. Instead of two start-ups, the *power\_plant\_b* only starts once. Why?

![image](../figs_unit_commitment/uc_results_min_down_time.png)
![image](figs_unit_commitment/uc_results_min_down_time.png)

- Since *power\_plant\_b* needs to be at least producing *20MW* when it is 'on' plus also needs to be at least *8h* 'on' each time it starts, and it needs to be at least *8h* 'off' if it shutdowns, then *power\_plant\_b* never shuts down and stays 'on' after it starts because it is the only way to fulfil the unit commitment constraints. Therefore, *power\_plant\_a* needs to reduce even further its output, making the total system cost more expensive than in the previous runs. The image below shows the cost components, where we can see the costs of having the *power\_plant\_b* on, its start-up and shutdown costs (which is zero this time), and the increase in the *variable\_om\_costs* due to flow changes.

![image](../figs_unit_commitment/uc_costs_results_min_down_time.png)
![image](figs_unit_commitment/uc_costs_results_min_down_time.png)

If you have completed this tutorial, congratulations! You have mastered the basic concepts of unit commitment using SpineToolbox and SpineOpt. Keep up the good work!

0 comments on commit bd4029b

Please sign in to comment.