Recommended: run this notebook in Google Colab, nothing to install.

Open In Colab

The notebook opens with the results of an earlier run. To start from a clean notebook, choose Edit → Clear all outputs in Colab’s menu first.

Click the ▶ button on each cell (or press Shift+Enter) to see the results and move on to the next one.

If you can’t or don’t want to use Colab, the documentation website shows the pre-run results.

Session 1: Run a simple case#

Disclaimer

Navigate is an open-source analytical model intended for research and scenario analysis of maritime decarbonisation pathways. The model, its assumptions and any outputs are provided for illustrative and analytical purposes only.

Model outputs depend on the assumptions selected by the user and should not be interpreted as forecasts, benchmarks, recommendations or commercially optimal outcomes, nor as legal, financial or investment advice.

Users are responsible for selecting and adapting assumptions appropriate to their own circumstances and for exercising their own independent judgement when interpreting or relying on any model outputs.

Keep in mind that some of the data have been completely invented for the purpose of this exercise (so please do not create your own trade route based on this example).

We look at how Navigate would model the decisions of the shipowners and operators serving a line between San Antonio and Rotterdam, in a world moving towards decarbonisation: green fuels are starting to be produced at scale, technology options for engines and retrofits are available, and regulations incentivising the use of green fuels are in place.

The case#

Map of the Chile to Rotterdam copper trade: the two bunker ports, a fleet of ships on the voyage via the Panama Canal, and the fuel production sites in Patagonia and southern Sweden, both of which make e-methanol and e-ammonia, with bio-methanol in Sweden as well

San Antonio to Rotterdam via the Panama Canal: the two bunker ports, the voyage, and the possible fuel plants.

The case follows the Panamax bulk carriers (~80,000 DWT) that carry copper concentrate from San Antonio, Chile to Rotterdam, roughly 7,600 nautical miles each way via the Panama Canal, returning in ballast (empty).

It is 2026: the segment has 300 ships, and nearly all of them burn fuel oil. The ships are ageing and most of them have to be renewed before 2050, the horizon of the simulation.

The ships are also exposed to two regulations: FuelEU Maritime and the EU ETS, both of which cover half of the voyage.

Navigate does not follow one specific company. It represents the whole segment as a single Fleet (bulk_carrier_80k_dwt, from Navigate’s assumptions library), whose decisions stand for those of the many shipowners and operators in it. Operators decide which fuel to bunker and where, and how fast to sail. Owners decide when to retrofit ships, order new ones and fit efficiency measures.

Four ship designs are available on the market:

Configuration

Engine type

bulk_carrier_80k_dwt_ice_oil

conventional fuel oil

bulk_carrier_80k_dwt_ice_methane

dual-fuel LNG

bulk_carrier_80k_dwt_ice_methanol

dual-fuel methanol

bulk_carrier_80k_dwt_ice_ammonia

dual-fuel ammonia

On the other side, we follow the behaviour of two groups of fuel producers: producers of e-fuels (e-ammonia or e-methanol) and producers of biofuel (bio-methanol). The e-fuel plants can be installed in Chile or in Europe, the biofuel plants only in Europe (to simplify the case).

What you’ll do#

Run the case. Solve it once, from 2026 to 2050.

Read the results. The fleet’s emissions, what moving the cargo costs, and the fuel bunkered.

Local sensitivity analysis. Change some of the input parameters, one scenario at a time, and see what happens.

Global sensitivity analysis. Let Horizon vary several input parameters at once, and see the range of results.

How the deck is built and the data behind it are the subject of Session 3.

STEP 1: Setup#

Run the cell below on Colab or locally. It sets up the Navigate model, loads the pre-made example that will be used to illustrate this part of the workshop, and defines two helpers for the notebook: one shows Lantern’s plots in it, the other opens Lantern’s viewer. Its code is hidden: on your own machine, show it and set ROOT to a folder of your own first.

Hide code cell source

# @title Install Navigate and its tools, and set up the session
ROOT = "/content"
# ROOT = "/tmp/notebook"  # running locally: any folder of your own, without spaces in its path
%cd {ROOT}

