Min activation Bid - Building
The data for this case is available in the folder
data/case_4
We'll start by importing the necessary packages.
using Dates
using Quiver
using DataFrames
using IARA
In this tutorial, we will start with the Case 3 elements and create a case with a minimum activation level for a Bidding Group.
Original Case Recap
In the original case we had two Bidding Groups, one with a multi-hour bid and the other with an independent bid. Running the MARKET_CLEARING
mode, we analyzed the effect of the multi-hour bid in the market.
Changes for this tutorial
In this tutorial, we will add a minimum activation level for the Bidding Group with the multi-hour bid.
Loading case
Now let's copy the base case to a new folder and load it.
const PATH_ORIGINAL = joinpath(@__DIR__, "data", "case_3")
const PATH_MIN_ACTIVATION = joinpath(@__DIR__, "data", "case_4")
if !isdir(PATH_MIN_ACTIVATION)
mkdir(PATH_MIN_ACTIVATION)
end
cp(
joinpath(PATH_ORIGINAL, "study.iara"),
joinpath(PATH_MIN_ACTIVATION, "study.iara");
force = true,
)
db = IARA.load_study(PATH_MIN_ACTIVATION; read_only = false);
PSRClassesInterface.PSRDatabaseSQLite.DatabaseSQLite(SQLite.DB("/home/runner/work/IARA.jl/IARA.jl/docs/build/tutorial/data/case_4/study.iara"), "/home/runner/work/IARA.jl/IARA.jl/docs/build/tutorial/data/case_4/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"), "period_type" => PSRClassesInterface.PSRDatabaseSQLite.ScalarParameter{Int64}("period_type", Int64, 0, true, "Configuration", "Configuration"), "hydro_balance_subperiod_resolution" => PSRClassesInterface.PSRDatabaseSQLite.ScalarParameter{Int64}("hydro_balance_subperiod_resolution", Int64, 0, false, "Configuration", "Configuration"), "use_binary_variables" => PSRClassesInterface.PSRDatabaseSQLite.ScalarParameter{Int64}("use_binary_variables", Int64, 0, true, "Configuration", "Configuration"), "loop_subperiods_for_thermal_constraints" => PSRClassesInterface.PSRDatabaseSQLite.ScalarParameter{Int64}("loop_subperiods_for_thermal_constraints", Int64, missing, false, "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" => PSRClassesInterface.PSRDatabaseSQLite.TimeSeriesFile{String}("generation", String, missing, true, "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" => PSRClassesInterface.PSRDatabaseSQLite.TimeSeriesFile{String}("inflow", String, missing, true, "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")), 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}("demand" => PSRClassesInterface.PSRDatabaseSQLite.TimeSeriesFile{String}("demand", String, missing, true, "DemandUnit", "DemandUnit_time_series_files"), "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"))), "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")), 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}()))
Minimum Activation Level Time series
In the data/case_4
folder, we have a time series files for the minimum activation level for the Bidding Group with the multi-hour bid. Let's take a quick look at the file and load it into the database.
IARA.time_series_dataframe(
joinpath(PATH_MIN_ACTIVATION, "minimum_activation_level_profile.csv"),
)
Row | period | scenario | profile | bg_1 | bg_2 |
---|---|---|---|---|---|
Int64 | Int64 | Int64 | Float32 | Float32 | |
1 | 1 | 1 | 1 | 0.5 | 0.0 |
IARA.time_series_dataframe(
joinpath(PATH_MIN_ACTIVATION, "parent_profile.csv"),
)
Row | period | profile | bg_1 | bg_2 |
---|---|---|---|---|
Int64 | Int64 | Float32 | Float32 | |
1 | 1 | 1 | 0.0 | 0.0 |
IARA.time_series_dataframe(
joinpath(PATH_MIN_ACTIVATION, "complementary_grouping_profile.csv"),
)
Row | period | profile | complementary_group | bg_1 | bg_2 |
---|---|---|---|---|---|
Int64 | Int64 | Int64 | Float32 | Float32 | |
1 | 1 | 1 | 1 | 0.0 | 0.0 |
IARA.link_time_series_to_file(
db,
"BiddingGroup";
minimum_activation_level_profile = "minimum_activation_level_profile",
parent_profile = "parent_profile",
complementary_grouping_profile = "complementary_grouping_profile",
)
Closing the case
IARA.close_study!(db)
This page was generated using Literate.jl.