SimulationSettings¶
- class passengersim.config.SimulationSettings[source]¶
Bases:
PrettyModelAttributes:
The overall number of trials to run.
The number of samples to run within each trial.
The number of samples to burn when starting each trial.
Double the capacity on all legs until this sample.
System-level randomness factor.
Market-level randomness factor.
Passenger-type randomness factor.
Passenger segment randomness factor.
Passenger-type randomness factor.
THIS IS A TEST
Time frame randomness factor.
Base level demand variance control.
Timeframe demand variance control.
Used to exponentially smooth revenue per PathClass, to get optimizationFare
This will save all Offers, including those that would fail fare rules or availability.
Deprecated, has no effect.
Use the "standard" time of day departure (TODD) curves.
Maximum connection time for automatically generated paths.
Remove all advance purchase settings used in the simulation.
Scale all demand by this value.
Scale all capacities by this value.
Settings related to the automatic generation of paths and connections in the simulation.
Deprecated.
Use the new A* search to build connections, it can create 3seg connects
Integer used to control the reproducibility of simulation results.
The reference time zone for the controller (seconds relative to UTC).
The default date used to compute relative times for travel.
The hour of the day that the RM recalculation events are triggered.
Turns on the capturing of competitor data.
Turns on the capturing of the choice set and writes the data to the specified file
If this is set, PassengerSim will randomly sample the ChoiceSet data and output APPROXIMATELY this many choice sets (each will have multiple items and all items for the choice set will be saved and output)
Capture only these markets (O&D pairs)
Store the demand history for each demand.
Show a progress bar while running.
Additional settings to pass to the simulation.
Which algorithm to use for time frame demand allocation.
Allow restrictions to be defined but not used.
Speed limits for short, medium, and long travel legs.
Methods:
Get the reference travel datetime in unix time.
- num_trials : conint(ge=1, le=1000)¶
The overall number of trials to run.
Each trial is a complete simulation, including burn-in training time as well as study time. It will have a number of sequentially developed samples, each of which represents one “typical” day of travel.
See [Counting Simulations][counting-simulations] for more details.
- num_samples : conint(ge=1, le=10000)¶
The number of samples to run within each trial.
Each sample represents one “typical” day of travel. See [Counting Simulations][counting-simulations] for more details.
- burn_samples : conint(ge=0, le=10000)¶
The number of samples to burn when starting each trial.
Burned samples are used to populate a stable history of data to support forecasting and optimization algorithms, but are not used to evaluate performance results.
See [Counting Simulations][counting-simulations] for more details.
- double_capacity_until : int | None¶
Double the capacity on all legs until this sample.
The extra capacity may reduce the statistical noise of untruncation within the burn period and allow the simulation to achieve a stable steady state faster. If used, this should be set to a value at least 26 below the burn_samples value to avoid polluting the results.
- sys_k_factor : confloat(ge=0, le=5.0)¶
System-level randomness factor.
This factor controls the level of correlation in demand levels across the entire system.
See K-Factors to Control Correlation for more details.
- mkt_k_factor : confloat(ge=0, le=5.0)¶
Market-level randomness factor.
This factor controls the level of correlation in demand levels across origin- destination markets.
See K-Factors to Control Correlation for more details.
- pax_type_k_factor : confloat(ge=0, le=5.0)¶
Passenger-type randomness factor.
Deprecated: use simple_k_factor instead.
This factor add uncorrelated variance to every demand, unless there are multiple demands in the same market and with the same passenger segment.
See K-Factors to Control Correlation for more details.
- segment_k_factor : confloat(ge=0, le=5.0)¶
Passenger segment randomness factor.
This factor controls the level of correlation in demand levels across passenger segments.
- simple_k_factor : confloat(ge=0, le=5.0)¶
Passenger-type randomness factor.
This factor add uncorrelated variance to every demand.
See K-Factors to Control Correlation for more details.
- simple_cv100 : confloat(ge=0, le=1.0)¶
THIS IS A TEST
- tf_k_factor : confloat(ge=0)¶
Time frame randomness factor.
This factor controls the dispersion of bookings over time, given a previously identified level of total demand. See [k-factors]() for more details.
- tot_z_factor : confloat(ge=0, le=100.0)¶
Base level demand variance control.
This factor scales the variance in the amount of total demand for any given market segment.
See K-Factors to Control Correlation for more details.
- tf_z_factor : confloat(ge=0, le=100.0)¶
Timeframe demand variance control.
This factor scales the variance in the allocation of total demand to the various arrival timeframes.
See K-Factors to Control Correlation for more details.
- prorate_revenue : bool¶
- revenue_alpha : float¶
Used to exponentially smooth revenue per PathClass, to get optimizationFare
- save_orders : bool¶
- save_all_offers : bool¶
This will save all Offers, including those that would fail fare rules or availability. The output choice set data will have all of these, so you can find first choice demand, recapture, etc. False by default
- dwm_lite : bool¶
Deprecated, has no effect.
- use_standard_todd_curves : bool¶
Use the “standard” time of day departure (TODD) curves.
Each demand, unless otherwise given an explicit TODD curve to use, will use the standard TODD curve associated with the market’s delta_t.
- max_connect_time : conint(ge=0)¶
Maximum connection time for automatically generated paths.
Any generated path that has a connection time greater than this value (expressed in minutes) is invalidated.
- disable_ap : bool¶
Remove all advance purchase settings used in the simulation.
This applies to all carriers and all fare products. If active, this filter is applied to all Fare definitions at the time the Config is loaded into to a Simulation object.
- demand_multiplier : confloat(gt=0)¶
Scale all demand by this value.
Setting to a value other than 1.0 will increase or decrease all demand inputs uniformly by the same multiplicative amount. This is helpful when exploring how simulation results vary when you have “low demand” scenarios (e.g, demand_multiplier = 0.8), or “high demand” scenarios (e.g., demand multiplier = 1.1).
- capacity_multiplier : confloat(gt=0)¶
Scale all capacities by this value.
Setting to a value other than 1.0 will increase or decrease all capacity inputs uniformly by the same multiplicative amount. Business class and/or first class can be quickly simulated with this option
- connection_builder : ConnectionBuilderSettings¶
Settings related to the automatic generation of paths and connections in the simulation.
- manual_paths : Annotated[bool | None, Field(deprecated='`manual_paths` is deprecated and will be removed in a future version. Use `connection_builder.existing_paths` instead')]¶
Deprecated. See connection_builder.existing_paths instead.
- generate_3seg : bool | None¶
Use the new A* search to build connections, it can create 3seg connects
- property use_3seg : bool¶
- write_raw_files : bool¶
- random_seed : int | None¶
Integer used to control the reproducibility of simulation results.
A seed is base value used by a pseudo-random generator to generate random numbers. A fixed random seed is used to ensure the same randomness pattern is reproducible and does not change between simulation runs, i.e. allows subsequent runs to be conducted with the same randomness pattern as a previous one. Any value set here will allow results to be repeated.
The random number generator is re-seeded at the beginning of every sample in every trial with a fixed tuple of three values: this “global” random seed, plus the sample number and trial number. This ensures that partial results are also reproducible: the simulation of sample 234 in trial 2 will be the same regardless of how many samples are in trial 1.
- update_frequency : int | None¶
- controller_time_zone : int | float¶
The reference time zone for the controller (seconds relative to UTC).
Data collection points will be trigger at approximately midnight in this time zone.
This value can be input in hours instead of seconds, any absolute value less than or equal to 12 will be assumed to be hours and scaled to seconds.
The default value is -6 hours, or US Central Standard Time.
- base_date : str¶
The default date used to compute relative times for travel.
Future enhancements may include multi-day modeling.
- dcp_hour : float¶
The hour of the day that the RM recalculation events are triggered.
If set to zero, the events happen at midnight. Other values can delay the recalculation into later in the night (or the next day).
- capture_competitor_data : bool¶
Turns on the capturing of competitor data.
This feature captures lowest available fare data captured by market, for potential use in competitive analysis RM strategies.
- capture_choice_set_file : str¶
Turns on the capturing of the choice set and writes the data to the specified file
- capture_choice_set_obs : int | None¶
If this is set, PassengerSim will randomly sample the ChoiceSet data and output APPROXIMATELY this many choice sets (each will have multiple items and all items for the choice set will be saved and output)
- capture_choice_set_mkts : list[tuple] | None¶
Capture only these markets (O&D pairs)
- capture_demand_history : bool¶
Store the demand history for each demand.
This can be activated to populate the demand_history summary table, if desired.
- show_progress_bar : bool¶
Show a progress bar while running.
The progress display requires rich is installed.
- debug_availability : bool | None¶
- debug_choice : bool | None¶
- debug_connections : bool | None¶
- debug_events : bool | None¶
- debug_fares : bool | None¶
- debug_offers : bool | None¶
- debug_orders : bool | None¶
- additional_settings : dict[str, Any]¶
Additional settings to pass to the simulation.
These settings are passed directly to the simulation object and can be used to set various parameters that are not directly exposed in the configuration.
- timeframe_demand_allocation : Literal['v2', 'pods']¶
Which algorithm to use for time frame demand allocation.
- allow_unused_restrictions : bool¶
Allow restrictions to be defined but not used.
If set to False, any restriction that is defined as a parameter of a choice model but not present on any fare, or vice versa, will raise a ValueError. Users may override this behavior by setting this parameter to True, which will emit a warning instead of an error.
- speed_limits : SpeedLimits¶
Speed limits for short, medium, and long travel legs.
These are only used for data quality checks at Config load time. The limits should be set quite generously. If you set do speed limits, then legs that violate the limits (i.e., they appear abnormally fast or slow) will be flagged as validation errors when your data is loaded. Most of the time this will be due to data transcription errors (e.g. failure to account for crossing the international date line, incorrect assignment of airports to time zones, etc.)