Api

OptimalBids

OptimalBids.build_marketMethod
build_market(::Type{Market}, params...) -> Market

Builds market of type Market using provided parameters (params).

source
OptimalBids.calculate_profitMethod
calculate_profit(market::Market) -> NamedTuple{(:cleared_volumes, :clearing_prices, :profit), Tuple{Vector{Int}, Vector{Int}, Vector{Int}}}

Retrieves strategic agent's cleared volumes and prices from the market and calculates per bid profit.

source
OptimalBids.profit_curve!Method
profit_curve!(market::Market, range_new_bids::Vector{Vector{Any}}) -> Vector{Float64}

Constructs profit curve for bids provided in range_new_bids.

source
OptimalBids.profit_for_bid!Method
profit_for_bid!(market::Market, new_bids::Vector{Any}) -> Float64

Calculates overall profit when market is cleared with new_bids. This function will sequentiall call change_bids!, clear_market! and calculate_profit.

source

PowerModelsMarkets

OptimalBids.PowerModelsMarkets.PowerModelsMarketType

PowerModelsMarket <: OptimalBids.Market

Energy-Market type that uses PowerModels' OPF to clear the auction.

Arguments:

  • network_data::Dict: PowerModels data structure.
  • strategic_generators::Vector{NamedTuple{(:gen_index, :bus_index),Tuple{String,String}}}: Vector of strategic generators' indexes and their bus indexes.
  • result::Union{Dict,Missing}: Market clearing result.
  • market_formulation: Network formulation used in the PowerModels' auction clearing process (i.e. OPF).
  • opf_builder: PowerModels opf builder.
  • solver: JuMP optimization solver that should be able to solve the OPF created based on the passed market_formulation.
source
OptimalBids.build_marketMethod

OptimalBids.buildmarket( ::Type{PowerModelsMarket}, networkdata, strategicgenerators, solver; marketformulation=DCPPowerModel, opfbuilder=PowerModels.buildopf, assert_consistency=true, )

Creates Energy-Market of type PowerModelsMarket.

Arguments:

  • network_data::Dict: PowerModels data structure.
  • strategic_generators::Vector{NamedTuple{(:gen_index, :bus_index),Tuple{String,String}}}: Vector of strategic generators' indexes and their bus indexes.
  • result::Union{Dict,Missing}: Market clearing result.
  • market_formulation: Network formulation used in the PowerModels' auction clearing process (i.e. OPF).
  • opf_builder: PowerModels opf builder.
  • solver: JuMP optimization solver that should be able to solve the OPF created based on the passed market_formulation.
  • assert_consistency=true: Boolean to force check if strategic generators indexes (in strategic_generators) reference generators located at the specified bus_index.
source
OptimalBids.build_marketMethod

OptimalBids.buildmarket( market::Type{PowerModelsMarket}, networkdata::Dict, genindexes::AbstractVector{String}, busindexes::AbstractVector{String}, solver; marketformulation=DCPPowerModel, opfbuilder=PowerModels.build_opf, kwards..., )

Creates Energy-Market of type PowerModelsMarket.

Arguments:

  • network_data::Dict: PowerModels data structure.
  • gen_indexes::AbstractVector{String}: Vector of strategic generators' indexes.
  • bus_indexes::AbstractVector{String}: Vector of strategic generators' bus indexes.
  • result::Union{Dict,Missing}: Market clearing result.
  • market_formulation: Network formulation used in the PowerModels' auction clearing process (i.e. OPF).
  • opf_builder: PowerModels opf builder.
  • solver: JuMP optimization solver that should be able to solve the OPF created based on the passed market_formulation.
source
OptimalBids.build_marketMethod

OptimalBids.buildmarket( market::Type{PowerModelsMarket}, networkdata::Dict, genindexes::AbstractVector{String}, solver; marketformulation=DCPPowerModel, opfbuilder=PowerModels.buildopf, )

Creates Energy-Market of type PowerModelsMarket.

Arguments:

  • network_data::Dict: PowerModels data structure.
  • gen_indexes::AbstractVector{String}: Vector of strategic generators' indexes.
  • result::Union{Dict,Missing}: Market clearing result.
  • market_formulation: Network formulation used in the PowerModels' auction clearing process (i.e. OPF).
  • opf_builder: PowerModels opf builder.
  • solver: JuMP optimization solver that should be able to solve the OPF created based on the passed market_formulation.
source