MPSGE.cost_function
MPSGE.extract_scalars
MPSGE.production_sectors
MPSGE.revenue_function
MPSGE.sectors
MPSGE.sectors
MPSGE.solve!
MPSGE.cost_function
— Methodcost_function(S::ScalarSector; virtual = false)
cost_function(S::ScalarSector, nest::Symbol; virtual = false)
Return a vector of cost functions for the given sector and nest. If nest
is not provided return the cost function for input tree.
nest
is the symbol representing the nest. This can also be the name of a commodity.
If virtual
is true, return the virtual cost functions.
MPSGE.extract_scalars
— Methodextract_scalars
Takes a variable and extracts it the sub-variables.
MPSGE.production_sectors
— Methodproduction_sectors(m::MPSGEModel)
Return all sectors that have a corresponding production block. These are coming from a dictionary, so order is not guaranteed.
This is primarily used when generating constraints.
MPSGE.revenue_function
— Methodrevenue_function(S::ScalarSector; virtual = false)
revenue_function(S::ScalarSector, nest::Symbol; virtual = false)
Return a vector of revenue functions for the given sector and nest. If nest
is not provided return the revenue function for input tree.
nest
is the symbol representing the nest. This can also be the name of a commodity.
If virtual
is true, return the virtual revenue functions.
MPSGE.sectors
— Methodsectors(C::Commodity)
Return only the sectors that have the input commodity in their production block.
This is an optimization in building the model as the structure is very sparse iterating over all sectors is expensive.
MPSGE.sectors
— Methodsectors(m::MPSGEModel)
Return all sectors in a model
MPSGE.solve!
— Methodsolve!(m::abstract_mpsge_model; keywords)
Function to solve the model. Triggers the build if the model hasn't been built yet.
Example
julia> solve!(m, cumulative_iteration_limit=0)