features/flight_committees.feature in flight-0.0.17 vs features/flight_committees.feature in flight-0.0.18
- old
+ new
@@ -1,38 +1,35 @@
Feature: Flight Committee Calculations
The flight model should generate correct committee calculations
Scenario: Cohort committee from t100 with usable characteristics
Given a flight emitter
- And a characteristic "origin_airport.iata_code" of "DTW"
+ And a characteristic "origin_airport.iata_code" of "AIA"
When the "cohort" committee is calculated
- Then the conclusion of the committee should have a record with "count" equal to "34"
+ Then the conclusion of the committee should have a record with "count" equal to "1"
Scenario: Cohort committee from t100 with no usable characteristics
Given a flight emitter
- And a characteristic "seat_class.name" of "business"
+ And a characteristic "origin_airport.iata_code" of "XXX"
When the "cohort" committee is calculated
Then the conclusion of the committee should be nil
Scenario Outline: Date committee from timeframe
Given a flight emitter
And a characteristic "timeframe" of "<timeframe>"
When the "date" committee is calculated
Then the committee should have used quorum "from timeframe"
- And the conclusion of the committee should be "<from>"
+ And the conclusion of the committee should be "<date>"
Examples:
- | timeframe | from |
+ | timeframe | date |
| 2010-07-15/2010-07-20 | 2010-07-15 |
- Scenario Outline: Date committee from nil timeframe
+ Scenario: Date committee from nil timeframe
Given a flight emitter
- And a characteristic "timeframe" of "<timeframe>"
+ And a characteristic "timeframe" of ""
When the "date" committee is calculated
- Then the conclusion of the committee should be "<from>"
- Examples:
- | timeframe | from |
- | | |
+ Then the conclusion of the committee should be nil
Scenario Outline: Date committee from creation date
Given a flight emitter
And a characteristic "creation_date" of "<creation_date>"
When the "date" committee is calculated
@@ -48,205 +45,285 @@
When the "seat_class_multiplier" committee is calculated
Then the committee should have used quorum "from seat class"
And the conclusion of the committee should be "<multiplier>"
Examples:
| seat_class | multiplier |
- | business | 1.69 |
- | economy | 0.94 |
- | first | 1.47 |
+ | economy | 1.00 |
Scenario: Seat class multiplier committee from default
Given a flight emitter
When the "seat_class_multiplier" committee is calculated
Then the committee should have used quorum "default"
And the conclusion of the committee should be "1.0"
- Scenario Outline: Domesticity committee from airline for domestic airlines
+ Scenario: Trips committee
Given a flight emitter
- And a characteristic "airline.name" of "<airline>"
- When the "domesticity" committee is calculated
- Then the committee should have used quorum "from airline"
- And the conclusion of the committee should have a record with "name" equal to "<domesticity>"
- Examples:
- | airline | domesticity |
- | Midwest Aviation | Domestic Data, US Carriers Only |
+ When the "trips" committee is calculated
+ Then the conclusion of the committee should be "1.941"
- Scenario Outline: Domesticity committee from airline for international airlines
+ Scenario Outline: Freight share committee from cohort
Given a flight emitter
- And a characteristic "airline.name" of "<airline>"
- When the "domesticity" committee is calculated
- Then the conclusion of the committee should be nil
+ And a characteristic "origin_airport.iata_code" of "<origin>"
+ When the "cohort" committee is calculated
+ And the "freight_share" committee is calculated
+ Then the committee should have used quorum "from cohort"
+ And the conclusion of the committee should be "<freight share>"
Examples:
- | airline |
- | Aeroflot |
- | United Airlines |
+ | origin | freight share |
+ | ADA | 0.0099 |
+ | AIA | 0.09091 |
- Scenario Outline: Domesticity committee from destination airport for domestic airports
+ Scenario: Freight share committee from default
Given a flight emitter
- And a characteristic "destination_airport.iata_code" of "<iata_code>"
- When the "domesticity" committee is calculated
- Then the committee should have used quorum "from destination"
- And the conclusion of the committee should have a record with "name" equal to "<domesticity>"
- Examples:
- | iata_code | domesticity |
- | ALO | Domestic Data, US Carriers Only |
- | TXK | Domestic Data, US Carriers Only |
+ When the "freight_share" committee is calculated
+ Then the committee should have used quorum "default"
+ And the conclusion of the committee should be "0.06391"
- Scenario Outline: Domesticity committee from destination airport for international airports
+ Scenario: Fuel type committee from default
Given a flight emitter
- And a characteristic "destination_airport.iata_code" of "<iata_code>"
- When the "domesticity" committee is calculated
- Then the conclusion of the committee should be nil
- Examples:
- | iata_code |
- | DTW |
- | IAD |
- | GRR |
+ When the "fuel_type" committee is calculated
+ Then the conclusion of the committee should have a record with "emission_factor" equal to "2.52714"
- Scenario Outline: Domesticity committee from origin airport for domestic airports
+ Scenario: Emission factor committee
Given a flight emitter
- And a characteristic "origin_airport.iata_code" of "<iata_code>"
- When the "domesticity" committee is calculated
- Then the committee should have used quorum "from origin"
- And the conclusion of the committee should have a record with "name" equal to "<domesticity>"
- Examples:
- | iata_code | domesticity |
- | ALO | Domestic Data, US Carriers Only |
- | TXK | Domestic Data, US Carriers Only |
+ When the "fuel_type" committee is calculated
+ And the "emission_factor" committee is calculated
+ Then the conclusion of the committee should be "3.1293"
- Scenario Outline: Domesticity committee from destination for international airports
+ Scenario: Radiative forcing index committee
Given a flight emitter
- And a characteristic "destination_airport.iata_code" of "<iata_code>"
- When the "domesticity" committee is calculated
- Then the conclusion of the committee should be nil
- Examples:
- | iata_code |
- | DTW |
- | IAD |
- | GRR |
+ When the "fuel_type" committee is calculated
+ And the "radiative_forcing_index" committee is calculated
+ Then the conclusion of the committee should be "2"
- Scenario Outline: Domesticity committee from airports for domestic route
+ Scenario: Emplanements per trip committee from default
Given a flight emitter
+ When the "emplanements_per_trip" committee is calculated
+ Then the conclusion of the committee should be "1.67"
+
+ Scenario Outline: Distance committee from airports
+ Given a flight emitter
And a characteristic "origin_airport.iata_code" of "<origin>"
And a characteristic "destination_airport.iata_code" of "<destination>"
- When the "domesticity" committee is calculated
- Then the committee should have used quorum "from origin"
- And the conclusion of the committee should have a record with "name" equal to "<domesticity>"
+ When the "distance" committee is calculated
+ Then the committee should have used quorum "from airports"
+ And the conclusion of the committee should be "<distance>"
Examples:
- | origin | destination | domesticity |
- | DTW | SFO | Domestic Data, US Carriers Only |
+ | origin | destination | distance |
+ | ADA | AIA | 100.0 |
+ | AIA | WEA | 1000.0 |
- Scenario Outline: Domesticity committee from airports for international route
+ Scenario Outline: Distance committee from distance estimate
Given a flight emitter
- And a characteristic "origin_airport.iata_code" of "<origin>"
- And a characteristic "destination_airport.iata_code" of "<destination>"
- When the "domesticity" committee is calculated
- Then the conclusion of the committee should be nil
+ And a characteristic "distance_estimate" of "<distance_estimate>"
+ When the "distance" committee is calculated
+ Then the committee should have used quorum "from distance estimate"
+ And the conclusion of the committee should be "<distance>"
Examples:
- | origin | destination |
- | DTW | CDG |
+ | distance_estimate | distance |
+ | 185.2 | 100.0 |
- Scenario: Trips committee
+ Scenario Outline: Distance committee from distance class
Given a flight emitter
- When the "trips" committee is calculated
- Then the conclusion of the committee should be "1.941"
+ And a characteristic "distance_class.name" of "<distance_class>"
+ When the "distance" committee is calculated
+ Then the committee should have used quorum "from distance class"
+ And the conclusion of the committee should be "<distance>"
+ Examples:
+ | distance_class | distance |
+ | petite | 100.0 |
- Scenario: Freight share committee from cohort
+ Scenario Outline: Distance committee from cohort
Given a flight emitter
- And a characteristic "origin_airport.iata_code" of "DTW"
+ And a characteristic "airline.iata_code" of "<airline>"
When the "cohort" committee is calculated
- And the "freight_share" committee is calculated
+ And the "distance" committee is calculated
Then the committee should have used quorum "from cohort"
- And the conclusion of the committee should be "0.11876"
+ And the conclusion of the committee should be "<distance>"
+ Examples:
+ | airline | distance |
+ | DA | 100.0 |
+ | IA | 1000.0 |
- Scenario: Fuel type committee from default
+ Scenario: Distance committee from default
Given a flight emitter
- When the "fuel_type" committee is calculated
- Then the conclusion of the committee should have a record with "emission_factor" equal to "2.527139"
+ When the "distance" committee is calculated
+ Then the committee should have used quorum "default"
+ And the conclusion of the committee should be "1121.73083"
- Scenario Outline: Emission factor committee
+ Scenario Outline: Adjusted distance committee
Given a flight emitter
- And pending - no fuel type records yet
+ And a characteristic "distance_estimate" of "<distance_estimate>"
+ When the "distance" committee is calculated
+ And the "emplanements_per_trip" committee is calculated
+ And the "adjusted_distance" committee is calculated
+ Then the conclusion of the committee should be "<distance>"
+ Examples:
+ | distance_estimate | distance |
+ | 0 | 0 |
+ | 100 | 67.09227 |
- Scenario Outline: Radiative forcing index committee
+ Scenario Outline: Load factor committee from cohort
Given a flight emitter
- And pending - no fuel type records yet
+ And a characteristic "origin_airport.iata_code" of "<origin>"
+ When the "cohort" committee is calculated
+ And the "load_factor" committee is calculated
+ Then the committee should have used quorum "from cohort"
+ And the conclusion of the committee should be "<load_factor>"
+ Examples:
+ | origin | load_factor |
+ | ADA | 0.8 |
- Scenario Outline: Radiative forcing index committee
+ Scenario: Load factor committee from default
Given a flight emitter
- And pending - no fuel type records yet
+ When the "load_factor" committee is calculated
+ Then the committee should have used quorum "default"
+ And the conclusion of the committee should be "0.86667"
- Scenario: Emplanements per trip committee from default
+ Scenario Outline: Seats committee from aircraft
Given a flight emitter
- When the "emplanements_per_trip" committee is calculated
- Then the conclusion of the committee should be "1.67"
+ And a characteristic "aircraft.icao_code" of "<code>"
+ When the "seats" committee is calculated
+ Then the committee should have used quorum "from aircraft"
+ And the conclusion of the committee should be "<seats>"
+ Examples:
+ | code | seats |
+ | FM1 | 125 |
+ | BA1 | 125 |
+ | BA2 | 100 |
- Scenario: Distance committee from default
+ Scenario: Seats committee from seats estimate
Given a flight emitter
- When the "distance" committee is calculated
- Then the committee should have used quorum "default"
- And the conclusion of the committee should be "1121.73083"
+ And a characteristic "seats_estimate" of "100"
+ When the "seats" committee is calculated
+ Then the committee should have used quorum "from seats estimate"
+ And the conclusion of the committee should be "100"
- Scenario Outline: Distance committee from cohort
+ Scenario Outline: Seats committee from cohort
Given a flight emitter
And a characteristic "origin_airport.iata_code" of "<origin>"
- And a characteristic "destination_airport.iata_code" of "<destination>"
- And a characteristic "aircraft.icao_code" of "<craft>"
- And a characteristic "airline.iata_code" of "<airline>"
- And a characteristic "propulsion.name" of "<propulsion>"
- And a characteristic "domesticity.name" of "<domesticity>"
When the "cohort" committee is calculated
- And the "distance" committee is calculated
+ And the "seats" committee is calculated
Then the committee should have used quorum "from cohort"
- And the conclusion of the committee should be "<distance>"
+ And the conclusion of the committee should be "<seats>"
Examples:
- | origin | destination | craft | airline | propulsion | domesticity | distance |
- | DTW | | A320 | UA | | Domestic Data, US Carriers Only | 325 |
+ | origin | seats |
+ | ADA | 125 |
- Scenario Outline: Distance committee from distance class
+ Scenario: Seats committee from aircraft class
Given a flight emitter
- And a characteristic "distance_class.name" of "<distance_class>"
- When the "distance" committee is calculated
- Then the committee should have used quorum "from distance class"
- And the conclusion of the committee should be "<distance>"
+ And a characteristic "aircraft_class.brighter_planet_aircraft_class_code" of "EX"
+ When the "seats" committee is calculated
+ Then the committee should have used quorum "from aircraft class"
+ And the conclusion of the committee should be "117"
+
+ Scenario: Seats committee from default
+ Given a flight emitter
+ When the "seats" committee is calculated
+ Then the committee should have used quorum "default"
+ And the conclusion of the committee should be "117"
+
+ Scenario: Passengers committee
+ Given a flight emitter
+ And a characteristic "seats" of "100"
+ And a characteristic "load_factor" of "0.9"
+ When the "passengers" committee is calculated
+ Then the conclusion of the committee should be "90"
+
+ Scenario Outline: Fuel use coefficients committee from aircraft
+ Given a flight emitter
+ And a characteristic "aircraft.icao_code" of "<code>"
+ When the "fuel_use_coefficients" committee is calculated
+ Then the committee should have used quorum "from aircraft"
+ And the conclusion of the committee should have a record with "m3" equal to "<m3>"
+ And the conclusion of the committee should have a record with "m2" equal to "<m2>"
+ And the conclusion of the committee should have a record with "m1" equal to "<m1>"
+ And the conclusion of the committee should have a record with "endpoint_fuel" equal to "<b>"
Examples:
- | distance_class | distance |
- | epic | 8689.74081 |
- | long | 2606.92764 |
- | medium | 868.97408 |
- | short | 217.24406 |
+ | code | m3 | m2 | m1 | b |
+ | FM1 | 0 | 0 | 1 | 0 |
+ | BA1 | 0 | 0 | 2 | 0 |
- Scenario Outline: Distance committee from distance estimate
+ Scenario Outline: Fuel use coefficients committee from aircraft class
Given a flight emitter
- And a characteristic "distance_estimate" of "<distance_estimate>"
- When the "distance" committee is calculated
- Then the committee should have used quorum "from distance estimate"
- And the conclusion of the committee should be "<distance>"
+ And a characteristic "aircraft_class.brighter_planet_aircraft_class_code" of "<code>"
+ When the "fuel_use_coefficients" committee is calculated
+ Then the committee should have used quorum "from aircraft class"
+ And the conclusion of the committee should have a record with "m3" equal to "<m3>"
+ And the conclusion of the committee should have a record with "m2" equal to "<m2>"
+ And the conclusion of the committee should have a record with "m1" equal to "<m1>"
+ And the conclusion of the committee should have a record with "endpoint_fuel" equal to "<b>"
Examples:
- | distance_estimate | distance |
- | 123 | 66.41468 |
+ | code | m3 | m2 | m1 | b |
+ | EX | 0 | 0 | 2 | 0 |
- Scenario Outline: Distance committee from airports
+ Scenario Outline: Fuel use coefficients committee from cohort
Given a flight emitter
And a characteristic "origin_airport.iata_code" of "<origin>"
- And a characteristic "destination_airport.iata_code" of "<destination>"
- When the "distance" committee is calculated
- Then the committee should have used quorum "from airports"
- And the conclusion of the committee should be "<distance>"
+ When the "cohort" committee is calculated
+ And the "fuel_use_coefficients" committee is calculated
+ Then the committee should have used quorum "from cohort"
+ And the conclusion of the committee should have a record with "m3" equal to "<m3>"
+ And the conclusion of the committee should have a record with "m2" equal to "<m2>"
+ And the conclusion of the committee should have a record with "m1" equal to "<m1>"
+ And the conclusion of the committee should have a record with "endpoint_fuel" equal to "<b>"
Examples:
- | origin | destination | distance |
- | DTW | SFO | 1803.65517 |
- | IAD | DCA | 20.32743 |
- | MSP | FRA | 3809.26855 |
+ | origin | m3 | m2 | m1 | b |
+ | AIA | 0 | 0 | 2 | 0 |
- Scenario Outline: Adjusted distance committee from distance
+ Scenario Outline: Fuel use coefficients committee from default
Given a flight emitter
- And a characteristic "distance_estimate" of "<distance_estimate>"
- When the "distance" committee is calculated
- And the "emplanements_per_trip" committee is calculated
- And the "adjusted_distance" committee is calculated
- Then the conclusion of the committee should be "<distance>"
+ When the "fuel_use_coefficients" committee is calculated
+ Then the committee should have used quorum "default"
+ And the conclusion of the committee should have a record with "m3" equal to "<m3>"
+ And the conclusion of the committee should have a record with "m2" equal to "<m2>"
+ And the conclusion of the committee should have a record with "m1" equal to "<m1>"
+ And the conclusion of the committee should have a record with "endpoint_fuel" equal to "<b>"
Examples:
- | distance_estimate | distance |
- | 0 | 0 |
- | 1 | 0.67092 |
- | 1254 | 841.33709 |
+ | m3 | m2 | m1 | b |
+ | 0 | 0 | 2 | 0 |
+
+ Scenario: Adjusted distance per segment committee
+ Given a flight emitter
+ And a characteristic "adjusted_distance" of "100"
+ And a characteristic "emplanements_per_trip" of "2"
+ When the "adjusted_distance_per_segment" committee is calculated
+ Then the conclusion of the committee should be "50"
+
+ Scenario: Fuel per segment committee
+ Given a flight emitter
+ And a characteristic "adjusted_distance_per_segment" of "100"
+ And a characteristic "aircraft_class.brighter_planet_aircraft_class_code" of "EX"
+ When the "fuel_use_coefficients" committee is calculated
+ And the "fuel_per_segment" committee is calculated
+ Then the conclusion of the committee should be "200"
+
+ Scenario: Fuel committee
+ Given a flight emitter
+ And a characteristic "fuel_per_segment" of "100"
+ And a characteristic "emplanements_per_trip" of "2"
+ And a characteristic "trips" of "2"
+ When the "fuel" committee is calculated
+ Then the conclusion of the committee should be "400"
+
+ Scenario Outline: Emission committee from fuel and passengers and coefficients
+ Given a flight emitter
+ And a characteristic "fuel" of "<fuel>"
+ And a characteristic "passengers" of "<passengers>"
+ And a characteristic "seat_class_multiplier" of "<seat_mult>"
+ And a characteristic "emission_factor" of "<ef>"
+ And a characteristic "radiative_forcing_index" of "<rfi>"
+ And a characteristic "freight_share" of "<freight>"
+ And a characteristic "date" of "<date>"
+ And a characteristic "timeframe" of "2010-01-01/2010-12-31"
+ When the "emission" committee is calculated
+ Then the committee should have used quorum "from fuel and passengers with coefficients"
+ And the conclusion of the committee should be "<emission>"
+ Examples:
+ | fuel | passengers | seat_mult | ef | rfi | freight | date | emission |
+ | 100 | 100 | 1.5 | 10 | 2 | 0.10 | 2010-07-15 | 27 |
+
+ Scenario: Emission committee from default
+ Given a flight emitter
+ When the "emission" committee is calculated
+ Then the committee should have used quorum "default"
+ And the conclusion of the committee should be ""