!git clone -q --depth 1 -b main https://github.com/zerocarbonshipping/navigate-zcs {ROOT}/navigate-zcs
%pip install -q {ROOT}/navigate-zcs horizon-zcs lantern-zcs
%env ASSUMPTIONS_DATA_DIR={ROOT}/navigate-zcs/assumptions

import shutil

shutil.copytree(f"{ROOT}/navigate-zcs/docs/notebooks/notebook_1/copper_trade", f"{ROOT}/copper_trade", dirs_exist_ok=True)
%cd {ROOT}/copper_trade

# notebook helpers: show the pages Lantern writes in the notebook, and open Lantern's viewer
import html
import subprocess
from pathlib import Path

from IPython.display import HTML, display

# STEP 3's scenarios: their names in the order they were run, which its plots compare, and the
# folder their results go to, which Lantern's viewer loads again on Refresh
scenarios = []
Path("parquets").mkdir(exist_ok=True)

def show(*pages):
    # the pages side by side, each in a frame of its own
    frames = ""
    for page in pages:
        with open(page, encoding="utf-8") as file:
            frames += f'<iframe srcdoc="{html.escape(file.read())}" style="flex: 1 1 320px; height: 360px; border: 0"></iframe>'
    display(HTML(f'<div style="display: flex; flex-wrap: wrap">{frames}</div>'))

def open_viewer(*paths):
    # Lantern's viewer of the paths, as `lantern PATH ...` opens it, in the background; started from ROOT,
    # it shows Lantern's own plots rather than this case's plots.yaml, and its messages go nowhere
    subprocess.Popen(["lantern", *(str(Path(path).resolve()) for path in paths)], cwd=ROOT,
                     stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
    try:
        from google.colab import output
        output.serve_kernel_port_as_window(8050, anchor_text="Click here to see more plots")
    except ImportError:  # on your own machine Lantern opens the viewer in your browser
        pass

STEP 2: Run the case and see the results#

Run the next cell. It solves the case from 2026 to 2050, in a few seconds, then draws the results with Lantern, our tool for plotting Navigate’s results. Hover over a plot to read its values, or drag to zoom. The results that we are plotting for this example are:

  • the fleet’s well-to-wake emissions over time;

  • what the ships paid per tonne-km each year, by part: their charter, efficiency technology, fuel conversions, fuel, levies and compliance, given the fuel prices and compliance bills that materialised;

  • the fuel consumed each year, by fuel. A dual-fuel ship that burns oil counts as oil here.

# solve the case; every result of the run goes to example_4.parquet
!navigate example_4.nav

# draw three plots from it with Lantern, as HTML pages in plots/ at 0.8 times their size, and show them
!lantern example_4.parquet --scale 0.8 --plot session_emissions --plot session_expenses --plot session_fuel_consumed
show("plots/example_4/session_emissions.html",
     "plots/example_4/session_expenses.html",
     "plots/example_4/session_fuel_consumed.html")

# and every plot Lantern can draw, in its viewer; its Refresh button adds the scenarios of STEP 3
open_viewer("example_4.parquet", "parquets")
——————————————————————————————————————————————————————————————————————————————————————————————————
            |    |    |                                  .oO
           )_)  )_)  )_)                             __/___                  _    _
          )___))___))___)\                     _____/______|              __|_|__|_|__
         )____)____)_____)\\           _______/_____\_______\_____      _|____________|__
       _____|____|____|____\\\__       \              < < <       |    |o o o o o o o o /
~~~~~~~\                   /~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        ´´´´´´´´´´´´´´´´´´´              Navigate
——————————————————————————————————————————————————————————————————————————————————————————————————
        Navigate - an integrated assessment model for decarbonizing shipping
        Developed by Fonden Mærsk Mc-Kinney Møller Center for Zero Carbon Shipping
        Version 1.1.0 - for questions, contact navigate@zerocarbonshipping.com
