Leg
__init__
__init__(
carrier: str,
flt_no: int,
orig: str,
dest: str,
capacity: int = 0,
sold: int = 0,
duration: int = 0,
equipment: str = None,
info: Any = None,
)
bucket_number
Get the bucket from the leg.
Parameters:
-
i
(int or str
) –If an integer, returns the bucket at this index position from the list of buckets attached to this Leg. If given as a str, returns the bucket with the indicated booking class.
Returns:
-
Bucket
–
capture_dcp
Grab a snapshot of important variables.
Parameters:
-
i
(int
) –The index of the DCP to capture.
forecast
forecast(
dcp_index: int,
algorithm: str,
snapshot_instruction: "SnapshotInstruction | None" = None,
)
get_bucket_auth
Get the authorization for a bucket attached to this leg.
Parameters:
-
i
(int or str
) –If an integer, returns the auth of the bucket at this index position from the list of buckets attached to this Leg. If given as a str, returns the auth of the bucket with the indicated booking class.
Returns:
-
int
–
get_bucket_decision_fare
Get the decision fare for a bucket, either by class name (string) or index (int)
get_bucket_fcst_mean
Get the forecast demand for a bucket, either by class name (string) or index (int)
get_bucket_fcst_revenue
Get the forecast revenue for a bucket, either by class name (string) or index (int)
get_bucket_fcst_std_dev
Get the forecast demand std. dev. for a bucket, either by class name (string) or index (int)
get_bucket_revenue
Get the revenue for a bucket, either by class name (string) or index (int)
get_bucket_sold
Get the number of seats sold for a bucket attached to this leg.
Parameters:
-
i
(int or str
) –If an integer, returns the number of seats sold for the bucket at this index position from the list of buckets attached to this Leg. If given as a str, returns the number of seats sold for the bucket with the indicated booking class.
Returns:
-
int
–
littlewood
set_bucket_auth
Set the authorization for a bucket, either by class name (string) or index (int)
set_bucket_decision_fare
Set the decision fare for a bucket, either by class name (string) or index (int)
set_bucket_fcst_mean
Set the forecast demand for a bucket, either by class name (string) or index (int)
set_bucket_fcst_revenue
Set the revenue forecast for a bucket, either by class name (string) or index (int)
set_bucket_fcst_std_dev
Set the forecast demand std. dev. for a bucket, either by class name (string) or index (int)
set_bucket_revenue
Set the revenue for a bucket, either by class name (string) or index (int)
set_bucket_sold
Set the seats sold for a bucket, either by class name (string) or index (int)