Editing clearing options
In this tutorial, it is described how to edit a case's clearing parameters, such as the market iterations considered in the execution (ex-ante and/or ex-post), the nature of these procedures (physical or commercial), and their dispatch criteria (cost-based or bid-based). For that, we will use as a starting point the boto_base_01
example case in its default configuration - that is, disregarding any changes carried out in previous tutorials. Firstly, we must rebuild this case from IARA's dataset (in order to "reset" its configuration) in the case_path
previously informed (assuming that you have already gone through the previous tutorials). Then, we will load this study, using the IARA.load_study
function, and store it in a variable named case_edit_clearing
(including the read_only = false
argument to indicate that we wish to modify the case).
case_name = "boto_base_01"
IARA.ExampleCases.build_example_case(case_path, case_name)
case_edit_clearing = IARA.load_study(case_path; read_only = false);
PSRClassesInterface.PSRDatabaseSQLite.DatabaseSQLite(SQLite.DB("/home/runner/work/IARA.jl/IARA.jl/docs/build/tutorial/data/ExampleCase_boto_base_01/study.iara"), "/home/runner/work/IARA.jl/IARA.jl/docs/build/tutorial/data/ExampleCase_boto_base_01/study.iara", OrderedCollections.OrderedDict{String, PSRClassesInterface.PSRDatabaseSQLite.Collection}("Configuration" => PSRClassesInterface.PSRDatabaseSQLite.Collection("Configuration", OrderedCollections.OrderedDict{String, PSRClassesInterface.PSRDatabaseSQLite.ScalarParameter}("id" => PSRClassesInterface.PSRDatabaseSQLite.ScalarParameter{Int64}("id", Int64, missing, false, "Configuration", "Configuration"), "label" => PSRClassesInterface.PSRDatabaseSQLite.ScalarParameter{String}("label", String, "\"Configuration\"", true, "Configuration", "Configuration"), "number_of_nodes" => PSRClassesInterface.PSRDatabaseSQLite.ScalarParameter{Int64}("number_of_nodes", Int64, missing, false, "Configuration", "Configuration"), "number_of_subscenarios" => PSRClassesInterface.PSRDatabaseSQLite.ScalarParameter{Int64}("number_of_subscenarios", Int64, 1, true, "Configuration", "Configuration"), "iteration_limit" => PSRClassesInterface.PSRDatabaseSQLite.ScalarParameter{Int64}("iteration_limit", Int64, missing, false, "Configuration", "Configuration"), "initial_date_time" => PSRClassesInterface.PSRDatabaseSQLite.ScalarParameter{String}("initial_date_time", String, "\"2024-01-01\"", true, "Configuration", "Configuration"), "time_series_step" => PSRClassesInterface.PSRDatabaseSQLite.ScalarParameter{Int64}("time_series_step", Int64, 0, true, "Configuration", "Configuration"), "hydro_balance_subperiod_resolution" => PSRClassesInterface.PSRDatabaseSQLite.ScalarParameter{Int64}("hydro_balance_subperiod_resolution", Int64, 0, false, "Configuration", "Configuration"), "loop_subperiods_for_thermal_constraints" => PSRClassesInterface.PSRDatabaseSQLite.ScalarParameter{Int64}("loop_subperiods_for_thermal_constraints", Int64, missing, false, "Configuration", "Configuration"), "cycle_discount_rate" => PSRClassesInterface.PSRDatabaseSQLite.ScalarParameter{Float64}("cycle_discount_rate", Float64, missing, true, "Configuration", "Configuration")…), OrderedCollections.OrderedDict{String, PSRClassesInterface.PSRDatabaseSQLite.ScalarRelation}(), OrderedCollections.OrderedDict{String, PSRClassesInterface.PSRDatabaseSQLite.VectorParameter}("subperiod_duration_in_hours" => PSRClassesInterface.PSRDatabaseSQLite.VectorParameter{Float64}("subperiod_duration_in_hours", Float64, missing, false, "subperiod_duration", "Configuration", "Configuration_vector_subperiod_duration"), "expected_number_of_repeats_per_node" => PSRClassesInterface.PSRDatabaseSQLite.VectorParameter{Int64}("expected_number_of_repeats_per_node", Int64, missing, false, "expected_number_of_repeats_per_node", "Configuration", "Configuration_vector_expected_number_of_repeats_per_node")), OrderedCollections.OrderedDict{String, PSRClassesInterface.PSRDatabaseSQLite.VectorRelation}(), OrderedCollections.OrderedDict{String, PSRClassesInterface.PSRDatabaseSQLite.TimeSeries}(), OrderedCollections.OrderedDict{String, PSRClassesInterface.PSRDatabaseSQLite.TimeSeriesFile}("hour_subperiod_map" => PSRClassesInterface.PSRDatabaseSQLite.TimeSeriesFile{String}("hour_subperiod_map", String, missing, false, "Configuration", "Configuration_time_series_files"), "fcf_cuts" => PSRClassesInterface.PSRDatabaseSQLite.TimeSeriesFile{String}("fcf_cuts", String, missing, false, "Configuration", "Configuration_time_series_files"))), "RenewableUnit" => PSRClassesInterface.PSRDatabaseSQLite.Collection("RenewableUnit", OrderedCollections.OrderedDict{String, PSRClassesInterface.PSRDatabaseSQLite.ScalarParameter}("id" => PSRClassesInterface.PSRDatabaseSQLite.ScalarParameter{Int64}("id", Int64, missing, false, "RenewableUnit", "RenewableUnit"), "label" => PSRClassesInterface.PSRDatabaseSQLite.ScalarParameter{String}("label", String, missing, true, "RenewableUnit", "RenewableUnit"), "technology_type" => PSRClassesInterface.PSRDatabaseSQLite.ScalarParameter{Int64}("technology_type", Int64, missing, false, "RenewableUnit", "RenewableUnit")), OrderedCollections.OrderedDict{String, PSRClassesInterface.PSRDatabaseSQLite.ScalarRelation}("biddinggroup_id" => PSRClassesInterface.PSRDatabaseSQLite.ScalarRelation{Int64}("biddinggroup_id", Int64, missing, false, "RenewableUnit", "BiddingGroup", "id", "RenewableUnit"), "bus_id" => PSRClassesInterface.PSRDatabaseSQLite.ScalarRelation{Int64}("bus_id", Int64, missing, false, "RenewableUnit", "Bus", "id", "RenewableUnit")), OrderedCollections.OrderedDict{String, PSRClassesInterface.PSRDatabaseSQLite.VectorParameter}(), OrderedCollections.OrderedDict{String, PSRClassesInterface.PSRDatabaseSQLite.VectorRelation}(), OrderedCollections.OrderedDict{String, PSRClassesInterface.PSRDatabaseSQLite.TimeSeries}("existing" => PSRClassesInterface.PSRDatabaseSQLite.TimeSeries{Int64}("existing", Int64, missing, false, "parameters", "RenewableUnit", "RenewableUnit_time_series_parameters", ["date_time"], 1), "max_generation" => PSRClassesInterface.PSRDatabaseSQLite.TimeSeries{Float64}("max_generation", Float64, missing, false, "parameters", "RenewableUnit", "RenewableUnit_time_series_parameters", ["date_time"], 1), "om_cost" => PSRClassesInterface.PSRDatabaseSQLite.TimeSeries{Float64}("om_cost", Float64, missing, false, "parameters", "RenewableUnit", "RenewableUnit_time_series_parameters", ["date_time"], 1), "curtailment_cost" => PSRClassesInterface.PSRDatabaseSQLite.TimeSeries{Float64}("curtailment_cost", Float64, missing, false, "parameters", "RenewableUnit", "RenewableUnit_time_series_parameters", ["date_time"], 1)), OrderedCollections.OrderedDict{String, PSRClassesInterface.PSRDatabaseSQLite.TimeSeriesFile}("generation_ex_ante" => PSRClassesInterface.PSRDatabaseSQLite.TimeSeriesFile{String}("generation_ex_ante", String, missing, false, "RenewableUnit", "RenewableUnit_time_series_files"), "generation_ex_post" => PSRClassesInterface.PSRDatabaseSQLite.TimeSeriesFile{String}("generation_ex_post", String, missing, false, "RenewableUnit", "RenewableUnit_time_series_files"))), "HydroUnit" => PSRClassesInterface.PSRDatabaseSQLite.Collection("HydroUnit", OrderedCollections.OrderedDict{String, PSRClassesInterface.PSRDatabaseSQLite.ScalarParameter}("id" => PSRClassesInterface.PSRDatabaseSQLite.ScalarParameter{Int64}("id", Int64, missing, false, "HydroUnit", "HydroUnit"), "label" => PSRClassesInterface.PSRDatabaseSQLite.ScalarParameter{String}("label", String, missing, true, "HydroUnit", "HydroUnit"), "initial_volume" => PSRClassesInterface.PSRDatabaseSQLite.ScalarParameter{Float64}("initial_volume", Float64, missing, false, "HydroUnit", "HydroUnit"), "initial_volume_type" => PSRClassesInterface.PSRDatabaseSQLite.ScalarParameter{Int64}("initial_volume_type", Int64, 2, false, "HydroUnit", "HydroUnit"), "has_commitment" => PSRClassesInterface.PSRDatabaseSQLite.ScalarParameter{Int64}("has_commitment", Int64, 0, false, "HydroUnit", "HydroUnit"), "operation_type" => PSRClassesInterface.PSRDatabaseSQLite.ScalarParameter{Int64}("operation_type", Int64, 0, false, "HydroUnit", "HydroUnit")), OrderedCollections.OrderedDict{String, PSRClassesInterface.PSRDatabaseSQLite.ScalarRelation}("hydrounit_spill_to" => PSRClassesInterface.PSRDatabaseSQLite.ScalarRelation{Int64}("hydrounit_spill_to", Int64, missing, false, "HydroUnit", "HydroUnit", "spill_to", "HydroUnit"), "hydrounit_turbine_to" => PSRClassesInterface.PSRDatabaseSQLite.ScalarRelation{Int64}("hydrounit_turbine_to", Int64, missing, false, "HydroUnit", "HydroUnit", "turbine_to", "HydroUnit"), "gaugingstation_id" => PSRClassesInterface.PSRDatabaseSQLite.ScalarRelation{Int64}("gaugingstation_id", Int64, missing, false, "HydroUnit", "GaugingStation", "id", "HydroUnit"), "biddinggroup_id" => PSRClassesInterface.PSRDatabaseSQLite.ScalarRelation{Int64}("biddinggroup_id", Int64, missing, false, "HydroUnit", "BiddingGroup", "id", "HydroUnit"), "bus_id" => PSRClassesInterface.PSRDatabaseSQLite.ScalarRelation{Int64}("bus_id", Int64, missing, false, "HydroUnit", "Bus", "id", "HydroUnit")), OrderedCollections.OrderedDict{String, PSRClassesInterface.PSRDatabaseSQLite.VectorParameter}("waveguide_volume" => PSRClassesInterface.PSRDatabaseSQLite.VectorParameter{Float64}("waveguide_volume", Float64, missing, true, "waveguide", "HydroUnit", "HydroUnit_vector_waveguide")), OrderedCollections.OrderedDict{String, PSRClassesInterface.PSRDatabaseSQLite.VectorRelation}(), OrderedCollections.OrderedDict{String, PSRClassesInterface.PSRDatabaseSQLite.TimeSeries}("existing" => PSRClassesInterface.PSRDatabaseSQLite.TimeSeries{Int64}("existing", Int64, missing, false, "parameters", "HydroUnit", "HydroUnit_time_series_parameters", ["date_time"], 1), "production_factor" => PSRClassesInterface.PSRDatabaseSQLite.TimeSeries{Float64}("production_factor", Float64, missing, false, "parameters", "HydroUnit", "HydroUnit_time_series_parameters", ["date_time"], 1), "min_generation" => PSRClassesInterface.PSRDatabaseSQLite.TimeSeries{Float64}("min_generation", Float64, missing, false, "parameters", "HydroUnit", "HydroUnit_time_series_parameters", ["date_time"], 1), "max_generation" => PSRClassesInterface.PSRDatabaseSQLite.TimeSeries{Float64}("max_generation", Float64, missing, false, "parameters", "HydroUnit", "HydroUnit_time_series_parameters", ["date_time"], 1), "max_turbining" => PSRClassesInterface.PSRDatabaseSQLite.TimeSeries{Float64}("max_turbining", Float64, missing, false, "parameters", "HydroUnit", "HydroUnit_time_series_parameters", ["date_time"], 1), "min_volume" => PSRClassesInterface.PSRDatabaseSQLite.TimeSeries{Float64}("min_volume", Float64, missing, false, "parameters", "HydroUnit", "HydroUnit_time_series_parameters", ["date_time"], 1), "max_volume" => PSRClassesInterface.PSRDatabaseSQLite.TimeSeries{Float64}("max_volume", Float64, missing, false, "parameters", "HydroUnit", "HydroUnit_time_series_parameters", ["date_time"], 1), "min_outflow" => PSRClassesInterface.PSRDatabaseSQLite.TimeSeries{Float64}("min_outflow", Float64, missing, false, "parameters", "HydroUnit", "HydroUnit_time_series_parameters", ["date_time"], 1), "om_cost" => PSRClassesInterface.PSRDatabaseSQLite.TimeSeries{Float64}("om_cost", Float64, missing, false, "parameters", "HydroUnit", "HydroUnit_time_series_parameters", ["date_time"], 1)), OrderedCollections.OrderedDict{String, PSRClassesInterface.PSRDatabaseSQLite.TimeSeriesFile}("inflow_ex_ante" => PSRClassesInterface.PSRDatabaseSQLite.TimeSeriesFile{String}("inflow_ex_ante", String, missing, false, "HydroUnit", "HydroUnit_time_series_files"), "inflow_ex_post" => PSRClassesInterface.PSRDatabaseSQLite.TimeSeriesFile{String}("inflow_ex_post", String, missing, false, "HydroUnit", "HydroUnit_time_series_files"))), "GaugingStation" => PSRClassesInterface.PSRDatabaseSQLite.Collection("GaugingStation", OrderedCollections.OrderedDict{String, PSRClassesInterface.PSRDatabaseSQLite.ScalarParameter}("id" => PSRClassesInterface.PSRDatabaseSQLite.ScalarParameter{Int64}("id", Int64, missing, false, "GaugingStation", "GaugingStation"), "label" => PSRClassesInterface.PSRDatabaseSQLite.ScalarParameter{String}("label", String, missing, true, "GaugingStation", "GaugingStation")), OrderedCollections.OrderedDict{String, PSRClassesInterface.PSRDatabaseSQLite.ScalarRelation}("gaugingstation_downstream" => PSRClassesInterface.PSRDatabaseSQLite.ScalarRelation{Int64}("gaugingstation_downstream", Int64, missing, false, "GaugingStation", "GaugingStation", "downstream", "GaugingStation")), OrderedCollections.OrderedDict{String, PSRClassesInterface.PSRDatabaseSQLite.VectorParameter}(), OrderedCollections.OrderedDict{String, PSRClassesInterface.PSRDatabaseSQLite.VectorRelation}(), OrderedCollections.OrderedDict{String, PSRClassesInterface.PSRDatabaseSQLite.TimeSeries}("historical_inflow" => PSRClassesInterface.PSRDatabaseSQLite.TimeSeries{Float64}("historical_inflow", Float64, missing, false, "historical_inflow", "GaugingStation", "GaugingStation_time_series_historical_inflow", ["date_time"], 1)), OrderedCollections.OrderedDict{String, PSRClassesInterface.PSRDatabaseSQLite.TimeSeriesFile}()), "ThermalUnit" => PSRClassesInterface.PSRDatabaseSQLite.Collection("ThermalUnit", OrderedCollections.OrderedDict{String, PSRClassesInterface.PSRDatabaseSQLite.ScalarParameter}("id" => PSRClassesInterface.PSRDatabaseSQLite.ScalarParameter{Int64}("id", Int64, missing, false, "ThermalUnit", "ThermalUnit"), "label" => PSRClassesInterface.PSRDatabaseSQLite.ScalarParameter{String}("label", String, missing, true, "ThermalUnit", "ThermalUnit"), "has_commitment" => PSRClassesInterface.PSRDatabaseSQLite.ScalarParameter{Int64}("has_commitment", Int64, 0, true, "ThermalUnit", "ThermalUnit"), "max_ramp_up" => PSRClassesInterface.PSRDatabaseSQLite.ScalarParameter{Float64}("max_ramp_up", Float64, missing, false, "ThermalUnit", "ThermalUnit"), "max_ramp_down" => PSRClassesInterface.PSRDatabaseSQLite.ScalarParameter{Float64}("max_ramp_down", Float64, missing, false, "ThermalUnit", "ThermalUnit"), "min_uptime" => PSRClassesInterface.PSRDatabaseSQLite.ScalarParameter{Float64}("min_uptime", Float64, missing, false, "ThermalUnit", "ThermalUnit"), "max_uptime" => PSRClassesInterface.PSRDatabaseSQLite.ScalarParameter{Float64}("max_uptime", Float64, missing, false, "ThermalUnit", "ThermalUnit"), "min_downtime" => PSRClassesInterface.PSRDatabaseSQLite.ScalarParameter{Float64}("min_downtime", Float64, missing, false, "ThermalUnit", "ThermalUnit"), "max_startups" => PSRClassesInterface.PSRDatabaseSQLite.ScalarParameter{Int64}("max_startups", Int64, missing, false, "ThermalUnit", "ThermalUnit"), "max_shutdowns" => PSRClassesInterface.PSRDatabaseSQLite.ScalarParameter{Int64}("max_shutdowns", Int64, missing, false, "ThermalUnit", "ThermalUnit")…), OrderedCollections.OrderedDict{String, PSRClassesInterface.PSRDatabaseSQLite.ScalarRelation}("biddinggroup_id" => PSRClassesInterface.PSRDatabaseSQLite.ScalarRelation{Int64}("biddinggroup_id", Int64, missing, false, "ThermalUnit", "BiddingGroup", "id", "ThermalUnit"), "bus_id" => PSRClassesInterface.PSRDatabaseSQLite.ScalarRelation{Int64}("bus_id", Int64, missing, false, "ThermalUnit", "Bus", "id", "ThermalUnit")), OrderedCollections.OrderedDict{String, PSRClassesInterface.PSRDatabaseSQLite.VectorParameter}(), OrderedCollections.OrderedDict{String, PSRClassesInterface.PSRDatabaseSQLite.VectorRelation}(), OrderedCollections.OrderedDict{String, PSRClassesInterface.PSRDatabaseSQLite.TimeSeries}("existing" => PSRClassesInterface.PSRDatabaseSQLite.TimeSeries{Int64}("existing", Int64, missing, false, "parameters", "ThermalUnit", "ThermalUnit_time_series_parameters", ["date_time"], 1), "startup_cost" => PSRClassesInterface.PSRDatabaseSQLite.TimeSeries{Float64}("startup_cost", Float64, missing, false, "parameters", "ThermalUnit", "ThermalUnit_time_series_parameters", ["date_time"], 1), "min_generation" => PSRClassesInterface.PSRDatabaseSQLite.TimeSeries{Float64}("min_generation", Float64, missing, false, "parameters", "ThermalUnit", "ThermalUnit_time_series_parameters", ["date_time"], 1), "max_generation" => PSRClassesInterface.PSRDatabaseSQLite.TimeSeries{Float64}("max_generation", Float64, missing, false, "parameters", "ThermalUnit", "ThermalUnit_time_series_parameters", ["date_time"], 1), "om_cost" => PSRClassesInterface.PSRDatabaseSQLite.TimeSeries{Float64}("om_cost", Float64, missing, false, "parameters", "ThermalUnit", "ThermalUnit_time_series_parameters", ["date_time"], 1)), OrderedCollections.OrderedDict{String, PSRClassesInterface.PSRDatabaseSQLite.TimeSeriesFile}()), "DemandUnit" => PSRClassesInterface.PSRDatabaseSQLite.Collection("DemandUnit", OrderedCollections.OrderedDict{String, PSRClassesInterface.PSRDatabaseSQLite.ScalarParameter}("id" => PSRClassesInterface.PSRDatabaseSQLite.ScalarParameter{Int64}("id", Int64, missing, false, "DemandUnit", "DemandUnit"), "label" => PSRClassesInterface.PSRDatabaseSQLite.ScalarParameter{String}("label", String, missing, true, "DemandUnit", "DemandUnit"), "demand_unit_type" => PSRClassesInterface.PSRDatabaseSQLite.ScalarParameter{Int64}("demand_unit_type", Int64, 0, true, "DemandUnit", "DemandUnit"), "max_shift_up" => PSRClassesInterface.PSRDatabaseSQLite.ScalarParameter{Float64}("max_shift_up", Float64, missing, false, "DemandUnit", "DemandUnit"), "max_shift_down" => PSRClassesInterface.PSRDatabaseSQLite.ScalarParameter{Float64}("max_shift_down", Float64, missing, false, "DemandUnit", "DemandUnit"), "curtailment_cost" => PSRClassesInterface.PSRDatabaseSQLite.ScalarParameter{Float64}("curtailment_cost", Float64, missing, false, "DemandUnit", "DemandUnit"), "max_curtailment" => PSRClassesInterface.PSRDatabaseSQLite.ScalarParameter{Float64}("max_curtailment", Float64, missing, false, "DemandUnit", "DemandUnit"), "max_demand" => PSRClassesInterface.PSRDatabaseSQLite.ScalarParameter{Float64}("max_demand", Float64, missing, true, "DemandUnit", "DemandUnit")), OrderedCollections.OrderedDict{String, PSRClassesInterface.PSRDatabaseSQLite.ScalarRelation}("bus_id" => PSRClassesInterface.PSRDatabaseSQLite.ScalarRelation{Int64}("bus_id", Int64, missing, false, "DemandUnit", "Bus", "id", "DemandUnit")), OrderedCollections.OrderedDict{String, PSRClassesInterface.PSRDatabaseSQLite.VectorParameter}(), OrderedCollections.OrderedDict{String, PSRClassesInterface.PSRDatabaseSQLite.VectorRelation}(), OrderedCollections.OrderedDict{String, PSRClassesInterface.PSRDatabaseSQLite.TimeSeries}("existing" => PSRClassesInterface.PSRDatabaseSQLite.TimeSeries{Int64}("existing", Int64, missing, false, "parameters", "DemandUnit", "DemandUnit_time_series_parameters", ["date_time"], 1)), OrderedCollections.OrderedDict{String, PSRClassesInterface.PSRDatabaseSQLite.TimeSeriesFile}("elastic_demand_price" => PSRClassesInterface.PSRDatabaseSQLite.TimeSeriesFile{String}("elastic_demand_price", String, missing, false, "DemandUnit", "DemandUnit_time_series_files"), "demand_window" => PSRClassesInterface.PSRDatabaseSQLite.TimeSeriesFile{String}("demand_window", String, missing, false, "DemandUnit", "DemandUnit_time_series_files"), "demand_ex_ante" => PSRClassesInterface.PSRDatabaseSQLite.TimeSeriesFile{String}("demand_ex_ante", String, missing, false, "DemandUnit", "DemandUnit_time_series_files"), "demand_ex_post" => PSRClassesInterface.PSRDatabaseSQLite.TimeSeriesFile{String}("demand_ex_post", String, missing, false, "DemandUnit", "DemandUnit_time_series_files"))), "Zone" => PSRClassesInterface.PSRDatabaseSQLite.Collection("Zone", OrderedCollections.OrderedDict{String, PSRClassesInterface.PSRDatabaseSQLite.ScalarParameter}("id" => PSRClassesInterface.PSRDatabaseSQLite.ScalarParameter{Int64}("id", Int64, missing, false, "Zone", "Zone"), "label" => PSRClassesInterface.PSRDatabaseSQLite.ScalarParameter{String}("label", String, missing, true, "Zone", "Zone")), OrderedCollections.OrderedDict{String, PSRClassesInterface.PSRDatabaseSQLite.ScalarRelation}(), OrderedCollections.OrderedDict{String, PSRClassesInterface.PSRDatabaseSQLite.VectorParameter}(), OrderedCollections.OrderedDict{String, PSRClassesInterface.PSRDatabaseSQLite.VectorRelation}(), OrderedCollections.OrderedDict{String, PSRClassesInterface.PSRDatabaseSQLite.TimeSeries}(), OrderedCollections.OrderedDict{String, PSRClassesInterface.PSRDatabaseSQLite.TimeSeriesFile}()), "Bus" => PSRClassesInterface.PSRDatabaseSQLite.Collection("Bus", OrderedCollections.OrderedDict{String, PSRClassesInterface.PSRDatabaseSQLite.ScalarParameter}("id" => PSRClassesInterface.PSRDatabaseSQLite.ScalarParameter{Int64}("id", Int64, missing, false, "Bus", "Bus"), "label" => PSRClassesInterface.PSRDatabaseSQLite.ScalarParameter{String}("label", String, missing, true, "Bus", "Bus"), "latitude" => PSRClassesInterface.PSRDatabaseSQLite.ScalarParameter{Float64}("latitude", Float64, missing, false, "Bus", "Bus"), "longitude" => PSRClassesInterface.PSRDatabaseSQLite.ScalarParameter{Float64}("longitude", Float64, missing, false, "Bus", "Bus")), OrderedCollections.OrderedDict{String, PSRClassesInterface.PSRDatabaseSQLite.ScalarRelation}("zone_id" => PSRClassesInterface.PSRDatabaseSQLite.ScalarRelation{Int64}("zone_id", Int64, missing, false, "Bus", "Zone", "id", "Bus")), OrderedCollections.OrderedDict{String, PSRClassesInterface.PSRDatabaseSQLite.VectorParameter}(), OrderedCollections.OrderedDict{String, PSRClassesInterface.PSRDatabaseSQLite.VectorRelation}(), OrderedCollections.OrderedDict{String, PSRClassesInterface.PSRDatabaseSQLite.TimeSeries}(), OrderedCollections.OrderedDict{String, PSRClassesInterface.PSRDatabaseSQLite.TimeSeriesFile}()), "DCLine" => PSRClassesInterface.PSRDatabaseSQLite.Collection("DCLine", OrderedCollections.OrderedDict{String, PSRClassesInterface.PSRDatabaseSQLite.ScalarParameter}("id" => PSRClassesInterface.PSRDatabaseSQLite.ScalarParameter{Int64}("id", Int64, missing, false, "DCLine", "DCLine"), "label" => PSRClassesInterface.PSRDatabaseSQLite.ScalarParameter{String}("label", String, missing, true, "DCLine", "DCLine")), OrderedCollections.OrderedDict{String, PSRClassesInterface.PSRDatabaseSQLite.ScalarRelation}("bus_from" => PSRClassesInterface.PSRDatabaseSQLite.ScalarRelation{Int64}("bus_from", Int64, missing, false, "DCLine", "Bus", "from", "DCLine"), "bus_to" => PSRClassesInterface.PSRDatabaseSQLite.ScalarRelation{Int64}("bus_to", Int64, missing, false, "DCLine", "Bus", "to", "DCLine")), OrderedCollections.OrderedDict{String, PSRClassesInterface.PSRDatabaseSQLite.VectorParameter}(), OrderedCollections.OrderedDict{String, PSRClassesInterface.PSRDatabaseSQLite.VectorRelation}(), OrderedCollections.OrderedDict{String, PSRClassesInterface.PSRDatabaseSQLite.TimeSeries}("existing" => PSRClassesInterface.PSRDatabaseSQLite.TimeSeries{Int64}("existing", Int64, missing, false, "parameters", "DCLine", "DCLine_time_series_parameters", ["date_time"], 1), "capacity_to" => PSRClassesInterface.PSRDatabaseSQLite.TimeSeries{Float64}("capacity_to", Float64, missing, false, "parameters", "DCLine", "DCLine_time_series_parameters", ["date_time"], 1), "capacity_from" => PSRClassesInterface.PSRDatabaseSQLite.TimeSeries{Float64}("capacity_from", Float64, missing, false, "parameters", "DCLine", "DCLine_time_series_parameters", ["date_time"], 1)), OrderedCollections.OrderedDict{String, PSRClassesInterface.PSRDatabaseSQLite.TimeSeriesFile}()), "Branch" => PSRClassesInterface.PSRDatabaseSQLite.Collection("Branch", OrderedCollections.OrderedDict{String, PSRClassesInterface.PSRDatabaseSQLite.ScalarParameter}("id" => PSRClassesInterface.PSRDatabaseSQLite.ScalarParameter{Int64}("id", Int64, missing, false, "Branch", "Branch"), "label" => PSRClassesInterface.PSRDatabaseSQLite.ScalarParameter{String}("label", String, missing, true, "Branch", "Branch"), "line_model" => PSRClassesInterface.PSRDatabaseSQLite.ScalarParameter{Int64}("line_model", Int64, 0, true, "Branch", "Branch")), OrderedCollections.OrderedDict{String, PSRClassesInterface.PSRDatabaseSQLite.ScalarRelation}("bus_from" => PSRClassesInterface.PSRDatabaseSQLite.ScalarRelation{Int64}("bus_from", Int64, missing, false, "Branch", "Bus", "from", "Branch"), "bus_to" => PSRClassesInterface.PSRDatabaseSQLite.ScalarRelation{Int64}("bus_to", Int64, missing, false, "Branch", "Bus", "to", "Branch")), OrderedCollections.OrderedDict{String, PSRClassesInterface.PSRDatabaseSQLite.VectorParameter}(), OrderedCollections.OrderedDict{String, PSRClassesInterface.PSRDatabaseSQLite.VectorRelation}(), OrderedCollections.OrderedDict{String, PSRClassesInterface.PSRDatabaseSQLite.TimeSeries}("existing" => PSRClassesInterface.PSRDatabaseSQLite.TimeSeries{Int64}("existing", Int64, missing, false, "parameters", "Branch", "Branch_time_series_parameters", ["date_time"], 1), "capacity" => PSRClassesInterface.PSRDatabaseSQLite.TimeSeries{Float64}("capacity", Float64, missing, false, "parameters", "Branch", "Branch_time_series_parameters", ["date_time"], 1), "reactance" => PSRClassesInterface.PSRDatabaseSQLite.TimeSeries{Float64}("reactance", Float64, missing, false, "parameters", "Branch", "Branch_time_series_parameters", ["date_time"], 1)), OrderedCollections.OrderedDict{String, PSRClassesInterface.PSRDatabaseSQLite.TimeSeriesFile}())…), false, PSRClassesInterface.PSRDatabaseSQLite.TimeController(Dict{Tuple{String, String}, PSRClassesInterface.PSRDatabaseSQLite.TimeControllerCache}(), Dict{String, Bool}()))
The IARA model is capable of executing 4 dispatch types: (i) ex-ante physical dispatch, (ii) ex-ante commercial dispatch, (iii) ex-post physical dispatch, and (iv) ex-post commercial dispatch. These correspond to procedures that can be executed by system or market operators, depending on the regulatory framework and market design elements adopted, which vary case by case. For more information, click here to access a detailed conceptual description of these dispatch procedures.
Regardless of the regulatory framework that is being represented, all 4 steps must have their corresponding dispatch criterion (or execution mode) defined, which can be: (i) skipped, when we do not want to represent the procedure, (ii) cost-based, when we wish to explictly represent the unit's physical characteristics in the modelling, (iii) bid-based, when the units' parameters and their owners' strategies are translated into price-quantity bids, or (iv) hybrid, when some agents are represented as cost-based, while other are represented as bid-based.
In its default definition, the example case under analysis presents the following characteristics:
Dispatch procedure | Execution mode |
---|---|
Ex-ante physical | Skip |
Ex-ante commercial | Skip |
Ex-post physical | Cost-based |
Ex-post commercial | Skip |
Taking this case as a starting point, in order to modify its clearing characteristics, we can use the function IARA.update_configuration!
to adjust the execution mode of selected dispatch procedures (indicating firstly the variable in which the loaded case is stored). In the example below, we change the execution mode of the ex-ante physical dispatch, from skip to cost-based. This means that we are adding an ex-ante dispatch iteration to the study, which had a single ex-post iteration until this point - maintaining the cost-based nature of the study procedures.
IARA.update_configuration!(
case_edit_clearing;
construction_type_ex_ante_physical = IARA.Configurations_ConstructionType.COST_BASED,
)
Now, the execution mode of each dispatch procedure comprised in the example case is as follows:
Dispatch procedure | Execution mode |
---|---|
Ex-ante physical | Cost-based |
Ex-ante commercial | Skip |
Ex-post physical | Cost-based |
Ex-post commercial | Skip |
Note that this modification means that a whole new set of results will be generated by the model, with the outputs from the ex-ante physical dispatch (alongside the ones from the ex-post physical dispatch, already discussed in the previous tutorials).
When executing this case using the IARA.market_clearing
function) - after closing the database and defining a path for the model to write the execution outputs -, we obtain marginal costs shown below for the ex-ante and ex-post physical dispatches, respectively. In the case of the ex-post dispatch, the results are the same ones shown in the first steps tutorial (which used the boto_base_01
example case in its default configuration), since no changes were made to this market iteration in the present analysis. Comparing these results with the ones obtained for the ex-ante procedure, it is noticeable that the latter presents marginal costs with lower dispersion among scenarios of a same period/subperiod. This is a natural consequence of the greater uncertainty inherent to real-time production and consumption (represented in the ex-post iteration) when contrasted with ex-ante forecasts, which tend to present lower variability.
IARA.close_study!(case_edit_clearing)
path03_edit_clearing = joinpath(case_path, "03_edit_clearing")
IARA.market_clearing(case_path; output_path = path03_edit_clearing);
cmg_name_expost = "load_marginal_cost_ex_post_physical.csv"
cmg_name_exante = "load_marginal_cost_ex_ante_physical.csv"
cmg_path_expost = joinpath(path03_edit_clearing, cmg_name_expost)
cmg_path_exante = joinpath(path03_edit_clearing, cmg_name_exante)
IARA.custom_plot(cmg_path_expost, IARA.PlotTimeSeriesMean)
IARA.custom_plot(cmg_path_exante, IARA.PlotTimeSeriesMean)
The next step of this Getting started
tutorial describes the (heuristic bid pre-processing) applied to dispatches executed in bid-based mode.
This page was generated using Literate.jl.