Skip to content

Commit

Permalink
updating README.me and including some missing scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
Abolfazl Simorgh authored and Abolfazl Simorgh committed Dec 30, 2022
1 parent dbf23f3 commit 906d67a
Show file tree
Hide file tree
Showing 19 changed files with 1,657 additions and 19 deletions.
Binary file modified .DS_Store
Binary file not shown.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
## What is roost?

The Python Library roost is a software package developed by UC3M. The roost is a tool for robust flight planning within the currently structured airspace. The main features of roost are: 1) integrates horizontal and vertical decision-making, 2) fast performance thanks to GPU-based parallelization, 3) considers climb, cruise, and descent phases
The Python Library roost is a software package developed by UC3M. It is a tool for robust flight planning within the currently structured airspace. The main features of roost are: 1) integrates horizontal and vertical decision-making, 2) fast performance thanks to GPU-based parallelization, 3) considers climb, cruise, and descent phases
4) incorporate uncertainty in meteorological variables, as well as initial flight time and initial flight mass.

**License:** roost is released under GNU Lesser General Public License v3.0 (LGPLv3).
Expand All @@ -24,15 +24,15 @@ The installation is the first step to working with roost. In the following, the
conda create -n env_roost
conda activate env_roost
```
1. Clone or download the repository. The roost source code is available on a public GitHub repository: XXX. The easiest way to obtain it is to clone the repository using git: git clone XXX.
1. Clone or download the repository. The roost source code is available on a public GitHub repository: https://github.com/Abolfazl-Simorgh/roost. The easiest way to obtain it is to clone the repository using git: git clone https://github.com/Abolfazl-Simorgh/roost.git.

2. Locate yourself in the roost (library folder) path, and run the following line, using terminal (MacOS and Linux) or cmd (Windows), which will install all dependencies:
```python
python setup.py install
```
it will install all required dependency.
it will install all the required dependencies.

## How to use it
There is a script in the roost (library folder) path, *main_run.py*, which provides a sample to get started with the library. This sample file contains some comments explaining the required inputs, problem configurations, selection of objective function (which includes flight planning objectives), optimization configurations, running, and output files. Notice that, in order to use roost for optimizing aircraft trajectories, the BADA4.0 license is required, and the script bada4.py needs to be included in the directory of the library.
There is a script in the roost (library folder) path, *main_run.py*, which provides a sample to get started with the library. This sample file contains comments explaining the required inputs, problem configurations, objective function selection (which includes flight planning objectives), optimization configurations, running, and output files. Notice that we use BADA4.0 to represent the aerodynamic and propulsive performance of the aircraft. Due to restrictions imposed by the BADA license, the current version in GitHub is incomplete, as three python scripts related to the used aircraft performance model have been excluded (i.e., bada4.py, apm.py, and badalib.cu). We are currently assessing the existing open-source aircraft performance models in order to make the complete library available to the public.


8 changes: 4 additions & 4 deletions main_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# Filter the dataset to the required variables
dsc = ds[['t', 'u', 'v', 'z', 'r', 'pv', 'C1', 'C2', 'olr', 'aCCF_CH4']]

# Information of the considered aircraft (notice that the user needs to input s .xml file)
# Input Aircraft Performance Datasets:
apm = BADA4_jet_CR('A320-214', full_path='A320-214.xml')

# New coordinates for processing the input meteorological data
Expand Down Expand Up @@ -61,7 +61,7 @@
# If yes, the climate impact is considered as an objective in the objective function to be optimized
problem_config['compute_accf'] = True

# # If yes, the NOx emission is considered as an objective in the objective function to be optimized
# If yes, the NOx emission is considered as an objective in the objective function to be optimized
problem_config['compute_emissions'] = True


Expand All @@ -80,10 +80,10 @@
# Weights ATR of H2O in the objective function
problem_config['CI_h2o'] = 1

# Weights ATR of Contrails in the objective function
# Weights ATR of contrails in the objective function
problem_config['CI_contrail'] = 1

# Weights distance flown in persistent contrails formation areas in the objective function
# Weights the distance flown in persistent contrails formation areas in the objective function
problem_config['CI_contrail_dis'] = 0


Expand Down
Binary file modified roost/.DS_Store
Binary file not shown.
2 changes: 1 addition & 1 deletion roost/airspace.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

import pandas as pd
from typing import Sequence
from roc3.geometry import *
from roost.geometry import *
import networkx as nx
import matplotlib.pyplot as plt
import networkx.readwrite as rw
Expand Down
2 changes: 1 addition & 1 deletion roost/codegen.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

import os
import re
from roc3.bada4 import BADA4_jet_CR as jet
from roost.bada4 import BADA4_jet_CR as jet
from jinja2 import Template, Environment, StrictUndefined, UndefinedError
from pathlib import Path

Expand Down
97 changes: 97 additions & 0 deletions roost/constants.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-

import numpy as np
# Unless specified otherwise, all units are SI

#: :obj:`float` :
#: kappa = 1.4
kappa = 1.4

#: :obj:`float` :
#: Rg = 287.05287
Rg = 287.05287

#: :obj:`float` :
#: ft = 0.3048
ft = 0.3048

#: :obj:`float` :
#: m2ft = ft**-1
m2ft = ft**-1

#: :obj:`float` :
#: T0_MSL = 288.15
T0_MSL = 288.15

#: :obj:`float` :
#: P0_MSL = 101325.0
P0_MSL = 101325.0

#: :obj:`float` :
#: rho0_MSL = 1.225
rho0_MSL = 1.225

#: :obj:`float` :
#: a0_MSL = 340.294
a0_MSL = 340.294

#: :obj:`float` :
#: nmi = 1852.0
nmi = 1852.0

#: :obj:`float` :
#: kt = nmi/3600
kt = nmi/3600

#: :obj:`float` :
#: ms2kt = 1/kt
ms2kt = 1/kt

#: :obj:`float` :
#: g0 = g = 9.80665
g0 = g = 9.80665

#: :obj:`float` :
#: lapse_rate_troposphere = -0.0065
lapse_rate_troposphere = -0.0065

#: :obj:`float` :
#: R_mean = 6356.8e3
R_mean = 6356.8e3

#: :obj:`float` :
#: d2r = np.pi/180
d2r = np.pi/180

#: :obj:`float` :
#: flattening = 1/298.257223563
flattening = 1/298.257223563

#: :obj:`float` :
#: first_eccentricity = (flattening*(2 - flattening))**0.5
first_eccentricity = (flattening*(2 - flattening))**0.5

#: :obj:`float` :
#: R_a = 6378.137e3
R_a = 6378.137e3

#: :obj:`float` :
#: R_b = 6356.752
R_b = 6356.752

#: :obj:`float` :
#: h_tropopause = 11e3
h_tropopause = 11e3

#: :obj:`float` :
#: T_tropopause = 216.65
T_tropopause = 216.65

#: :obj:`float` :
#: minute = np.timedelta64(1, 'm').astype('timedelta64[ns]')
minute = np.timedelta64(1, 'm').astype('timedelta64[ns]')

#: :obj:`float` :
#: hour = np.timedelta64(1, 'h').astype('timedelta64[ns]')
hour = np.timedelta64(1, 'h').astype('timedelta64[ns]')
Loading

0 comments on commit 906d67a

Please # to comment.