PassengerSim

Below are a handful of top-level functions from the PassengerSim API. For most operations, please refer to the API reference for the individual sub-modules.

Modules

passengersim.callbacks

Callback hooks triggered at key points during a simulation.

passengersim.config

Configuration classes for PassengerSim simulations.

passengersim.connection_builder

Tools for building itinerary connections between flight legs.

passengersim.contrast

Compare results across multiple PassengerSim simulations.

passengersim.core

Low-level interface to the PassengerSim C++ simulation engine.

passengersim.database

Database interface for persisting and querying simulation results.

passengersim.driver

Main simulation driver for PassengerSim.

passengersim.experiments

Run structured sets of PassengerSim simulations as experiments.

passengersim.rm

Revenue management systems and algorithms for PassengerSim.

passengersim.summaries

This subpackage is for defining the SimulationTables class and its items.

passengersim.tracers

Tracers for recording detailed simulation data.

passengersim.transforms

This module provides various transformations for PassengerSim configurations.

Functions

passengersim.demo_network(name: str) Path[source]

Load a demo network configuration file.

A few demo networks are bundled with the PassengerSim package, and are always available to users.

Parameters:
name : str

The name of the network file, with or without the .yaml extension. If the extension is not provided, it will be added automatically.

Returns:

pathlib.Path – Path object pointing to the network configuration file.

Notes

The network name is converted to lowercase to handle case sensitivity differences between macOS (case-insensitive) and Linux (case-sensitive) file systems. All packaged network files are stored in lowercase.

passengersim.demo_output(name: str) Path[source]

Load a demo output file.

A few demo output files are bundled with the PassengerSim package, and are always available to user, without needing to load or run a simulation.

Parameters:
name : str

The name of the output file, with or without the .pxsim extension. If the extension is not provided, it will be added automatically.

Returns:

pathlib.Path – Path object pointing to the output file.

Notes

The output name is converted to lowercase to handle case sensitivity differences between macOS (case-insensitive) and Linux (case-sensitive) file systems. All output files are stored in lowercase.

passengersim.info()[source]

Print info about PassengerSim (versions, licenses, etc.)

passengersim.from_file(path: str | Path | PathLike[str]) Config[source]

Load a PassengerSim file.

The type of file is determined by the extension. The following file types are supported:

  • .pxsim: SimulationTables

  • .yaml, .yml, or either also with .gz or .lz4: Config

Parameters:
path : str

Path to the file to load. The file type is determined by the extension.