Skip to content

Commit 2efecb0

Browse files
authored
Merge pull request #351 from pariterre/SymbolicPenalty
Major refactor of the whole code
2 parents 7b0902a + e1f4011 commit 2efecb0

File tree

92 files changed

+3485
-4498
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

92 files changed

+3485
-4498
lines changed

.appveyor.yml

Lines changed: 24 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# Build worker image (VM template)
66
image:
77
- Ubuntu2004
8-
# - Visual Studio 2019
8+
- Visual Studio 2019
99
- macos
1010

1111
# set clone depth
@@ -16,43 +16,42 @@ build: off
1616

1717
# scripts that run after cloning repository
1818
install:
19-
- if [[ "$CI_LINUX" == true ]]; then
20-
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
21-
bash miniconda.sh -b -p $HOME/miniconda;
22-
else
23-
curl https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -L -o miniconda.sh;
24-
bash miniconda.sh -b -p $HOME/miniconda;
25-
fi
26-
- export PATH="$HOME/miniconda/bin:$PATH"
27-
- hash -r
19+
- sh: if [[ $CI_LINUX == true ]]; then wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh; bash miniconda.sh -b -p $HOME/miniconda; export PATH="$HOME/miniconda/bin:$PATH"; else curl https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -L -o miniconda.sh; bash miniconda.sh -b -p $HOME/miniconda; export PATH="$HOME/miniconda/bin:$PATH"; fi
20+
- sh: hash -r
21+
- sh: source activate
22+
- cmd: SET MINICONDA_PATH="C:\\Miniconda38-x64"
23+
- cmd: SET PATH=%MINICONDA_PATH%;%MINICONDA_PATH%"\\Scripts";%PATH%
24+
- cmd: conda init cmd.exe
2825
- conda config --set always_yes yes --set changeps1 no
2926
- conda config --set auto_update_conda no
3027
- conda update -q conda
31-
- source activate
28+
29+
# Set environment variables
30+
- sh: BIOPTIM_FOLDER=`pwd`
31+
- cmd: SET BIOPTIM_FOLDER=%cd%
32+
33+
# Setup the conda environment
3234
- conda env update -n bioptim -f environment.yml
3335
- conda activate bioptim
3436
- conda install pytest-cov black pytest pytest-cov codecov -cconda-forge
35-
- conda install xorg-libx11 xorg-libxtst -cconda-forge
37+
- sh: if [[ $CI_LINUX == true ]]; then conda install xorg-libx11 xorg-libxtst -cconda-forge; fi
3638
- conda list
39+
40+
# Install ACADOS on LINUX and MAC
3741
- cd external
38-
- if [[ "$CI_LINUX" == true ]]; then
39-
./acados_install_linux.sh;
40-
else
41-
./acados_install_mac.sh;
42-
fi
42+
- sh: if [[ $CI_LINUX == true ]]; then ./acados_install_linux.sh; else ./acados_install_mac.sh; fi
4343
- cd ..
44-
44+
4545
# to run your custom scripts instead of automatic tests
4646
test_script:
47-
- bioptim_folder=`pwd`
48-
- if [[ "$CI_LINUX" == true ]]; then
49-
black . -l120 --exclude "external/*" --check;
50-
fi
47+
- sh: if [[ $CI_LINUX == true ]]; then black . -l120 --exclude "external/*" --check; fi
5148
- pytest -v --color=yes --cov-report term-missing --cov=bioptim tests
5249
- python setup.py install
53-
- cd
50+
- sh: cd
51+
- cmd: cd C:/
5452
- python -c "import bioptim"
55-
- cd $bioptim_folder
53+
- sh: cd $BIOPTIM_FOLDER
54+
- cmd: cd %BIOPTIM_FOLDER%
5655

5756

5857
#---------------------------------#
@@ -61,8 +60,5 @@ test_script:
6160

6261
# on successful build
6362
on_success:
64-
- if [[ "$CI_LINUX" == true ]]; then
65-
codecov;
66-
fi
67-
63+
- sh: if [[ $CI_LINUX == true ]]; then codecov; fi
6864

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ Please note that this tutorial is designed to recreate the `examples/getting_sta
211211
## The import
212212
We won't spend time explaining the import, since every one of them will be explained in details later, and that it is pretty straightforward anyway.
213213
```python
214-
import biorbd
214+
import biorbd_casadi as biorbd
215215
from bioptim import (
216216
OptimalControlProgram,
217217
DynamicsFcn,
@@ -339,7 +339,7 @@ You will find that the file is a bit different from the `example/getting_started
339339

340340
### The pendulum.py file
341341
```python
342-
import biorbd
342+
import biorbd_casadi as biorbd
343343
from bioptim import (
344344
OptimalControlProgram,
345345
DynamicsFcn,

bioptim/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,11 +148,12 @@
148148
from .dynamics.configure_problem import ConfigureProblem, DynamicsFcn, DynamicsList, Dynamics
149149
from .dynamics.dynamics_functions import DynamicsFunctions
150150
from .dynamics.ode_solver import OdeSolver
151+
from .interfaces.biorbd_interface import BiorbdInterface
151152
from .limits.constraints import ConstraintFcn, ConstraintList, Constraint
152153
from .limits.phase_transition import PhaseTransitionFcn, PhaseTransitionList
153154
from .limits.objective_functions import ObjectiveFcn, ObjectiveList, Objective
154155
from .limits.path_conditions import BoundsList, Bounds, InitialGuessList, InitialGuess, QAndQDotBounds
155-
from .limits.penalty_node import PenaltyNode
156+
from .limits.penalty_node import PenaltyNode, PenaltyNodeList
156157
from .misc.enums import Axis, Node, InterpolationType, PlotType, Solver, ControlType, CostType, Shooting
157158
from .misc.mapping import BiMappingList, BiMapping, Mapping
158159
from .optimization.non_linear_program import NonLinearProgram

0 commit comments

Comments
 (0)