Skip Ribbon Commands
Skip to main content

Quick Launch

Consumer Lambda

INPUTS
Current Price curr_price - $
Maximum Demand Per Capita max_demand_per_capita - MWh

Minimum Demand Per Capita min_demand_per_capaita - MWh

Population population - People

OUTPUTS
Demand demand - MWh

LAMBDA
// TODO - Using demand curve, determine energy demand given price.
max_demand = population * max_demand_per_capita

min_demand = population * min_demand_per_capt

total_width = abs(max_demand - min_demand)

ds_above = total_width * .05

ds_below = total_width * .05

dte = total_width

Then, using the following demand curve as a function of demand for price:

P(d) = P0*(1+e^-((d-d_min)/ds))/(1+e^((d-d_max)/ds))*e^-((d-d_mid)/dwe)   ​(NOTE: For details and explanation see Demand Curves.)

The lambda, ​does a binary search on the curve for the demand at which the above function equals the current price.