Ahab Baseline Network

This page reviews the configuration of the Ahab network and runs a baseline simulation, with its only carrier, Pequod, using revenue management system E. See the Ahab network overview for a description of this single-flight test network.

import passengersim as pax
from passengersim.config.checks import check_config

pax.versions()
passengersim 0.95.dev53+gecdbe3df7.d20261113
passengersim.core 0.95.dev53+gecdbe3df7.d20261113
import plotly.io as pio

pio.renderers.default = "notebook_connected"
cfg = pax.Config.from_yaml(pax.demo_network("ahab/baseline"))

# MultiSimulation needs temporary storage rather than the baseline in-memory database.
cfg.db.filename = None
cfg.db.result_storage = "temporary"

Route Map

Pequod operates one flight from Nantucket (ACK) to Nadi (NAN). The map is centered on the Pacific to show both ends of this long-haul route.

cfg.plotly_route_map(center_lon=-140, center_lat=15, zoom=0.7)

As in the Europa example, we pre-build the paths before inspecting the configuration. There are no connecting itineraries in this network.

from passengersim.connection_builder import prebuild_connections

cfg = prebuild_connections(cfg, inplace=False)

Check Configuration

check_config(cfg)
 ✅ fare classes match carrier booking classes
 ✅ no fares without demands
 ✅ no markets without fares
 ✅ market lowest fares match configured fare prices
 ✅ no demands without fares
 ✅ no demands without paths
 ✅ fare restrictions: 3 unique restrictions found
   - R2: 3 occurrences
   - R1: 4 occurrences
   - R3: 2 occurrences
 ❌ reference price scaling:
    inconsistent market reference prices in market ACK~NAN
 ✅ choice model restrictions: 3 unique restrictions found
   - r1: {'business': 1.0, 'leisure': 0.7}
   - r2: {'business': 0.35, 'leisure': 0.35}
   - r3: {'business': 0.5, 'leisure': 0.35}
 ✅ choice model and fare restrictions match

List of Markets

There is one directional market, ACK–NAN. No return service is included.

cfg.dataframes.markets
orig dest demand_multiplier delta_t distance lowest_fare
0 ACK NAN 1.0 None 8172.527 1000.0

Fares

The six fare classes range from \(1,000 to \)4,000. Lower fares carry advance-purchase requirements and restrictions; these are configuration inputs, not simulation results.

cfg.dataframes.fares
carrier orig dest booking_class price advance_purchase restrictions category cabin min_stay saturday_night_required
0 Pequod ACK NAN Y0 4000.0 0 None Y 0 False
1 Pequod ACK NAN Y1 3000.0 0 R2 None Y 0 False
2 Pequod ACK NAN Y2 2000.0 3 R1 None Y 0 False
3 Pequod ACK NAN Y3 1500.0 7 R1|R2 None Y 0 False
4 Pequod ACK NAN Y4 1250.0 14 R1|R3 None Y 0 False
5 Pequod ACK NAN Y5 1000.0 21 R1|R2|R3 None Y 0 False

Demand

Business and leisure travelers have different reference prices and booking curves. The base demands total 100 passengers, matching the flight capacity, but realized demand and bookings vary across samples.

cfg.dataframes.demands
orig dest segment base_demand reference_price emult distance choice_model dwm_tolerance todd_curve curve party_size prob_saturday_night prob_num_days deterministic
0 ACK NAN business 40.0 2500.0 None 8172.527 business 0.0 None c1 None None [] False
1 ACK NAN leisure 60.0 1000.0 None 8172.527 leisure 0.0 None c2 None None [] False

Carrier Service Capacity

The network contains one 100-seat flight operated by Pequod.

cfg.dataframes.legs
orig dest orig_timezone dest_timezone carrier fltno distance capacity date dep_time arr_time dep_time_offset arr_time_offset dep_hour_local arr_hour_local duration_minutes
leg_id
101 ACK NAN America/New_York Pacific/Fiji Pequod 101 8172.527 100 2026-12-25 00:00:00+00:00 1798203600 1798262580 -18000 43200 8.0 17.383333 983

Simulation Results

We use the supplied baseline settings: one trial with 1,000 samples and a 100-sample burn-in. The summaries below therefore cover 900 retained samples.

sim = pax.MultiSimulation(cfg)
out = sim.run()
out.n_total_samples

╭── Summary revenue statistics · Moby Dick ───╮
│                                Pequod       │
│ Run           Samples     Mean  ~95% CI     │
│ Moby Dick         900   159.3K   ±2,331     │
│ Post-burn-in only · Approx. 95% CI for mean │
╰─────────────────────────────────────────────╯
900

Carrier Performance

out.fig_carrier_revenues()
out.fig_carrier_load_factors()
out.fig_carrier_rasm()
out.fig_carrier_yields()

Fare Class Mix

The fare class mix shows how Pequod’s bookings are distributed across the six classes.

out.fig_fare_class_mix()

Flight Load Factor

With only one flight, this chart has one point. It shows the average load factor for the ACK–NAN leg against its distance.

out.fig_leg_load_v_distance(carrier="Pequod")

Market Shares

Pequod is the only carrier, so the market-share table is a baseline check rather than a comparison of competitors. A single carrier does not imply that all demand books a seat.

out.market_shares()
carrier Pequod
orig dest
ACK NAN 100.0