My first execution
In this tutorial, we will create and load an example case, analyze its input data, execute the model and assess the results obtained. This case contains some basic elements that can help understand some of the functionalities of the IARA package.
First steps
We'll start by indicating we are using the IARA package - assuming it is already installed (otherwise, see the Installation Guide).
using IARA
In addition, we also need to select an existing directory to store the case and indicate the name of the example case we wish to create (which will be done next).
case_path = joinpath(@__DIR__, "data", "ExampleCase_FirstExecution")
case_name = "boto_base_01"
"boto_base_01"
To create the example case, we can use the function ExampleCases.build_example_case
, indicating the path in which the files must be stored, case_path
, as well as the name of the example case case_name
.
IARA.ExampleCases.build_example_case(case_path, case_name)
Building case "boto_base_01" in "/home/runner/work/IARA.jl/IARA.jl/docs/build/tutorial/data/ExampleCase_FirstExecution"
It is also possible to build and/or edit a case's physical data, manipulating its input data - this is shown in detail further in the present documentation. For now, let's stick to this example case as it is defined.
Analyzing input data
After loading (or creating or editing) a case, it is possible to analyze the input data using the IARA.summarize
function. This function describes briefly the case's key characteristics, as shown below.
IARA.summarize(case_path)
[ Info:
[ Info: Execution options
[ Info: Path: /home/runner/work/IARA.jl/IARA.jl/docs/build/tutorial/data/ExampleCase_FirstExecution
[ Info: Output path: /home/runner/work/IARA.jl/IARA.jl/docs/build/tutorial/data/ExampleCase_FirstExecution/outputs
[ Info: Run mode: MARKET_CLEARING
[ Info: Plot results: true
[ Info: periods: 6
[ Info: scenarios: 3
[ Info: subperiods: 3
[ Info:
[ Info: Collections
[ Info: RenewableUnit: 1 element(s)
[ Info: HydroUnit: 2 element(s)
[ Info: ThermalUnit: 6 element(s)
[ Info: Zone: 1 element(s)
[ Info: Bus: 2 element(s)
[ Info: DemandUnit: 3 element(s)
[ Info: DCLine: 1 element(s)
[ Info: AssetOwner: 6 element(s)
[ Info: GaugingStation: 2 element(s)
[ Info: BiddingGroup: 8 element(s)
[ Info:
[ Info: Time Series from external files
[ Info: inflow
[ Info: demand_unit
[ Info: renewable_generation
[ Info:
[ Info: Cuts file:
[ Info: No cuts file
[ Info:
Execution
Since this example case already contains all the basic data required to execute the IARA model in its MARKET_CLEARING
mode, the execution is quite straightforward. First, we must define the folder in which the output files will be stored.
path01_first_execution = joinpath(case_path, "output01_first_execution")
"/home/runner/work/IARA.jl/IARA.jl/docs/build/tutorial/data/ExampleCase_FirstExecution/output01_first_execution"
Then, the execution can be carried out using the IARA.market_clearing
function, indicating the case path and the output path defined, as follows:
IARA.market_clearing(case_path; output_path = path01_first_execution)
[ Info:
[ Info: Execution options
[ Info: Path: /home/runner/work/IARA.jl/IARA.jl/docs/build/tutorial/data/ExampleCase_FirstExecution
[ Info: Output path: /home/runner/work/IARA.jl/IARA.jl/docs/build/tutorial/data/ExampleCase_FirstExecution/output01_first_execution
[ Info: Run mode: MARKET_CLEARING
[ Info: Plot results: true
[ Info: periods: 6
[ Info: scenarios: 3
[ Info: subperiods: 3
[ Info:
[ Info: Collections
[ Info: RenewableUnit: 1 element(s)
[ Info: HydroUnit: 2 element(s)
[ Info: ThermalUnit: 6 element(s)
[ Info: Zone: 1 element(s)
[ Info: Bus: 2 element(s)
[ Info: DemandUnit: 3 element(s)
[ Info: DCLine: 1 element(s)
[ Info: AssetOwner: 6 element(s)
[ Info: GaugingStation: 2 element(s)
[ Info: BiddingGroup: 8 element(s)
[ Info:
[ Info: Time Series from external files
[ Info: inflow
[ Info: demand_unit
[ Info: renewable_generation
[ Info:
[ Info: Cuts file:
[ Info: No cuts file
[ Info:
[ Info: Running clearing for period: 1
[ Info: Running simulation EX_POST_PHYSICAL
[ Info: Running clearing for period: 2
[ Info: Running simulation EX_POST_PHYSICAL
[ Info: Running clearing for period: 3
[ Info: Running simulation EX_POST_PHYSICAL
[ Info: Running clearing for period: 4
[ Info: Running simulation EX_POST_PHYSICAL
[ Info: Running clearing for period: 5
[ Info: Running simulation EX_POST_PHYSICAL
[ Info: Running clearing for period: 6
[ Info: Running simulation EX_POST_PHYSICAL
[ Info: Running post-processing routines
[ Info: Building plots
MARKET_CLEARING
executions are also explored further in this documentation, in a dedicated pages.
Assessing outputs
After executing the model, the output path defined will be automatically filled with several output files, organized in a standard structure of folders, presented below.
case_path
├── output01_first_execution
│ ├── plots
│ │ └── ...
│ └── ...
└── ...
The case_path
folder contains, besides the output folder (in our example, named output01_first_execution
), the case's input files. The output01_first_execution
folder contains, besides the plots
folder, raw outputs of the model execution, in ".csv" and ".toml" formats. The plots
folder contains several ".html" files, which lead to graphic visualizations (dashboards) of the outputs.
As an example, we can take a look at the marginal cost plot. This visualization, presented below, presents the load marginal cost in each node of the system (this example case comprises 2 nodes) in each period/subperiod - illustrating the average and upper/lower quantiles of the scenarios represented.
Specific pages of this tutorial are dedicated to exploring in detail the outputs and dashboards of the IARA model.
This page was generated using Literate.jl.