Examples

Plotting the basics

TulipaPlots.jl has three functions for basic plotting: a time-series flows, a visualisation of the graph (with asset and flow capacities), and a bar graph of the initial and invested asset capacities. We show an example for plotting using the solution from the Norse case in TulipaEnergyModel.jl.

First obtain the solution:

using TulipaEnergyModel
using TulipaPlots

# input_dir should be the path to Norse
energy_problem = run_scenario(dir)
EnergyProblem:
  - Time for reading the data (in seconds): 7.35645569
  - Model created!
    - Time for creating the model (in seconds): 4.1010233
    - Number of variables: 5792
    - Number of constraints for variable bounds: 5216
    - Number of structual constraints: 7804
  - Model solved! 
    - Time for solving the model (in seconds): 15.209939272
    - Termination status: OPTIMAL
    - Objective value: 1.9848306581163836e8

Plot a single flow for a single representative period:

TulipaPlots.plot_single_flow(energy_problem, "Asgard_Solar", "Asgard_E_demand", 1)
Example block output

Plot the graph, with asset and flow capacities:

TulipaPlots.plot_graph(energy_problem)
Example block output

Graph the final capacities of assets:

TulipaPlots.plot_assets_capacity(energy_problem)
Example block output

Plotting the storage levels

TulipaPlots.jl has two functions for plotting the storage levels.

Plot the inter storage level:

TulipaPlots.plot_storage_level_inter(energy_problem)
Example block output

Plot the intra storage level:

TulipaPlots.plot_storage_level_intra(energy_problem)
Example block output

If you would like more custom plots, explore the code of plot for ideas.