pommes.tests.test_visualisation
The plots of pommes.visualisation on the test case (#154).
They read a saved solution, through the summaries of generate_summary_dataframes_from_results. Nothing ran them: all three failed on examples/test_case, as the plots.ipynb notebook calls them.
Attributes
Functions
|
The test case solved and saved, as plots.ipynb does. |
|
|
The test case, its hydrogen producers capped: hydrogen is shed. |
|
The shedding item is operation_load_shedding_costs over production. |
|
EUR/MWh to EUR/kg and back; the inverse was off by a factor 1e6. |
|
Doubling the weight of every year doubles the duals, not the prices. |
|
|
Height of each stack of bars, from left to right. |
|
The bars add up to the annual production, in TWh. |
A scalar operation_year_duration, a storage_main_resource by area. |
Module Contents
- pommes.tests.test_visualisation.matplotlib
- pommes.tests.test_visualisation.saved(parameters, tmp_path_factory)
The test case solved and saved, as plots.ipynb does.
- pommes.tests.test_visualisation.test_the_three_plots_run_on_the_test_case(saved, resource, plot_choice, areas, years)
- pommes.tests.test_visualisation._shedding_hydrogen(p)
The test case, its hydrogen producers capped: hydrogen is shed.
Only hydrogen may be shed, at a cost (it is free in the test case), so the model’s own shedding cost, operation_load_shedding_costs, is that of hydrogen.
- pommes.tests.test_visualisation.test_load_shedding_is_its_annual_cost_per_mwh_produced(parameters, with_conditions)
The shedding item is operation_load_shedding_costs over production.
It was the shed energy summed over the modelled steps times its cost: without operation_year_normalization, which the cost variable has, and indexed by condition, which broke the frame it was written into.
- pommes.tests.test_visualisation.test_the_hydrogen_axis_converts_both_ways()
EUR/MWh to EUR/kg and back; the inverse was off by a factor 1e6.
- pommes.tests.test_visualisation.test_the_marginal_cost_reads_the_duals_as_prices(parameters)
Doubling the weight of every year doubles the duals, not the prices.
The whole objective doubles, the optimum is the same, and so is the cost of the other resources the conversions consume. Read raw, the duals doubled it.
- pommes.tests.test_visualisation._bar_totals(figure)
Height of each stack of bars, from left to right.
- pommes.tests.test_visualisation.test_the_annual_energy_is_the_production_of_the_year_in_twh(saved)
The bars add up to the annual production, in TWh.
The energy was multiplied by 1e6 instead of divided, and summed over the modelled steps only.
- pommes.tests.test_visualisation.test_the_plots_take_the_parameters_the_schema_allows(parameters, tmp_path)
A scalar operation_year_duration, a storage_main_resource by area.
The first is what check_inputs writes when the parameter is absent; the second is declared over [area, storage_tech].