Skip to content

Learn the model of a feasibility margin based on the Improved Feasible Region

License

Notifications You must be signed in to change notification settings

abdelrahman-h-abdalla/feasibility_margin_learn

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Jet Leg Learn

This repository contains the dataset generation and network training code for the stability margin network detailed in the work of Orsolino. et al. 2021.

Setup

This guide assumes that $PROJECT_ROOT refers to the absolute path to this repository.

Installing and Setting Up Virtual Environment

To setup a virtual environment inside the project directory:

sudo apt install -y python-venv
python -m venv $PROJECT_ROOT/venv
source $PROJECT_ROOT/venv/bin/activate

Now, you are ready to use the virtual environment. To install the dependencies related to this project, make sure you activate the environment and then run:

cd $PROJECT_ROOT/jet_leg_common
pip install -e .

And then

cd $PROJECT_ROOT
pip install -e .

Data Generation

If everything went well, you should be able to run the data generation script data_generation/stability_margin.py, assuming you have activated the virtual environment, like so:

cd $PROJECT_ROOT/scripts
python data_generation/stability_margin.py

If you want to generate a large amount of data, run

cd $PROJECT_ROOT/scripts/data_generation
./repeat_generation.sh

The script will repeatedly run the data generating script data_generation/stability_margin.py. This avoids running the data generating script once with a large amount of data, filling up the RAM in the process. The generated dataset will be stored in the $PROJECT_ROOT/data directory.

Training

After generating the training dataset, you can start the training using the script training/stability_margin.py:

cd $PROJECT_ROOT/scripts
python training/stability_margin.py

Deployment

Use the script utility/model_to_txt_converter.py to save the trained model parameters to a txt file for use with the custom C++ MLP implementation:

cd $PROJECT_ROOT/scripts
python utility/model_to_txt_converter.py

Author(s)

Installation Errors

You might need to set the PYTHONPATH to your Conda environment's site-packages

export PYTHONPATH=/path/to/miniconda3/envs/your-env/lib/pythonX.Y/site-packages

About

Learn the model of a feasibility margin based on the Improved Feasible Region

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.8%
  • Other 0.2%