Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.appliedaifoundation.org/llms.txt

Use this file to discover all available pages before exploring further.

This page documents the exact formulas and constants used in src/lib/utils/ciiCalculator.ts.

Reference CII

CII_ref = a × Capacity^(-c)
Capacity is DWT for cargo and tanker types, GT for cruise ships. Constants are taken from IMO MEPC.354(78).
Ship typeCapacityac
ContainerDWT1,9840.489
Bulk CarrierDWT4,7450.622
TankerDWT5,2470.610
Gas CarrierDWT14,4050.807
LNG CarrierDWT9,8270.718
General CargoDWT5880.388
Ro-RoDWT2,0230.460
CruiseGT9300.383
Vessel type strings from the database are normalised case-insensitively and matched against synonyms (e.g. “Crude Oil Tanker” → TANKER, “Car Carrier” → RO_RO).

Required CII

Required CII = Reference CII × (1 − reduction_factor)
Reduction factors per MEPC.338(76):
YearReduction
20190% (baseline)
20201%
20212%
20223%
20235%
20247%
20259%
202611%
202713%
202815%
202917%
203019%
2031+19% + 2% per year (extrapolation)

Attained CII

Attained CII = (Total CO₂ in grams) / (Capacity × Distance NM)
CO₂ is supplied in tonnes and converted internally (× 1,000,000).

Rating boundaries

Ratings A–E are determined by multiplying the Required CII by ship-type-specific d-factors (boundary multipliers from MEPC.354(78)):
Ship typed1 (A)d2 (B)d3 (C)d4 (D)
Container0.830.941.071.19
Bulk Carrier0.860.941.061.18
Tanker0.820.931.081.28
Gas Carrier0.810.911.121.44
LNG Carrier0.890.981.061.13
General Cargo0.830.941.061.19
Ro-Ro0.660.901.111.37
Cruise0.870.951.061.16
Rating boundary X = Required CII × d_X
A rating is the highest band that the Attained CII fits within:
  • Attained ≤ d1 × Required → A
  • Attained ≤ d2 × Required → B
  • Attained ≤ d3 × Required → C (this is the compliance threshold)
  • Attained ≤ d4 × Required → D
  • Otherwise → E

Compliance margin

Compliance margin = Required CII − Attained CII
Positive margin = the ship is below the required line (good). The compliance status is COMPLIANT if Attained ≤ Required, otherwise NON_COMPLIANT.

Implementation

src/lib/utils/ciiCalculator.ts — exports calculateCII, calculateCIISafe, calculateCIIWithReeferCorrection, and calculateCIIWithReeferCorrectionSafe. Safe variants return null instead of throwing when inputs are missing — used throughout the app where data quality varies by vessel.

Reference