Running HiGHS 1.16.0 (git hash: f3f113d): Copyright (c) 2026 under MIT licence terms
Includes third-party software components, see THIRD_PARTY_NOTICES.md for full details
Date: 2026-01-01
Date: 2027-01-01
Date: 2028-01-01
Date: 2029-01-01
Date: 2030-01-01
Date: 2031-01-01
Date: 2032-01-01
Date: 2033-01-01
Date: 2034-01-01
Date: 2035-01-01
Date: 2036-01-01
Date: 2037-01-01
Date: 2038-01-01
Date: 2039-01-01
Date: 2040-01-01
Date: 2041-01-01
Date: 2042-01-01
Date: 2043-01-01
Date: 2044-01-01
Date: 2045-01-01
Date: 2046-01-01
Date: 2047-01-01
Date: 2048-01-01
Date: 2049-01-01
Date: 2050-01-01
Finished simulation, elapsed time: 0m and 5s.
Plots from /tmp/notebook/copper_trade/plots.yaml
Loaded example_4: 1 run(s), 4 of 4 plots with data
Plotting: 100%|████████████████████████████████| 3/3 [00:00<00:00, 20.23plot/s]
Wrote 3 plots to plots
plots/example_4/session_emissions.html
plots/example_4/session_expenses.html
plots/example_4/session_fuel_consumed.html

STEP 3: Local sensitivity analysis#

Pick a name for your scenario and change some of the default input parameter values to see how the results respond.

All the parameters that we prepared can be changed with multipliers, except four that can be used as switches:

  • EU_RULES_WHOLE_VOYAGE puts San Antonio inside both regulatory schemes.

  • FREEZE_EFFICIENCY stops anything further from being fitted, on newbuilds as well as on retrofits.

  • NO_FUELEU takes FuelEU out and keeps EU ETS, to see what FuelEU adds. The FuelEU levers then have no effect.

  • NO_EU_ETS takes EU ETS out and keeps FuelEU, to see what EU ETS adds. EU_ETS_PRICE then has no effect.

The plots compare your scenarios with the reference: the freight rate as one total line per scenario, rather than by part as in STEP 2, and the fuel consumed in a panel per scenario.

GAME: Find out which scenario (realistic?) leads to the lowest emissions and transport costs by 2050.

# YOUR SCENARIO: set the levers below, then run this cell
SCENARIO = "your_scenario"  # a new name, without spaces, adds a scenario to the plots
RESET = False               # True: compare this scenario alone with the reference

# Each --set fills the placeholder of that name in the deck. Each number is a multiplier on what
# the deck already says, so 1.0 is the reference; OIL_PRICE = 2.0 doubles the fuel oil price.
#                                  suggested span  what 1.0 means in the deck
OIL_PRICE = 2.0                  # 0.7 - 2.0       485 USD/t, flat to 2050
LNG_PRICE = 1.0                  # 0.7 - 1.6       436 USD/t, flat to 2050
EU_ETS_PRICE = 1.0               # 0.5 - 3.0       126 USD/t in 2026, 417 by 2050
FUELEU_TARGET = 1.0              # 0.3 - 1.2       89.3 gCO2eq/MJ in 2026, 18.2 by 2050; under 1.0 is STRICTER
FUELEU_PENALTY = 1.0             # 1.0 - 5.0       760 USD/t of excess emission, flat
CHILE_ELECTRICITY_PRICE = 1.0    # 0.6 - 1.4       62 USD/MWh in 2026, 41 by 2050
EUROPE_ELECTRICITY_PRICE = 1.0   # 0.6 - 1.4       72 USD/MWh in 2026, 53 by 2050
BIOMASS_AVAILABILITY = 1.0       # 0.1 - 10.0      1,152 Mt/yr pool in 2026, 1,361 by 2050; this ceiling BINDS
BIOGENIC_CO2_AVAILABILITY = 1.0  # 0.5 - 2.0       92 Mt/yr pool, flat to 2050; binds from 2049
TRADE_GROWTH = 1.0               # 0.0 - 2.0       2.2 %/yr in 2026, 1.4-1.5 %/yr from 2030;
#                                                  0.0 holds trade at its 2026 volume, -1.0 shrinks it as fast as it grew

