Part II: Unit Commitment using Fico Xpress
The objective of this part on a unit commitment problem is to illustrate some of the main points discussed in the class. The exercise is based on simple examples that should help you understand how different parameters and constraints can affect the solution of the unit commitment problem.
To carry out this exercise you will run a program that has been provided to you, and will need to modify input data in order to explore different aspects of the unit commitment solution with respect to a selected set of constraints. The program is written using Fico Xpress optimization solver, and is adjusted for the free student
version. You can download this free student version from http://optimization.fico.com/student-version-of-fico-xpress.html.
First, some necessary information on how to use Fico Xpress and run the given unit commitment program. The, a brief reminder about the key features of the unit commitment problem, and indicates which of the constraints you have learned about in the class are included here. There you will find also some practical details regarding the provided UC program, such as where to locate the necessary files, and which parameters are important for this analysis.
2.1. Using Fico Xpress
Fico Xpress is installed on EEE cluster computers in Rm 4.46 and 4.48. When you run the program the window shown in Figure 3 will appear. This is the main interface that we will use throughout the laboratory exercise.
As in other windows applications, the file menu handles file management. Use appropriate command to open the unit_commitment_lab.mos file. Note that the extension *.mos designates program files, while input data are given in *.dat files.
For specific exercise problems data are given in files such as excercise1.dat, etc. Note that these files are placed in the Input_data directory. The output file is named Output_UC.txt and is placed in results directory. Each time the unit commitment program is run, a new output file that overwrites the previous case is generated. To avoid the loss of your results simply change the name of the output file.
As Figure 4 indicates, the main window has three sub-windows/bars (although this view can be changed). The left hand window will show values of variables, parameters etc. The middle window shows the code and input data, while the last, called “run bar” provides important information regarding the solution. A concise but useful description of the most important features and user interface elements in Xpress-IVE are given in the Help menu, under Xpress-IVE Help. Since that help guide is quite short, it is strongly recommended that you briefly go through it before starting the exercise.
Figure 4: Fico Xpress IVE main window
Figure 5 shows the screen when the unit_commitment_lab.mos file is opened. To run the current program you can either use a run button (the “play” arrow), or go to the Build menu. For all exercises we will use the same main program, and will only change appropriate parameters in the input data files.
First, the task of how to make changes to parameters will be illustrated by explaining how to change a name of an input file. You can notice that near the beginning of the file there is a block which defines parameters. It starts with a parameters command and ends with end-parameters. Between these commands certain parameters, such as Input_data, Output_file, STC_flag, etc. are defined. These values are constant throughout the execution of the program, and there are two ways to change them. One is to simply change the original file, and save it with a new value. For example, to run exercise 2 change line
Another way to change this value is by selecting Options on the Build menu, which will open a window shown in Figure 3. Activate the Use model parameters options
by selecting the corresponding box. Then write Input_data =”input_data/exercise2.dat” in the appropriate box (see Figure 6).
Tip: If you use the second option and then switch to the first, do not forget that any parameters defined through “Run Options” window will always overwrite anything defined by the file itself. Thus, if you want to exclude changes specified in this window remember to deactivate the corresponding box.
Unit Commitment Using Fico Xpress
The structure of the input *.dat files is as shown in Figure 7. Some exercises will require that you change input parameters, and you can do that by opening the file either within the Xpress IVE or using any other text editor.
Tip: Make sure that you are saving an input file as a .dat file, and place it in the Input_data directory. Also, do not forget to change the name of the input and output data files that you are using. You must save the input file once you have changed the parameters or these changes will not be recognised when the program is run.
After running the program some useful information will appear in your left and right hand windows/bars. On the left side you can see the defined entities and verify their values. The right you can find important information regarding the solution. For example, as illustrated in Figure 8, Stats bar shows optimization statistics such as whether the problem is feasible, which algorithms have been used, etc. By selecting different tabs you can see different information regarding the solution, such as a decision tree, the change of value of the objective function, etc. As run the program for different questions, have a look at the information shown in these displays.
By selecting different tabs, you can see different information, and you are encouraged to play a bit with this feature.
The solution of the UC problem is written in the Output_UC.txt file, in results directory. You can view this file either with the Xpress IVE or any other text editor.
Tip: Every time you run a program a new output file will overwrite the old one, so make sure you rename the previous files so not to lose your results from previous exercises.
2.2 Formulation of the Unit Commitment Problem
The objective of this part is not to explain the Unit Commitment (UC) problem, but to briefly remind you on its formulation and outline which constraints are modelled. A notation used here is as follows:
Pgi (t) – generation output at bus i at period t
ugi – binary unit commitment variable indicating if unit i is on or off at period t C gi (Pgi (t)) – generation cost of unit i at period t for a given level of output Pgi (t)
Pgimin , Pgimax – lower and uppers generation limits of unit i
Tgiup ,Tgidown – min-up and min-down times of generator i
STC i (t ) – start-up cost of generator i at period t
X gion (t ), X gioff (t) – the number of hours generator i has been on or off at period t since it
has been turned on or off respectively; note that in the input data file X gioff is called “tau”.
Pd (t) – total system demand at period t
Therefore, the UC problem can be mathematically, expressed as the following optimization problem:
Minimize total generation costs,
|, ug )ui (t)Cgi (Pgi|
|t 1 i 1|
|subject to the following constraints:|
|power balance constraint,|
|u i (t ) Pgi ( t ) Pd (t )||(2)|
upper and lower limits on generation outputs,
|u (t )P min P (t ) u (t )Pmax||(3)|
min-up and –down time constraints,
|X on (t ) T up||(4)|
|X off||(t ) T down||(5)|
|Note that the cost function is linear here, so that|
|Cgi Pgi t nli ICi Pgi t||(6)|
|where ICi –||incremental costs|
|nli –||no load costs|
Start-up costs are modelled in two ways. The first one is to the simple approach in which start-up costs can have only one constant value, i ,
|STCi||i||if u (t 1) 0 and u (t) 1|
The second method is to take into consideration that it is less expensive to start a warm than a cold unit. Thus, depending on the number of hours a unit has been off, its start-up costs can have two values,
|i||if||t X off|
|t X gi|
2.3 Some Explanations Regarding the Unit Commitment Program
Throughout the exercise you will study how the above defined constraints affect the solution of the UC problem. In order to do that, the given UC program allows you to include or exclude certain constraints by setting the values of the appropriate parameters. As mentioned before, these parameters are specified in the first part of the program, and the one that are of interest to you are given in the following table:
|Input_data||Name of the input file|
|Out_File||Name of the output file|
|STC_flag||Indicates if the start-up costs are considered: 0 -no; 1- yes|
|Fixed_start_up||Indicates which model is used for the start-up costs:|
|0 – one constant value; 1 – hot/cold model|
|MinUpDown_flag||Indicates if min-up and –down times are considered:|
|0 – no; 1 – yes|
|MustRun_flag||Indicates if there are some must-run units. Here it is used to|
|illustrate the difference between an economic dispatch and a|
|unit commitment: 0 – unit commitment, 1 – economic dispatch|
|Table 1: Parameters of the UC program|
For all the above numerical parameters initial values are equal to zero. The Exercises and Questions section will describe how to change these values so to obtain required cases.
2.4 Where to Find the UC Program?
The program, together with the input data is placed on MyPlace (uc_lab.zip) from where you can download it onto your account.
In addition, you will find there some documentation on how to use Fico Xpress, and how to make programs using its Mosel language. These documents are not necessary for running the following exercises or answering the questions, but are provided for those who are curious to see how they can use Fico Xpress on their own.
2.5 Exercises and Questions
The answer to the following questions and your discussions should be submitted as a short (2-3 pages) report. In addition you should attach printouts of the output results that you think are important to illustrate each of the cases.
2.5.1 Differences between an Economic Dispatch (ED) and a Unit Commitment (UC)
The objective of the first exercise is to observe how a solution of the unit commitment problem differs from the solution obtained by the economic dispatch.
- To solve for UC set parameter MustRun_flag=0.
- To solve for the economic dispatch repeat the program with MustRun_flag=1. Input data for both UC and ED case studies are given in file dat.
- Explain the difference between a unit commitment and an economic dispatch. Compare results for these two cases. Indicate their differences and similarities, and explain why do they occur?
2.5.2 Base Case UC
Input data for this case are given in excrcise2.dat file. We will consider this case as the base case which minimizes the cost function of equation (1) subject to only power balance and generation output constraints, defined by equations (2) and (3) respectively. Other constraints are neglected for now. Furthermore, no-load costs and start-up costs are also ignored.
To simulate this case, all of the numerical parameters shown in Table 1 are set to zero, that is:
STC_flag = 0; Fixed_start_up = 0; MinUpDown_flag =0; MustRun_flag=0
Record the UC solution of this case, and use it as a reference case for all further studies.
2.5.3 Influence of No-load costs
Input data for this case are given in exercise3.dat file.
First, open exercise3.dat and modify nl1 value (in column 5) of the first generator to nl1=10.0. Run the UC program and record results.
Then, investigate how a further change in the parameter nl1 of generator 1 affects the UC solution. Is there any change at all, and if so when does it happen (this can be for quite a large value)? Explain results.
2.5.4 Influence of Start-up Costs
In this part we will see whether the modelling of start-up costs can affect the UC solution. Can you intuitively answer this question without running the program? What do you think might happen and why?
Input data for this part are given in exercise4.dat.
Here, the simple model of start-up cost with only one value of start-up costs, as described by equation (7) , is used.
To study this case change value of parameter STC_flag =1. How does this change affect the solution?
2.5.5. Min-up and –down time constraints and initial conditions
Exercises 2.5.3 and 2.5.4 illustrated how additional terms of the cost function defined by equation (1) affect the UC solution. For this exercise use exercise5.dat input file.
The aim of this part is to study how an additional set of constraints that accounts for the min-up and –down time can also modify the UC solution. These constraints are defined by equations (4) and (5), and they will be included into the model by setting MinUpDown_flag=1. This change will also mean that the initial conditions of generating units, that is the time each unit has been on or off prior to the first hour will affect the solution. The values of these initial conditions are given in I0 (last) column in exercise5.dat
In this part start-up costs are neglected, and therefore appropriate parameter should be set to 0, i.e. STC_flag=0.
If you examine the values of min-up, Tgiup , and min-down, Tgidown , times given in
columns Mup and Mdn in the input file, what do you expect will happen with the new UC solution. Why?
Lets’ now change the value of min-up time of generator 3 from
What has happened?
Next, let’s look how the change in the value of min-down time affects the solution (but first, restore the value of Tgup3 1 from the above simulations). What happens if we set Tgdown2 2 ?
2.5.6. Initial conditions and demand-side management
Suppose that utility has the option to change the shape of the load curve by reducing supply at one hour, and then generating the same amount at some the other time. The overall consumed energy thus remains the same, but it is differently distributed in time. Now, run the program with the input data defined in exce6.dat, with STC_flag=1, Fixed_start_up=0 and MinUpDown_flag=1. What results do you get for this case?
Can you improve the situation by using demand-side management? If so, how would you do that? Give one example where this measure gives feasible solution.
Furthermore, would different initial conditions of generators also help to resolve the situation? If both methods give good results, which one is better from the perspective of the total generation costs?
2.5.7 Observation of the total generation costs
After running all of the above simulations, what are your observations regarding the total generation costs? Is there any correlation between the constraints and the cost? Briefly explain your findings.