Skip to content

Commit

Permalink
Fixed an issue with implicit duration (#1140)
Browse files Browse the repository at this point in the history
* run workflows on Ubuntu 22.04

* handle jaxlib not found

* catch error installing jaxlib

* duration balance will now respect duration bounds if a bounds enforcing linesearch is used.
replaced problematic cannonball implicit case with an optimizer-free implementation of the brachistochrone problem.

As follow ons, we should:
1. enable the passing of various kwargs to the add_balance call for the duration balance.
2. replace the duration balance with a more general implementation that allows the use of parameters or initial/final states as implicit outputs.
3. reconsider the best way to add solvers to the phase.

* add missing jax install line to docs workflow

* Skipped a problematic test that is fixed by brets new coloring branch.

---------

Co-authored-by: swryan <[email protected]>
  • Loading branch information
robfalck and swryan authored Jan 15, 2025
1 parent efb22b7 commit cd45db9
Show file tree
Hide file tree
Showing 8 changed files with 523 additions and 468 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/dymos_docs_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ on:
jobs:

test_ubuntu:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04

timeout-minutes: 90

Expand Down Expand Up @@ -102,7 +102,12 @@ jobs:
echo "Install jax"
echo "============================================================="
if [[ "${{ matrix.JAX }}" == "latest" ]]; then
python -m pip install jaxlib jax
{
python -m pip install jaxlib
} || {
echo "Failed to install jaxlib..."
}
python -m pip install jax
else
python -m pip install jaxlib==${{ matrix.JAX }} jax==${{ matrix.JAX }}
fi
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/dymos_tests_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ run-name: ${{ inputs.run_name }}
jobs:

test_ubuntu:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04

timeout-minutes: 90

Expand Down Expand Up @@ -241,7 +241,12 @@ jobs:
echo "Install jax"
echo "============================================================="
if [[ "${{ matrix.JAX }}" == "latest" ]]; then
python -m pip install jaxlib jax
{
python -m pip install jaxlib
} || {
echo "Failed to install jaxlib..."
}
python -m pip install jax
else
python -m pip install jaxlib==${{ matrix.JAX }} jax==${{ matrix.JAX }}
fi
Expand Down
2 changes: 1 addition & 1 deletion docs/dymos_book/_toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ parts:
- file: examples/water_rocket/water_rocket
- file: examples/cart_pole/cart_pole
- file: examples/brachistochrone/brachistochrone_tandem_phases
- file: examples/cannonball_implicit_duration/cannonball_implicit_duration
- file: examples/implicit_duration/brachistochrone_implicit_duration
- caption: Feature Reference
chapters:
- file: features/phases/phases_list
Expand Down
Loading

0 comments on commit cd45db9

Please sign in to comment.