Optimization
Interface to trigger optimization passes.
APIOptimization
Bases: APIBaseInternal
Exposes functions to run and schedule optimization runs on a set of flights and to fetch flights related to optimization targets.
Source code in src/rmlab/api/operations/optimization.py
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 |
|
fetch_optimization_input_flights(scen_id, flight_id, citysector_id)
async
Returns all flights whose data is used as input for optimizing the input flight.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
scen_id | int | Scenario ID. | required |
flight_id | str | Flight ID. | required |
citysector_id | str | Citysector ID of flight. | required |
Source code in src/rmlab/api/operations/optimization.py
82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 |
|
fetch_optimization_scheduled_flights(scen_id, airline_id, sector_id, date_start, date_end)
async
Returns all flights of an airline in a sector scheduled for optimization passes in a date interval
Parameters:
Name | Type | Description | Default |
---|---|---|---|
scen_id | int | Scenario ID. | required |
airline_id | str | Airline ID. | required |
sector_id | str | Sector ID of flight. | required |
date_start | datetime | Start of date interval. | required |
date_end | datetime | End of date interval. | required |
Source code in src/rmlab/api/operations/optimization.py
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 |
|
schedule_optimization_pass(scen_id, airline_id, date_time, *, citysector_id=None, sector_id=None)
async
Schedules an optimization pass on all flights of an airline belonging to a citysector or sector to be run at specific date and time.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
scen_id | int | Scenario ID | required |
airline_id | str | Airline ID | required |
date_time | datetime | Date and time at which the optimization pass is triggered. | required |
citysector_id | Optional[str] | Citysector ID. Defaults to None. | None |
sector_id | Optional[str] | Sector ID. Defaults to None. | None |
Raises:
Type | Description |
---|---|
ValueError | If none of |
Source code in src/rmlab/api/operations/optimization.py
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
|
set_current_date(scen_id, date_current)
async
Set current date.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
scen_id | int | Scenario ID. | required |
date_current | datetime | Current date to set. | required |
Source code in src/rmlab/api/operations/optimization.py
126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 |
|
trigger_optimization_pass(scen_id, airline_id, *, citysector_id=None, sector_id=None)
async
Triggers an optimization pass on all flights of an airline belonging to a citysector or sector.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
scen_id | int | Scenario ID | required |
airline_id | str | Airline ID | required |
citysector_id | Optional[str] | Citysector ID. Defaults to None. | None |
sector_id | Optional[str] | Sector ID. Defaults to None. | None |
Raises:
Type | Description |
---|---|
ValueError | If none of |
Source code in src/rmlab/api/operations/optimization.py
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
|