reenact.reenact.results.boxes#
get_result_boxes_from_oemof_simulation(simulation_id)
#
Retrieves the result boxes from an oemof simulation based on the provided simulation ID.
This function fetches a specific simulation using its unique ID, restores its dataset results, and processes multiple post-simulation assessments. These include checking the production goal achievement, calculating CO2 emissions and costs, determining the electricity price, assessing investment needs, and evaluating revenues from electricity and hydrogen exports.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
simulation_id
|
int
|
The unique ID for the specific simulation to fetch results for. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict
|
Holding results for climate, CO2 emissions, cost, and revenue. |
get_result_boxes_from_scenario_data(scenario_data)
#
Extracts and processes result boxes from the given scenario data.
This function retrieves the "boxes" data from the provided scenario dictionary, processes each box to format specific fields, and returns a list of the modified boxes. Fields such as "value1", "value2", and "slider" are transformed using the respective helper functions to ensure consistency or apply specific formatting.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
scenario_data
|
dict
|
A dictionary containing the scenario data, which should include the "boxes" key for processing. |
required |
Returns:
| Type | Description |
|---|---|
dict[str, float | int | bool]
|
dict[str, float | int | bool]: A dictionary representing the processed boxes. |
set_slider(slider)
#
Calculate slider position.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
slider
|
Raw slider value. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
float |
Calculated slider position. |
thousand_dot(value)
#
Format a number with thousand dots.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
The value to format. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
str |
Formatted string with thousand dots. |