Simulation Engine
Attributes
prorate_revenue
instance-attribute
When set to True, O&D revenue is prorated by mileage to the leg level
tf_k_factor
instance-attribute
Timeframe k-factor, controls variance in the passenger arrival curves
Functions
add_dcp
Add dcp_index and days_prior. Must be added in ascending order of dcp_index
allocate_demand_to_tf
allocate_demand_to_tf(
dmd: Demand,
num_pax: int,
tf_k_factor: float,
endTS: int,
debug: bool = False,
) -> tuple[int]
Generate events for a single demand
Parameters:
-
dmd
(Demand
) – -
num_pax
(int
) – -
tf_k_factor
(float
) – -
endTS
(int
) – -
debug
(bool
, default:False
) –
Returns:
-
int
–Number of events allocated.
allocate_demand_to_tf_pods
allocate_demand_to_tf_pods(
dmd: Demand,
num_pax: int,
tf_k_factor: float,
endTS: int,
debug: bool = False,
) -> tuple[int]
Generate events for a single demand (used to simulate PODS processing)
Parameters:
-
dmd
(Demand
) – -
num_pax
(int
) – -
tf_k_factor
(float
) – -
endTS
(int
) – -
debug
(bool
, default:False
) –
Returns:
-
tuple[int]
–Number of events allocated by DCP.
final_write_to_sqlite
Write final summary details to sqlite
license_info
Access license info as a human-readable string.
Parameters:
-
user_cert
(Certificate
, default:None
) –The license.
Returns:
-
str
–
validate_license
Validate a user's license certificate.
Parameters:
-
user_cert
(Certificate
, default:None
) –The license.
-
future
(int
, default:0
) –Validate as if it is this many days in the future. This is primarily used for debugging and testing. This is treated as an unsigned integer internally, so negative values will not go back in time.
Raises:
-
RuntimeError
–If the license certificate is not valid.