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.
Type | Status |
---|---|
Code coverage | |
Code climate |
- Docker Desktop installed on your system (Install Docker)
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
- Clone the repository:
git clone https://github.com/Erdnaxela3/bioptim_gui.git
- Navigate to the project directory:
cd bioptim-gui
The linear solvers from the HSL Mathematical Software Library with install instructions here.
- copy libgfortran.so.4 and libhsl.so inside bioptim_gui/gui
You will not be able to run code inside the GUI without the solver.
docker-compose build
- Run the application using Docker Compose:
docker-compose up
To stop the application, press Ctrl + C
in the terminal where docker-compose up
is running.
- 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.
- Flutter installed.
- Python >=3.11.5 environment (using Anaconda3 or Miniconda3) with bioptim 3.1.0 installed.
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
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 bioptim GUI repository:
git clone https://github.com/Erdnaxela3/bioptim_gui.git
cd bioptim_gui
- Install the dependencies
cd api
pip install -r requirements.txt
uvicorn bioptim_gui_api.main:app --reload
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
- In another terminal
cd gui
flutter run