# the four switches: 0 or 1
EU_RULES_WHOLE_VOYAGE = 0        # 1 = San Antonio inside both schemes
FREEZE_EFFICIENCY = 0            # 1 = nothing further gets fitted, newbuild or retrofit
NO_FUELEU = 0                    # 1 = FuelEU taken out; EU ETS stays
NO_EU_ETS = 0                    # 1 = EU ETS taken out; FuelEU stays

# solve your scenario; the results go to parquets/<SCENARIO>.parquet
!navigate example_4.unc --name {SCENARIO} \
    --set OIL_PRICE={OIL_PRICE} \
    --set LNG_PRICE={LNG_PRICE} \
    --set EU_ETS_PRICE={EU_ETS_PRICE} \
    --set FUELEU_TARGET={FUELEU_TARGET} \
    --set FUELEU_PENALTY={FUELEU_PENALTY} \
    --set CHILE_ELECTRICITY_PRICE={CHILE_ELECTRICITY_PRICE} \
    --set EUROPE_ELECTRICITY_PRICE={EUROPE_ELECTRICITY_PRICE} \
    --set BIOMASS_AVAILABILITY={BIOMASS_AVAILABILITY} \
    --set BIOGENIC_CO2_AVAILABILITY={BIOGENIC_CO2_AVAILABILITY} \
    --set TRADE_GROWTH={TRADE_GROWTH} \
    --set EU_RULES_WHOLE_VOYAGE={EU_RULES_WHOLE_VOYAGE} \
    --set FREEZE_EFFICIENCY={FREEZE_EFFICIENCY} \
    --set NO_FUELEU={NO_FUELEU} \
    --set NO_EU_ETS={NO_EU_ETS}

# draw your scenarios so far against the reference, and show the plots;
# Refresh in Lantern's viewer adds them there too
if RESET:
    scenarios.clear()
if SCENARIO not in scenarios:
    scenarios.append(SCENARIO)
runs = ",".join(["example_4", *scenarios])
!lantern example_4.parquet parquets --scale 0.8 \
    --plot "session_emissions[{runs}]" \
    --plot "session_expenses_total[{runs}]" \
    --plot "session_fuel_consumed[{runs}]"

pages = "+".join(["example_4", *scenarios])
show(f"plots/session_emissions/{pages}.html", f"plots/session_expenses_total/{pages}.html")
show(f"plots/session_fuel_consumed/{pages}.html")  # a panel per scenario, so a row of its own
——————————————————————————————————————————————————————————————————————————————————————————————————
            |    |    |                                  .oO
           )_)  )_)  )_)                             __/___                  _    _
          )___))___))___)\                     _____/______|              __|_|__|_|__
         )____)____)_____)\\           _______/_____\_______\_____      _|____________|__
       _____|____|____|____\\\__       \              < < <       |    |o o o o o o o o /
~~~~~~~\                   /~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        ´´´´´´´´´´´´´´´´´´´              Navigate
——————————————————————————————————————————————————————————————————————————————————————————————————
        Navigate - an integrated assessment model for decarbonizing shipping
        Developed by Fonden Mærsk Mc-Kinney Møller Center for Zero Carbon Shipping
        Version 1.1.0 - for questions, contact navigate@zerocarbonshipping.com
Running HiGHS 1.16.0 (git hash: f3f113d): Copyright (c) 2026 under MIT licence terms
Includes third-party software components, see THIRD_PARTY_NOTICES.md for full details
Date: 2026-01-01
Date: 2027-01-01
Date: 2028-01-01
Date: 2029-01-01
Date: 2030-01-01
Date: 2031-01-01
Date: 2032-01-01
Date: 2033-01-01
Date: 2034-01-01
Date: 2035-01-01
Date: 2036-01-01
Date: 2037-01-01
Date: 2038-01-01
Date: 2039-01-01
Date: 2040-01-01
Date: 2041-01-01
Date: 2042-01-01
Date: 2043-01-01
Date: 2044-01-01
Date: 2045-01-01
Date: 2046-01-01
Date: 2047-01-01
Date: 2048-01-01
Date: 2049-01-01
Date: 2050-01-01
Finished simulation, elapsed time: 0m and 9s.
Plots from /tmp/notebook/copper_trade/plots.yaml
Loaded example_4: 1 run(s), 4 of 4 plots with data
Loaded your_scenario: 1 run(s), 4 of 4 plots with data
Plotting: 100%|████████████████████████████████| 3/3 [00:00<00:00, 19.22plot/s]
Wrote 3 plots to plots
plots/session_emissions/example_4+your_scenario.html
plots/session_expenses_total/example_4+your_scenario.html
plots/session_fuel_consumed/example_4+your_scenario.html

