Skip to content

Latest commit

 

History

History
162 lines (104 loc) · 4.66 KB

README.md

File metadata and controls

162 lines (104 loc) · 4.66 KB

Bioptim GUI

Bioptim GUI is a graphical interface to use bioptim. It helps users to generate python script to solve Optimal Control Problems (OCP).

Bioptim GUI also offers an interface to generate code for solving trampoline acrobatics OCP. It allows you to choose the number of somersault, the half-twists in each somersault, the position (straight, pike, tuck) and much more.

This guide will help you set up and run the Bioptim GUI application using Docker Compose and how to run it from source.

Status

Type Status
Code coverage codecov
Code climate

Running Bioptim GUI on Linux(Ubuntu) with Docker Compose

Prerequisites

Steps

Allow X Server connections

Allow Docker to access your X Server by executing the following command in your terminal: This allows the graphical interface to show up on your screen.

xhost +local:docker

Getting the app files

  • Clone the repository:
git clone https://github.com/Erdnaxela3/bioptim_gui.git
  • Navigate to the project directory:
cd bioptim-gui

Downloading 'ma57' solver

The linear solvers from the HSL Mathematical Software Library with install instructions here.

  • copy libgfortran.so.4 and libhsl.so inside bioptim_gui/gui

Note

You will not be able to run code inside the GUI without the solver.

Building the application (first time)

docker-compose build

Run the application

  • Run the application using Docker Compose:
docker-compose up

Stopping the application

To stop the application, press Ctrl + C in the terminal where docker-compose up is running.

Notes

  • The application may take some time to start up.
  • Ensure the X Server is running before executing docker-compose up.
  • default .bioMod are provided. Users can add more models inside bioptim_gui/models, but this will necessit re-building the application.

Running without Docker Compose and developping

Prerequisites

To create a bioptim environment:

Optional, use libmamba solver to quicken the process:

conda install -n base conda-libmamba-solver
conda config --set solver libmamba
git clone https://github.com/pyomeca/bioptim.git
cd bioptim
git checkout a3ede0e7921df909fcdf1fb92d536628594dba04
conda env create -f environment.yml
conda activate bioptim
python setup install

Downloading 'ma57' solver

The linear solvers from the HSL Mathematical Software Library with install instructions here. The solvers will be needed in order to run the generated code.

Copy libgfortran.so.4 and libhsl.so in your bioptim env:

For anaconda3, it should be:

cp libfortran.so.4 ~/anaconda3/envs/bioptim/lib/
cp libhsl.so ~/anaconda3/envs/bioptim/lib/

If this didn't work, find your bioptim env path:

conda activate bioptim
which python

Clone the repo

  • Clone the bioptim GUI repository:
git clone https://github.com/Erdnaxela3/bioptim_gui.git
cd bioptim_gui

Running the API

  • Install the dependencies
cd api
pip install -r requirements.txt
uvicorn bioptim_gui_api.main:app --reload 

Documentation

Bioptim GUI API should now be accessible at http://localhost:8000 in your web browser. Documentation on API is available at http://localhost:8000/docs

Running the GUI

  • In another terminal
cd gui
flutter run