-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
JARRY Gabriel DGAC/DSNA
committed
Apr 4, 2023
1 parent
000b394
commit d79e7b9
Showing
120 changed files
with
9,655 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,41 @@ | ||
# Acropole | ||
# Acropole  | ||
|
||
|
||
This repository contains the Acropole models for aircraft fuel flow prediction and Python packages for aircraft trajectory processing and fuel flow enhancement. | ||
|
||
|
||
## Easy Install | ||
|
||
To easy install, creating dedicated anaconda environment is recommended : | ||
|
||
```sh | ||
conda create -n acropole python=3.8 -c conda-forge | ||
``` | ||
|
||
Activate conda environment : | ||
|
||
```sh | ||
conda activate acropole | ||
``` | ||
|
||
Install dependencies : | ||
|
||
```sh | ||
conda install tensorflow scipy joblib scikit-learn pandas matplotlib jupyter jinja2==3.0.3 | ||
``` | ||
|
||
Clone repository : | ||
|
||
```sh | ||
git clone https://gitlab.asap.dsna.fr/dsna/me/acropole.git | ||
``` | ||
|
||
Finally, install lib : | ||
|
||
|
||
```sh | ||
cd acropole | ||
pip install . | ||
``` | ||
|
||
|
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,133 @@ | ||
# @internal | ||
# Created on 24 February 2023 | ||
# | ||
# @author: Gabriel JARRY | ||
# @endinternal | ||
from .variables import __DERIV, __SEP | ||
|
||
__COL_SYST_TRAJ_ID = "SYST_TRAJ_ID" | ||
__COL_SYST_POINT_ID = "SYST_POINT_ID" | ||
__COL_PLOT_DATE = "PLOT_DATE" | ||
__COL_TIME_LAST_PLOT = "TIME_LAST_PLOT" | ||
__COL_LONGITUDE = "LONGITUDE" | ||
__COL_LATITUDE = "LATITUDE" | ||
__COL_ALTI_STD_FT = "ALTI_STD_FT" | ||
__COL_GRND_SPD_KT = "GRND_SPD_KT" | ||
__COL_VERT_SPD_FTMN = "VERT_SPD_FTMN" | ||
__COL_FLPL_CALL_SIGN = "FLPL_CALL_SIGN" | ||
__COL_FLPL_AIRC_TYPE = "FLPL_AIRC_TYPE" | ||
__COL_FLPL_DEPR_AIRP = "FLPL_DEPR_AIRP" | ||
__COL_FLPL_ARRV_AIRP = "FLPL_ARRV_AIRP" | ||
__COL_ESTIM_FUEL_FLOW_ACRPL = "ESTIM_FUEL_FLOW_ACRPL" | ||
__COL_ESTIM_FUEL_FLOW_KGH = "ESTIM_FUEL_FLOW_KGH" | ||
__COL_CONF_IND = "CONF_IND" | ||
__COL_ESTIM_CONSO_KG = "ESTIM_CONSO_KG" | ||
__COL_FLIGHT_TIME = "FLIGHT_TIME" | ||
__COL_TIME = "TIME" | ||
__COL_MASS = "MASS" | ||
__COL_MASS_KG = "MASS_KG" | ||
__COL_TRUE_AIR_SPD_KT = "TRUE_AIR_SPD_KT" | ||
__COL_ACFT_ICAO_TYPE = "ACFT_ICAO_TYPE" | ||
__COL_FUEL_FLOW_TO = "FUEL_FLOW_TO" | ||
__COL_MAX_OPE_MACH_NUM = "MAX_OPE_MACH_NUM" | ||
__COL_MAX_TO_WEIGHT = "MAX_TO_WEIGHT" | ||
__COL_OPE_EMPTY_WEIGHT = "OPE_EMPTY_WEIGHT" | ||
__COL_ACFT_SPAN = "ACFT_SPAN" | ||
__COL_ACFT_LENGTH = "ACFT_LENGTH" | ||
__COL_ENGINE_NUM = "ENGINE_NUM" | ||
__COL_MAX_OPE_SPEED = "MAX_OPE_SPEED" | ||
__COL_MAX_OPE_ALTI = "MAX_OPE_ALTI" | ||
__COL_SURFACE = "SURFACE" | ||
__COL_ENGINE_TYPE = "ENGINE_TYPE" | ||
|
||
__COL_DERIV_ALTI_STD_FT = __DERIV + __SEP + __COL_ALTI_STD_FT | ||
__COL_DERIV_GRND_SPD_KT = __DERIV + __SEP + __COL_GRND_SPD_KT | ||
__COL_DERIV_TRUE_AIR_SPD_KT = __DERIV + __SEP + __COL_TRUE_AIR_SPD_KT | ||
|
||
__COLS_SMOOTH = [ | ||
__COL_ALTI_STD_FT, | ||
__COL_GRND_SPD_KT, | ||
__COL_VERT_SPD_FTMN | ||
] | ||
|
||
__COLS_KEEP = [ | ||
__COL_SYST_TRAJ_ID, | ||
__COL_FLPL_AIRC_TYPE, | ||
__COL_FLPL_CALL_SIGN, | ||
__COL_FLPL_DEPR_AIRP, | ||
__COL_FLPL_ARRV_AIRP | ||
] | ||
|
||
|
||
__COLS_RESAMPLE = [ | ||
__COL_LONGITUDE, | ||
__COL_LATITUDE, | ||
__COL_ALTI_STD_FT, | ||
__COL_GRND_SPD_KT, | ||
__COL_VERT_SPD_FTMN | ||
] | ||
|
||
__COLS_ACFT_PARAMS = [ | ||
__COL_ACFT_ICAO_TYPE, | ||
__COL_FUEL_FLOW_TO, | ||
__COL_SURFACE, | ||
__COL_MAX_OPE_ALTI, | ||
__COL_MAX_OPE_MACH_NUM, | ||
__COL_MAX_TO_WEIGHT, | ||
__COL_OPE_EMPTY_WEIGHT, | ||
__COL_ACFT_SPAN, | ||
__COL_ACFT_LENGTH, | ||
__COL_ENGINE_NUM, | ||
__COL_MAX_OPE_SPEED, | ||
__COL_CONF_IND, | ||
__COL_ENGINE_TYPE | ||
] | ||
|
||
__COLS_INPUT_FUEL = [ | ||
__COL_ENGINE_TYPE, | ||
__COL_DERIV_ALTI_STD_FT, | ||
__COL_DERIV_GRND_SPD_KT, | ||
__COL_DERIV_TRUE_AIR_SPD_KT, | ||
__COL_SURFACE, | ||
__COL_MAX_OPE_ALTI, | ||
__COL_MAX_OPE_SPEED, | ||
__COL_ALTI_STD_FT, | ||
__COL_GRND_SPD_KT, | ||
__COL_TRUE_AIR_SPD_KT, | ||
__COL_VERT_SPD_FTMN, | ||
__COL_MASS | ||
] | ||
|
||
__COLS_PROCESS = [ | ||
__COL_SYST_POINT_ID, | ||
__COL_TIME, | ||
__COL_TIME_LAST_PLOT, | ||
__COL_FLIGHT_TIME, | ||
__COL_PLOT_DATE | ||
] | ||
|
||
__COLS_FUEL = [ | ||
__COL_ESTIM_FUEL_FLOW_ACRPL, | ||
__COL_ESTIM_CONSO_KG, | ||
__COL_ESTIM_FUEL_FLOW_KGH, | ||
__COL_GRND_SPD_KT, | ||
__COL_TRUE_AIR_SPD_KT, | ||
__COL_MASS, | ||
__COL_FLPL_AIRC_TYPE, | ||
__COL_ENGINE_NUM, | ||
__COL_FUEL_FLOW_TO, | ||
__COL_CONF_IND, | ||
__COL_DERIV_TRUE_AIR_SPD_KT, | ||
__COL_DERIV_GRND_SPD_KT, | ||
__COL_TIME_LAST_PLOT, | ||
__COL_ALTI_STD_FT, | ||
__COL_OPE_EMPTY_WEIGHT, | ||
__COL_MAX_TO_WEIGHT | ||
] | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
ACFT_ICAO_TYPE;ENGINE_ICAO;PERCENTAGE;FUEL_FLOW_TO;TYPE;WTC;SURFACE;MAX_OPE_ALTI;MAX_OPE_MACH_NUM;MAX_TO_WEIGHT;OPE_EMPTY_WEIGHT;ACFT_SPAN;ACFT_LENGTH;ENGINE_NUM;TRAIN_ON;MAX_OPE_SPEED;CONF_IND;ENGINE_TYPE | ||
A318;CFM56-5B9/3;52.46;0.956;JET;M;122.6;39800.0;0.82;68000.0;40900.0;34.1;31.45;2.0;0;471.51923854894073;0.88;0.0 | ||
A319;V2524-A5;20.42;1.042;JET;M;122.6;39800.0;0.82;70000.0;39000.0;34.1;33.84;2.0;0;471.51923854894073;0.875;0.0 | ||
A320;CFM56-5B4/P;41.98;1.1320000000000001;JET;M;122.6;41100.0;0.82;78000.0;43700.0;34.1;37.57;2.0;1;471.51923854894073;1.0;0.0 | ||
A321;V2533-A5;57.58;1.426;JET;M;122.6;39800.0;0.82;83000.0;47000.0;34.15;44.5;2.0;0;471.51923854894073;0.884;0.0 | ||
A332;Trent 772;77.59;3.15;JET;H;361.6;41500.0;0.86;230000.0;125964.0;60.304;58.372;2.0;1;494.5201770147428;1.0;0.0 | ||
A333;Trent 772;79.19;3.15;JET;H;361.6;41100.0;0.86;212000.0;126000.0;60.304;63.689;2.0;0;494.5201770147428;0.891;0.0 | ||
A337;Trent 772;100.0;3.15;JET;H;361.6;41100.0;0.86;227000.0;125000.0;60.3;63.1;2.0;0;494.5201770147428;0.89;0.0 | ||
A338;Trent7000-72;100.0;2.478;JET;H;361.6;41100.0;0.86;242000.0;129000.0;64.0;58.81;2.0;0;494.5201770147428;0.849;0.0 | ||
A339;Trent7000-72;100.0;2.478;JET;H;361.6;41100.0;0.86;251000.0;129000.0;64.0;63.66;2.0;0;494.5201770147428;0.854;0.0 | ||
AT72;PW124B-HS14SF;100.0;0.1807;TURBOPROP;M;61.0;25000.0;0.55;21500.0;12300.0;27.05;27.166;2.0;0;331.6003035355095;0.899;1.0 | ||
AT73;PW127-HS247F;100.0;0.18774166665999997;TURBOPROP;M;61.0;25000.0;0.55;21500.0;12300.0;27.05;27.166;2.0;0;331.6003035355095;0.899;1.0 | ||
AT75;PW127F-HS568F;100.0;0.18969166;TURBOPROP;M;61.0;25000.0;0.55;22000.0;12850.0;27.05;27.166;2.0;0;331.6003035355095;0.9;1.0 | ||
AT76;PW127M-HS568F;100.0;0.18969166;TURBOPROP;M;61.0;25000.0;0.55;22800.0;13200.0;27.05;27.166;2.0;1;331.6003035355095;1.0;1.0 | ||
B732;JT8D-15A;34.31;1.115;JET;M;91.0449792;37000.0;0.84;52390.0;27125.0;28.35;30.53;2.0;0;483.01970778184176;0.885;0.0 | ||
B733;CFM56-3C-1;63.28;1.1540000000000001;JET;M;91.0449792;37000.0;0.82;61236.0;32904.0;28.88;33.4;2.0;0;471.51923854894073;0.876;0.0 | ||
B734;CFM56-3C-1;96.83;1.1540000000000001;JET;M;91.0449792;37000.0;0.82;68040.0;33190.0;28.88;36.4;2.0;0;471.51923854894073;0.876;0.0 | ||
B735;CFM56-3C-1;86.09;1.1540000000000001;JET;M;91.0449792;37000.0;0.82;60555.0;31312.0;28.88;31.01;2.0;0;471.51923854894073;0.882;0.0 | ||
B736;CFM56-7B22;26.92;1.021;JET;M;124.58297664;41000.0;0.82;65544.0;36378.0;34.32;31.24;2.0;0;471.51923854894073;0.879;0.0 | ||
B737;CFM56-7B26;19.21;1.2209999999999999;JET;M;124.58297664;41000.0;0.82;70080.0;37648.0;35.79;33.63;2.0;0;471.51923854894073;0.891;0.0 | ||
B738;CFM56-7B26E;38.29;1.213;JET;M;124.58297664;41000.0;0.82;79016.0;41413.0;35.79;39.47;2.0;1;471.51923854894073;1.0;0.0 | ||
B739;CFM56-7B27E;38.55;1.2930000000000001;JET;M;124.58297664;41000.0;0.82;85139.0;44676.0;35.79;42.11;2.0;0;471.51923854894073;0.886;0.0 | ||
CRJ7;CF34-8C5B1;94.29;0.606;JET;M;70.6;41000.0;0.78;34019.4;20069.0;23.24;32.51;2.0;1;448.5183000831388;1.0;0.0 | ||
CRJ9;CF34-8C5;73.63;0.6481;JET;M;71.1;41000.0;0.78;36514.0;21845.0;24.9;36.19;2.0;0;448.5183000831388;0.886;0.0 | ||
CRJX;CF34-8C5A1;100.0;0.665;JET;M;77.4;41000.0;0.78;41640.0;23188.0;26.2;39.1;2.0;1;448.5183000831388;1.0;0.0 | ||
E170;CF34-8E5;79.86;0.6518;JET;M;72.72;41000.0;0.82;35990.0;21121.0;26.0;29.9;2.0;1;471.51923854894073;1.0;0.0 | ||
E190;CF34-10E5;54.31;0.789;JET;M;92.53;41000.0;0.82;47790.0;27737.0;28.72;36.24;2.0;1;471.51923854894073;1.0;0.0 | ||
E195;CF34-10E5A1;41.18;0.866;JET;M;92.53;41000.0;0.82;48790.0;28567.0;28.72;38.67;2.0;0;471.51923854894073;0.888;0.0 | ||
E75L;CF34-8E5;100.0;0.6518;JET;M;72.72;41000.0;0.82;38790.0;21870.0;26.0;31.68;2.0;0;471.51923854894073;0.894;0.0 | ||
E75S;CF34-8E5;100.0;0.6518;JET;M;72.72;41000.0;0.82;37500.0;21870.0;26.0;31.68;2.0;0;471.51923854894073;0.894;0.0 |
Empty file.
Empty file.
Binary file not shown.
Empty file.
Binary file added
BIN
+104 KB
acropole/models/Dense_Acropole_FuelFlow_Scaling/variables/variables.data-00000-of-00001
Binary file not shown.
Binary file added
BIN
+2.43 KB
acropole/models/Dense_Acropole_FuelFlow_Scaling/variables/variables.index
Binary file not shown.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# @internal | ||
# Created on 19 January 2021 | ||
# @author: Gabriel JARRY | ||
# This module enables the prediction of on-board parameters using machine learning models | ||
# @endinternal | ||
|
||
|
||
from pkg_resources import resource_filename | ||
|
||
import tensorflow as tf | ||
from .utils import * | ||
from .variables import FUEL_GENERIC_MIN, FUEL_GENERIC_MAX, __MODEL_ACRPL | ||
|
||
|
||
def load_generic_model(name): | ||
""" | ||
Function that loads the generic model for fuel scaling: | ||
:return: The tensorflow model | ||
""" | ||
try: | ||
path = resource_filename('acropole', name) | ||
except FileNotFoundError: | ||
path = name | ||
return tf.saved_model.load(path) | ||
|
||
|
||
model_cache = compute_once(load_generic_model) | ||
|
||
|
||
def predict_fuel_generic(model_input_values): | ||
""" | ||
Function that predicts the generic fuel flow from a list of input values | ||
:param model_input_values: is the array of inputs: | ||
:return: List of predicted generic fuel flow | ||
""" | ||
model = model_cache(__MODEL_ACRPL) | ||
model_input_values = (model_input_values - FUEL_GENERIC_MIN) / (FUEL_GENERIC_MAX - FUEL_GENERIC_MIN) | ||
data = tf.constant(model_input_values, dtype=tf.float32) | ||
tensorflow_result_dict = model.signatures[tf.saved_model.DEFAULT_SERVING_SIGNATURE_DEF_KEY](data) | ||
key, values = tensorflow_result_dict.popitem() | ||
return list(values.numpy().flatten()) | ||
|
||
|
Oops, something went wrong.