Fuel Price
E4ST.FuelPrice
— TypeFuelPrice(;file, fp_scalar=1e3) <: Modification
FuelPrice is a Modification
allowing users to specify fuel prices for different fuels by region. If multiple steps and quantities are given, the fuel price for a given region will be computed endogenously.
modify_raw_data!(mod::FuelPrice, config, data)
modify_setup_data!(mod::FuelPrice, config, data)
modify_model!(mod::FuelPrice, config, data, model)
modify_results!(mod::FuelPrice, config, data)
To adjust price by hour or year, see AdjustHourly
or AdjustYearly
.
Fields
file
- file path to the table of fuel steps. See [summarize_table(::Val{:fuel_price})
]@(ref)fp_scalar = 1e3
- aFloat64
for how much to scale the fuel price variables by. This helps with numerical instability, given that some fuel steps can be very large and could bloat the RHS and bounds range of the model. The default value of 1e3, for example, means that the quantity variables will all be in terms of thousands of MMBtu rather than MMBtu.
E4ST.modify_raw_data!
— Methodmodify_raw_data!(mod::FuelPrice, config, data)
Read table from mod.file
into data[:fuel_price]
E4ST.modify_setup_data!
— Methodmodify_setup_data!(mod::FuelPrice, config, data)
Zero out the fuel_price
column of the gen
table, as it will get overwritten later by this Modification. This is to avoid double-counting the fuel cost.
E4ST.modify_model!
— Methodmodify_model!(mod::FuelPrice, config, data, model)
- Make
data[:fuel_markets]
to keep track of each of the fuel markets - Add variable
fuel_sold[fuel_price_idx, yr_idx, hr_idx]
: total fuel sold at each price step for each time interval - Add expression
fuel_used[fuel_market_idx, yr_idx, hr_idx]
: total fuel used by generators for each market region for each time interval - Add expression
fuel_price_obj[fuel_market_idx, yr_idx, hr_idx]
: total cost of the fuel, added to the objective. - Add constraint
cons_fuel_sold[fuel_price_idx, yr_idx]
: constrain the totalfuel_sold
in each year to be ≤ yearly quantity - Add constraint
cons_fuel_bal[fuel_market_idx, yr_idx, hr_idx]
: constrain the amount of fuel sold in each market region to equal the amount of fuel used in each market region.
fuel_sold
and fuel_used
will be scaled down using the fp_scalar to reduce the difference in size between the variables used together in these constraints. This prevents issues with shadow prices which can sometimes be rounded to 0 when the objective scalar is high.
E4ST.modify_results!
— Methodmodify_results!(mod::FuelPrice, config, data)
- Calculate the clearing price for each market region for each fuel type.
- Equal to the shadow price of
cons_fuel_sold
for the cheapest fuel price step in the region plus the cheapest fuel price - Add it to
fuel_markets.clearing_price
column - Update
gen.fuel_price
column to use the clearing price (multiplied by theheat_rate
column)
- Equal to the shadow price of
E4ST.summarize_table
— Methodsummarize_table(::Val{:fuel_price})
column_name | data_type | unit | required | description |
---|---|---|---|---|
genfuel | String | E4ST.NA | true | The type of fuel that the price applies for. i.e. ng or coal |
area | String | E4ST.NA | true | The area that the price applies for i.e. nation . Leave blank if grid-wide |
subarea | String | E4ST.NA | true | The subarea that the price applies for i.e. narnia . Leave blank if grid-wide |
filter_ | String | E4ST.NA | false | I.e. filter1 , filter2 , etc. Other filter conditions that the price applies for, see parse_comparison for ideas |
price | Float64 | E4ST.DollarsPerMMBtu | true | The price of 1 MMBtu of fuel |
quantity | Float64 | E4ST.MMBtu | true | The number of MMBtu of the fuel available at the price in each year. Set to Inf for unlimited. |