STEP 4: Global sensitivity analysis with Horizon#

STEP 3 solves one scenario at a time. Horizon, the tool we use for global sensitivity analysis in our own work, moves several levers at once: it draws a value for each lever from its range and solves the case once per draw.

The next cell is the study: running it writes it to the file levers.hor in the case folder, which the cell after it runs. Each parameter of the study fills the placeholder of the same name in the deck, as --set does in STEP 3.

  • When active = TRUE, the lever is drawn from TRIANGULAR(lowest, most likely, highest), always between the first and last numbers, most likely near the middle one (1.0, the reference) and less and less likely towards the ends (LOG-TRIANGULAR: the same on a log scale); the levers are multipliers, as in STEP 3. When active = FALSE, it stays at 1.0. Only OIL_PRICE is on to start with.

  • NumberOfSamples is the number of simulations, fifteen by default in this example. The first three are fixed: the reference, then every active lever at its low-emissions end, then at its high-emissions end. The rest, twelve here, use Latin hypercube sampling: the triangle of each active lever is cut into that many equally likely slices, narrow near the middle number and wide towards the ends, and the lever takes one value in each slice.

  • To make samples 2 and 3 the lowest- and highest-emissions cases (the “corners” of the study), the user can set emissions_low, which says which end of a lever lowers emissions: MAXIMUM when it is the highest value; when nothing is set, the lowest. The high-emissions sample takes the other end.

  • The four switches stay at their default in every run; active = TRUE runs the study once for each value.

Change the study in the cell, then run it and the cell after it again: each run of the study replaces the one before.

%%writefile levers.hor
# THE STUDY: change it, then run this cell, which writes it to levers.hor, and the next one, which runs it

ContinuousParameter "OIL_PRICE"                 = TRIANGULAR(0.7, 1.0, 2.0)      { active = TRUE,  emissions_low = MAXIMUM }
ContinuousParameter "LNG_PRICE"                 = TRIANGULAR(0.7, 1.0, 1.6)      { active = FALSE, emissions_low = MAXIMUM }
ContinuousParameter "EU_ETS_PRICE"              = TRIANGULAR(0.5, 1.0, 3.0)      { active = FALSE, emissions_low = MAXIMUM }
ContinuousParameter "FUELEU_TARGET"             = TRIANGULAR(0.3, 1.0, 1.2)      { active = FALSE }
ContinuousParameter "FUELEU_PENALTY"            = TRIANGULAR(1.0, 1.0, 5.0)      { active = FALSE, emissions_low = MAXIMUM }
ContinuousParameter "CHILE_ELECTRICITY_PRICE"   = TRIANGULAR(0.6, 1.0, 1.4)      { active = FALSE }
ContinuousParameter "EUROPE_ELECTRICITY_PRICE"  = TRIANGULAR(0.6, 1.0, 1.4)      { active = FALSE }
ContinuousParameter "BIOMASS_AVAILABILITY"      = LOG-TRIANGULAR(0.1, 1.0, 10.0) { active = FALSE, emissions_low = MAXIMUM }
ContinuousParameter "BIOGENIC_CO2_AVAILABILITY" = TRIANGULAR(0.5, 1.0, 2.0)      { active = FALSE, emissions_low = MAXIMUM }
ContinuousParameter "TRADE_GROWTH"              = TRIANGULAR(0.0, 1.0, 2.0)      { active = FALSE }

