reenact.reenact.hooks#
Module to apply hooks on oemof simulation.
model_co2_cost(scenario, data, model)
#
Hook to add CO2 emissions to objective function.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
scenario
|
The oemof scenario name. |
required | |
data
|
Scenario data. |
required | |
model
|
The oemof solph model. |
required |
Returns:
| Type | Description |
|---|---|
|
oemof.solph.Model: The model with updated objective function. |
model_co2_limit(scenario, data, model)
#
Hook to limit CO2 emissions via constraint.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
scenario
|
The oemof scenario name. |
required | |
data
|
Scenario data. |
required | |
model
|
The oemof solph model. |
required |
Returns:
| Type | Description |
|---|---|
|
oemof.solph.Model: The model with added emission constraint. |
model_co2_tracking(scenario, data, model)
#
Hook to track CO2 emissions of components.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
scenario
|
The oemof scenario name. |
required | |
data
|
Scenario data. |
required | |
model
|
The oemof solph model. |
required |
Returns:
| Type | Description |
|---|---|
|
oemof.solph.Model: The model with added emission expressions. |
model_prod_goal(scenario, data, model)
#
Hook to add production goal constraint.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
scenario
|
The oemof scenario name. |
required | |
data
|
Scenario data. |
required | |
model
|
The oemof solph model. |
required |
Returns:
| Type | Description |
|---|---|
|
oemof.solph.Model: The model with added production goal constraint. |
set_up_oemof_components_from_user_input(scenario, data)
#
Set up capacities for volatiles, potentials and load demand amounts from user inputs.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
scenario
|
str
|
The name of the oemof scenario. |
required |
data
|
dict
|
Dictionary containing user input data. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
dict |
A dictionary of parameters for the oemof simulation. |
Raises:
| Type | Description |
|---|---|
RuntimeError
|
If the capacity form is not valid. |
store_emission(scenario, data, meta, model)
#
Hook to store emission results in simulation at DB as metadata.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
scenario
|
str
|
The oemof scenario name. |
required |
data
|
Scenario data. |
required | |
meta
|
Metadata dictionary. |
required | |
model
|
The oemof solph model. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
dict |
Updated metadata dictionary. |