Investment problem generation¶
The goal of this step is to modify the .mps files of the weekly Antares problems to create the so-called satellite problems of the investment problem. The master problem is also generated in this step.
Python orchestrator get_names¶
Before changing the .mps file, a post-processing of the files created by antares-solver must be done.
The goal is to produce a file mps.txt containing each .mps with his associated variables.txt file (defining the mapping between the column IDs and variable names). Each line of the mps.txt file looks as follows:
problem-1-1-20210713-163528.mps variables-1-1-20210713-163528.txt constraints-1-1-20210713-163528.txt
Note
constraints.txt files are still defined in the file but not used in later steps.
Then:
- The
area-<mc_year>-<week>-<timestamp>.txtfile produced byantares-solveris copied asarea.txt. - The
interco-<mc_year>-<week>-<timestamp>.txtfile produced byantares-solveris also copied asinterco.txt.
Modification of weekly problems with lp_namer¶
Here are the main steps of problem modification with lp_namer, that lead to the creation of the satellite problems.
1- Read candidates and get link column ID¶
Each investment link corresponds to a variable in the weekly optimization problem. The first step is to retrieve the column ID of each investment candidate link from its name specified in candidates.ini:
- The
area.txtandinterco.txtfiles are used to map area names to link IDs. - Candidates defined in
candidates.iniand the associated link profile (if defined) are read.
2- Modification of .mps file¶
In order to create the satellite problems, some contraints of the weekly problems must be changed and some variables must be added.
Initial weekly problems¶
In the initial weekly problems, we have the following variables:
| Notation | Description | Label |
|---|---|---|
| \(F_{l,t}\) | Total power flow through link \(l\) at time \(t\). | ValeurDeNTCOrigineVersExtremite |
| \(F_{l,t}^{+}\) | Power flow through link \(l\) in the forward direction at time \(t\). | CoutOrigineVersExtremiteDeLInterconnexion |
| \(F_{l,t}^{-}\) | Power flow through link \(l\) in the backward direction at time \(t\). | CoutExtremiteVersOrigineDeLInterconnexion |
| \(\bar{C}_{l,t}^{+}\) | Maximum transmission capacity through link \(l\) in the forward direction at time \(t\). | |
| \(\bar{C}_{l,t}^{-}\) | Maximum transmission capacity through link \(l\) in the backward direction at time \(t\). |
The bounds on the variables are as follows: $$ F_{l,t} \leq \bar{C}_{l,t}^{+} $$
There are also constraints linking the forward and backward flows:
Modifications for satellite problems¶
In order to create the satellite problems, the constraints must be changed as follows:
$$ 0 \leq F_{l,t}^{-} \leq +\infty $$ with the same additional constraints:
We also need to add the investment variables \(x_{l}\) that represent the invested capacity on link \(l\). We suppose that the link has a direct (resp. indirect) temporal profile denoted by \(\Lambda_{l,t}^{+}\) (resp. \(\Lambda_{l,t}^{-}\)). The already installed capacity is \(\widetilde{C}_{l}^{+}\) in the forward direction (resp. \(\widetilde{C}_{l}^{-}\) in the backward direction) and the already installed direct (resp. indirect) temporal profile is denoted by \(\widetilde{\Lambda}_{l,t}^{+}\) (resp. \(\widetilde{\Lambda}_{l,t}^{-}\)). Then the following constraints must be added:
This translates into the following steps for the modification of .mps files:
- Remove bounds for
ValeurDeNTCOrigineVersExtremitevariables (only for link with candidate), - Change upper bounds to
InfforCoutOrigineVersExtremiteDeLInterconnexionandCoutExtremiteVersOrigineDeLInterconnexionvariables (only for link with candidate), - Add a new column for each candidate,
- Add the constraints on
ValeurDeNTCOrigineVersExtremite, - Add the constraints on
CoutOrigineVersExtremiteDeLInterconnexion, - Add the constraints on
CoutExtremiteVersOrigineDeLInterconnexion.
3- Read additional candidate constraints¶
The additional-constraints parameter, that specifies the path to file, may be defined in the settings.ini. This is used to define linear constraints between the invested capacities of investment candidates, and is read at this stage of Antares-Xpansion process. For more information on the file format, see the corresponding part of the user guide.
4- Creation of master problem¶
The master problem is created from the list of candidates in the following way:
- Add a new column (= variable) for each candidate with lower bound
0and upper boundmax-investmentormax-units\(\times\)unit-size. -
If the investment on the candidate has integer constraints (use of the
unit-sizeparameter):- Add a new (integer) column for the number of built units, with lower bound
0and upper boundmax-units. - Add a constraint that links the number of units to the invested capacity.
- Add a new (integer) column for the number of built units, with lower bound
-
If additional constraints are defined:
- Create binary constraints, that represent for example exclusion constraints, see Figure 13.
- Create the other linear constraints between invested capactities of the candidates.
5- Creation of a variable / column ID mapping file¶
A file (structure.txt) is created, containing for each satellite problem and the master, the associated column ID for the candidates.
Example
master battery 0
master peak 1
master pv 2
master semibase 3
master transmission_line 4
problem-1-1-20210713-163528.mps battery 5547
problem-1-1-20210713-163528.mps peak 5545
problem-1-1-20210713-163528.mps pv 5548
problem-1-1-20210713-163528.mps semibase 5546
problem-1-1-20210713-163528.mps transmission_line 5544
Here:
- In
master.mps, the candidatebatteryhas column ID0, - In
problem-1-1-20210713-163528corresponding fileproblem-1-1-20210713-163528.mps, the candidatepeakhas column ID5545.
Note
The column ID is no longer used by benders. This file must still be created so that benders knows the list of candidate for each problem.