# The four switches of STEP 3: every run of the study uses the default;
# active = TRUE runs the whole study once for each value.
ScenarioParameter "EU_RULES_WHOLE_VOYAGE" { values = ["0", "1"], default = "0", active = FALSE }  # 1: San Antonio inside both schemes
ScenarioParameter "FREEZE_EFFICIENCY"     { values = ["0", "1"], default = "0", active = FALSE }  # 1: nothing further gets fitted
ScenarioParameter "NO_FUELEU"             { values = ["0", "1"], default = "0", active = FALSE }  # 1: FuelEU taken out; EU ETS stays
ScenarioParameter "NO_EU_ETS"             { values = ["0", "1"], default = "0", active = FALSE }  # 1: EU ETS taken out; FuelEU stays

Horizon {
    UncFilePath = "example_4.unc"  # the deck
    OutputPath = "study"           # the folder of the study's runs and results
    NumberOfSamples = 15           # number of simulations
    SamplingMethod = LHS
    RandomSeed = 42
}
Writing levers.hor

Run the next cell: it checks the study, solves it, one simulation per sample, and gathers the runs into one results file.

Each plot shows the reference in grey and the study in colour:

  • the shaded band: in each year, the middle 90 % of the runs, from the 5th to the 95th percentile;

  • the dashed line: the median of the runs, year by year;

  • the solid line: the one run that stays closest to that median over the years.

# check the study, run it, one solve per sample, and gather the runs into study/levers.parquet
!horizon check levers.hor
!horizon run levers.hor
!horizon collect levers.hor

# draw the study against the reference, and show the plots
!lantern example_4.parquet study/levers.parquet --scale 0.8 \
    --plot "session_emissions[example_4,levers/levers]" \
    --plot "session_expenses_total[example_4,levers/levers]"
show("plots/session_emissions/example_4+levers.html",
     "plots/session_expenses_total/example_4+levers.html")
levers.hor: ok: 10 sample parameters, 4 scenario parameters, 1 scenario combinations, 15 runs, 0 errors, 0 warnings
2026-12-02 15:00:28,675 - INFO - Logging to /tmp/notebook/copper_trade/study/logs/horizon.log (DEBUG), console (INFO)
2026-12-02 15:00:28,675 - INFO - Study levers: 1 scenario combination(s) x 15 samples = 15 runs in /tmp/notebook/copper_trade/study
2026-12-02 15:00:28,675 - INFO - Running 15 run(s), 14 at a time
Running: 100%|████████████████████████████████| 15/15 [00:47<00:00,  3.16s/run]
2026-12-02 15:01:16,172 - INFO - All 15 run(s) ok; `horizon collect /tmp/notebook/copper_trade/levers.hor` compacts them
2026-12-02 15:01:16,853 - INFO - Logging to /tmp/notebook/copper_trade/study/logs/horizon.log (DEBUG), console (INFO)
Compacting: 100%|████████████████████████████| 15/15 [00:00<00:00, 312.52run/s]
Summarising: 100%|██████████████████████████████| 4/4 [00:00<00:00, 12.31run/s]
2026-12-02 15:01:17,287 - INFO - Compacted 15 run(s) into /tmp/notebook/copper_trade/study/levers_archive.parquet and their summary (representative, median, 5% and 95%) into /tmp/notebook/copper_trade/study/levers.parquet
2026-12-02 15:01:17,288 - INFO - levers is represented by levers_sample010
Plots from /tmp/notebook/copper_trade/plots.yaml
Loaded example_4: 1 run(s), 4 of 4 plots with data
Loaded levers: 1 run(s), 4 of 4 plots with data
Plotting: 100%|████████████████████████████████| 2/2 [00:00<00:00, 15.54plot/s]
Wrote 2 plots to plots
plots/session_emissions/example_4+levers.html
plots/session_expenses_total/example_4+levers.html

Workshop sessions#

Next: Session 2: Run a global case

Each link opens the notebook in Google Colab, in a fresh session, so run it from the top.

  1. Run a simple case (this session)

  2. Run a global case

  3. How a Navigate model is built

  4. How Navigate solves

  5. Build your own case