Skip to content

Releases: OpenMDAO/dymos

Dymos 1.12.0

02 Oct 16:19
37b96dd
Compare
Choose a tag to compare

Release Notes for Dymos 1.12.0

Oct 02, 2024

Dymos 1.12.0 primarily supports the updated paths to OpenMDAO output files in the OpenMDAO 3.35.0 release.

The Birkhoff transcription can involve extraordinarily long segments with hundreds of nodes. The lagrange polynomial interpolation algorith used with shorter segments is inefficient in this case and is replaced (for simulation) by
the use of cubic splines from scipy.interpolate. This provides fast interpolation that's accurate enough for simulation,
when derivatives are not needed.

The SolveIVP transcription, which has long been deprecated in favor of the more general and derivative-capable ExplicitShooting transcription, is removed.

Backwards Incompatible API Changes & Deprecations

  • Removed SolveIVP and removed dead code from TranscriptionBase #1104

Enhancements

  • bokeh timeseries plots now comply with OpenMDAO's placement of recorder files. #1106
  • Faster interpolation for explicit shooting #1109

Miscellaneous

  • Added readme to pyproject.toml #1094
  • Reduced the memory allocation in the TimeseriesOutputComp in common use cases. #1096
  • Timeseries report tooltip hover change. #1098
  • Removed need for copy_build_artifacts in the doc build process. #1100
  • Removed use of newshape keyword argument from numpy reshape calls. #1102
  • Added a pre-commit configuration to enable automatic linting with ruff #1105
  • Added the Gong challenge problem benchmark for Birkhoff transcription. #1108
  • Updated GitHub Workflows #1111

Dymos 1.11.0

08 Aug 18:04
ec59282
Compare
Choose a tag to compare

Release Notes for Dymos 1.11.0

August 08, 2024

Dymos 1.11.0 includes the initial implementation of the Birkhoff transcription and a number of other significant improvements. These improvements have focused on the ability to the user to switch transcriptions or control types with a minimal change to their scripts.

Unification of controls and polynomial controls

The separate APIs for controls and polynomial controls are no more, in favor of the set_control_options or add_control methods that can be used to either add a standard "fully collocated" control or a "polynomial" control. Methods set_polynomial_control_options and add_polynomial_control are deprecated.

set_time_val, set_state_val, set_control_val, and set_parameter_val

The Birkhoff transcription is significantly different from the Gauss-Lobatto and Radau transcriptions in that it requires the estimated state rate, the initial state value, and the final state value to be additional design variables. This information is redundant from the user's perspective, but provides the Birkhoff method with some greater degree of robustness.

To remove the need to provide these extra values when using the Birkhoff transcription, the set_state_val method on phase will automatically populate them based upon the interpolated values of the state in the phase. To make the dymos API consistent, similar methods are added for set_time_val, set_control_val, and set_parameter_val.

integ_var_options and set_integ_var_options

For cases when the integration variable is not time, the notion of using phase.time_options and phase.set_time_options can be confusing.
For this reason, phase.integ_var_options and phase.set_integ_var_options have been added as alias to phase.time_options and phase.set_time_options, respectively.

Backwards Incompatible API Changes & Deprecations

  • set_polynomial_control_options and phase.poylnomial_control_options are deprecated in favor of the common use of phase.set_control_options and phase.control_options where an order for the control is specified if it is a polynomial control.

Enhancements

  • Changed phase default NonlinearSolver to have a maxiter of 100. #1034
  • Updated GitHub workflow to use only the conda-forge channel for dependencies #1036
  • Some Birkhoff constraints are now treated as linear. #1043
  • Use sparse partials for the Birkhoff state residuals when OpenMDAO bug is fixed. #1055
  • Use Barycentric Lagrange Interpolation for controls in Simulation #1056
  • Changed oldest support python to 3.9 #1067
  • API Change for setting values #1072
  • Unify controls and polynomial controls #1078
  • Added optional integ_var_options for time_options when the integration variable is not time. #1079
  • Updated phase.load_case so that it uses the state_xxx_vals API. Specify parent when subproblems are used. #1087
  • Added Birkhoff Docs #1088

Bug Fixes

  • Fixed a bug that was causing trajectory result reports not to be displayed in the documentation. #1032
  • Fixed an issue where matplotlib was not required to install dymos without specifications but would fail to import. #1035
  • Fixed an issue with timeseries reports and the Birkhoff transcription. #1040
  • Fixed issue with running trajectory timeseries report under MPI #1046
  • Fix for test failure in test_error_estimation.py #1047
  • Fixed matplotlib calls that were broken by a change in the matplotlib API #1070
  • Fixed a logic issue in Birkhoff timeseries outputs. #1071
  • Fixed a bug where timeserires report use of fig.circle instead of fig.scatter stopped working in Bokeh 3.4. #1073
  • Replace deprecated numpy function in1d() with isin() #1081
  • Stopped coloring plots popping up during tests #1082
  • Fixed bug that caused aviary CI failure. #1083

Miscellaneous

  • Replaced setup.py with pyproject.toml using hatchling backend #1052
  • Minor spelling fixes #1053
  • Added inline directive to notebooks that use matplotlib #1054
  • Make docs link correctly formatted #1059
  • Added skip to handle tests that need matplotlib and/or pydocstyle when not installed #1062
  • Modified latest workflow build to use petsc 3.21.0 #1064

Dymos 1.10.0

08 Dec 18:58
a1e5e21
Compare
Choose a tag to compare

Release Notes for Dymos 1.10.0

December 08, 2023

Dymos 1.10.0 includes a few performance improvements, more user-configurability of automatic solver placement, and a still-experimental implementation of the Birkhoff transcription.

Thanks to Shugo Kaneko for pointing out some issues with using dymos under MPI.
Timeseries jacobians were inefficient and used excessive memory when operating on a single system under MPI.
Also, the user now has more control over how solvers are added when necessary. Previously, the presence of a DirectSolver over a distributed system was causing an error.

Trajectory now has a parallel_phases option. When True (the default), the top level Trajectory.phases container will be an OpenMDAO ParallelGroup. Setting it to False makes Trajectory.phases a standard serial OpenMDAO.api.Group object.

Trajectory and Phase now both have an auto_solvers option. It is enabled by default and will result in appropriate nonlinear and linear solvers being placed when it is True.
Trajectory.phases needs a nonlinear solver when running phases in parallel under MPI AND the phases are directly connected.
Phases need a solver when there is implicit behavior due to a duration balance or the use of solve_segments is pseudospectral phases.

Backwards Incompatible API Changes & Deprecations

  • None

Enhancements

  • Reduce memory usage for timeseries jac computation #1001
  • Added Birkhoff Transcription (this feature is still somewhat experimental) #1008 #1010 #1021

Bug Fixes

  • Fixed python 3.12 compatibility issues. #1004
  • Fixed load_case logic to correctly handle negative-duration phases #1007
  • Boundary constraints in Birkhoff transcription changed to pull from boundary ODE #1018
  • Fixed an issue where applying DirectSolver to StateIndependentsComp was breaking when used with other linear solvers under MPI. #1020
  • Fixed Vanderpol example under updated OpenMDAO MPI operation. #1023

Miscellaneous

  • Added a job without MPI to the test workflow #998
  • Removed redundant implementations of timeseries output components. #1005
  • Remove IVCs from control groups #1013

Dymos 1.9.1

14 Sep 17:52
5801ff6
Compare
Choose a tag to compare

Release Notes for Dymos 1.9.1

September 14, 2023

Dymos 1.9.1 fixes a few bugs introduced in 1.9.0.
For problems in which phases are directly connected, the total derivatives
could be wrong in some cases due to the lack of a linear solver covering
the initial value defect. Also, control rates were showing up in timeseries
outputs by default. Now, as expected, they must be requested explicitly
as a timeseries output.

Backwards Incompatible API Changes & Deprecations

  • None

Enhancements

  • None

Bug Fixes

  • Added linear solver for cases where states solved via optimizer have input_initial=True. #991
  • Fixed an issue where control rate values are showing up in timeseries outputs by default. #987

Miscellaneous

  • Minor tweaks to the github issue templates. #985 #993

Dymos 1.9.0

07 Sep 12:20
82f2479
Compare
Choose a tag to compare

Release Notes for Dymos 1.9.0

September 07, 2023

Dymos 1.9.0 changes the default timeseries behavior so that state rates,
control rates, and t_phase are not included by default. These values tended
to clutter the timeseries plots on more complex problems.

A new add_duration_balance method is added to phases that allows the final time
of a phase to be found with a solver without the need for an optimizer. This is useful
for explicit shooting phases which are effectively just simulating out the dynamics
until some target condition is achieved. An example of this behavior is available in the docs.

Trajectory parameters are improved. Parameters can now have a mix of static and dynamic targets, which was not possible before.
Also, trajectories will now use variable data obtained by introspection in the phases for
setting properties of trajectory-level parameters.

The behavior of some scipy.sparse routines was changed in 1.11 and caused incorrect derivatives.
This has been addressed.

Dymos had previously been calling allgather excessively under MPI which could
cause performance issues during setup.

Finally, Trajectory.simulate() should now work correctly under MPI so that results can
be checked with explicit integration when working under MPI.

Backwards Incompatible API Changes & Deprecations

  • Remove state rates, control rates, and t_phase from the timeseries by default, and remove type prefix. #935

Enhancements

  • Remove state rates, control rates, and t_phase from the timeseries by default, and remove type prefix. #935
  • Implicit duration #939
  • Updated dymos to utilize new OpenMDAO load_case capability. #954
  • Updated parameter introspection and traj parameters #964
  • Allow parameter shape to be given as None, rather than just _unspecified #970

Bug Fixes

  • Fixed an error message that gave outdated instructions solve segments #930
  • Fixed a Trajectory.simulate method specification bug #931
  • Fixed issue where optimal trajectory parameters would also attempt to make corresponding phase parameter a design variable. #938
  • Fixed issue where "connected" could not be used when linking all variables of a phase #942
  • Fixed issues with scipy sparse storage in scipy 1.11 #943
  • Fixed an issue where grid refinement tests were still expecting some things to be in the timeseries. #946
  • Fixed openmdao warning messages. #950
  • Fixed timeseries plots under MPI so that all phases show up. #959
  • Fixed an MPI slowdown introduced by parameter introspection at the Trajectory level. #977
  • Fixed some issues that were causing simulation to fail under MPI. #978
  • Fixed an issue where dymos calling excessive allgathers during setup. #980
  • Fixed an issue where a DirectSolver was automatically added to a phase if any state has input_initial=True. #982

Miscellaneous

  • Changed all uses of the deprecated 'value' keyword to 'val' #926
  • Bump to next dev cycle version #927
  • Updated the GitHub workflow to test with '[all]' extra dependencies #929
  • Fixed out-of-order systems in some tests #941
  • Refactored time_extents away in favor of housing extents in param_comp #952
  • Set defect_scaler values to 1.0 in finite_burn_orbit_raise problem #953
  • Fixed a couple PEP8 failures #961
  • Added various phase options dictionaries to the API documentation. #956
  • Updated GitHub workflow to upload documentation to web site #965
  • Minor doc fix #967
  • Slight changes to scaling in the water rocket example. #969
  • Updated baseline test to use Numpy version 1.22.4 #975

Dymos 1.8.0

18 Apr 15:48
6cec128
Compare
Choose a tag to compare

Release Notes for Dymos 1.8.0

April 18, 2023

Dymos 1.8.0 removes some deprecated OpenMDAO features that are removed as of version 3.26.0.
It also adds a new trajectory results report that is generated by dymos.run_problem(..., make_plots=True).
This single HTML file contains summaries of the parameters in each phase as well as plots of the timeseries values
across phases in each trajectory.
Generating this file requires bokeh rather than matplotlib - a message in the HTML file will inform the user if bokeh
was unavailable.
ExplicitShooting is now consistent with solve_segments in the way initial state values are specified.
This release also provides better logic when connecting variables of different units via phase linkages.

Backwards Incompatible API Changes & Deprecations

  • Remove deprecated src_indices argument in add_parameter() #920
  • Initial states in ExplicitShooting now provided with phase_path.initial_states:state_name #915

Enhancements

  • trajectory results report now automatically generated by run_problem #918

Bug Fixes

  • Added better logic to detect different units across linkage constraints. #913

Miscellaneous

  • Documentation fixes #906
  • Cleaned up GitHub workflows #907
  • Minor changes focused on plotting utility #908
  • Documentation fixes #909
  • Replaced deprecated 'value' keyword with 'val' #910
  • Fixed missing component in Re-entry docs #914

Dymos 1.7.0

09 Feb 20:26
203c098
Compare
Choose a tag to compare

Release Notes for Dymos 1.7.0

February 09, 2023

Version 1.7.0 contains some significant enhancements to its capabilities.

Major improvements include:

  • Users may now specify boundary constraints, path constraints, and the objective within a phase as expressions. These expressions must contain an equals sign and must be complex-step-safe. This allows the user to impose constraints or objectives on quantities that may not be computed by the given equations of motion model.
  • The user can now rename the time variable. Integration with respect to another variable (such as range for an aircraft) has always been possible, but dymos still always called the variable "time". Now, it will be more clear.
  • The ExplicitShooting transcription has been reworked to include a continuous adjoint for derivatives and uses the stock scipy.integrate.solve_ivp integrators to perform the actual integraiton. Note that this method may result in inaccurate derivatives when the time step varies widely thoughout an integration. (We're working on that part).
  • Imposing rate2 continuity on controls would previously generate confusing errors with some optimizers like SLSQP. If the polynomial order of the control representation was quadratic, then the second derivative would always be zero. Continuity was thus guaranteed, but SLSQP would fail because it lacked the ability to affect that continuity despite it always being satisfied. Now Dymos will only respect control rate2 continuity across segment junctions if it can affect continuity at the segment junction.
  • The run_problem method now includes a sanity check on time bounds. If it detects that the linkage constraints between two phases in time cannot be satisfied due to initial time and duration bounds on all previous phases, a warning will be raised.

Backwards Incompatible API Changes & Deprecations

  • Deprecated Trajectory.add_linkage_constraint arguments sign_a and sign_b #888
  • Deprecated SolveIVP transcription. The simulate method now uses the ExplicitShooting transcription without derivatives. #898

Enhancements

  • Added ability to control continuity scaling for states and controls. #866
  • Parameter flow added to linkage report diagram #873
  • Added ability to allow the user to change the name of the integration variable. #874
  • Added ability to add expressions as constraints #875
  • Added the derivative of speed of sound wrt altitude as an output #879
  • Phase objectives may now be given as expressions. #880
  • Interim continuous-adjoint shooting implementation #885
  • Replaced existing ExplicitShooting instance with the continuous-adjoint Implementation #891
  • Selectively apply rate2 continuity to indices where it can be impacted. #896
  • Raise an exception if the initial time of a phase is unreachable #899

Bug Fixes

  • Fixed load_case when a phase does not exist in the case. #863
  • Fixed url in _config.yml so that documentation examples can open at the Google colab. #868
  • Fixed dymos.load_case so that it does not load states or controls into AnalyticPhases #871
  • Fixed an unnecessary error when linking phases with different units via connection. #872
  • Handle parameter names containing colons in Dymos linkage report #900

Miscellaneous

  • Fixed broken image links in the water rocket example in the documentation. #902

Dymos 1.6.1

14 Nov 17:49
75d0311
Compare
Choose a tag to compare

Release Notes for Dymos 1.6.1

November 14, 2022

Version 1.6.1 of Dymos addresses bugs described below.

This release also includes the start of an implementation to allow calculated expressions to be used as
constraints and timeseries outputs, but this feature is still undergoing development and documentation.

Backwards Incompatible API Changes & Deprecations

None

Enhancements

  • Added the ability to include calculation expressions in timeseries outputs. This feature is still undergoing development and is not supported as of this release. #846
  • Added ability to specify constraint metadata (scaler, ref, linear, etc) when calling link_phases. #858

Bug Fixes

  • Fixed a bug in polynomial controls and rates were included in timeseries outputs for ExplicitShooting. #840
  • Fixed an interpolation issue where scipy now requires unique x-axis values. #842
  • Added a better error message when time units are None and state rate introspection fails to find valid state units based on state rate units. #851
  • Fixed an issue that was causing states not to show up in the timeseries outputs for AnalyticPhase. #853
  • Fixed a bug that was causing errors when phase linkages involved parameters. #858

Miscellaneous

  • Various github workflow issues addressed due to changes in dependencies. #844 #849 #854

Dymos 1.6.0

17 Oct 18:14
5fe5d11
Compare
Choose a tag to compare

Release Notes for Dymos 1.6.0

October 17, 2022

Version 1.6.0 of Dymos implements many improvements since our last release.

The new AnalyticPhase is useful for when the state values are analytically known as functions of time and other parameters.
States are not only outputs and therefore values cannot be fixed or bounded, though they can be constrained with boundary and path constraints.
AnalyticPhase does not support controls (or polynomial controls).
Unlike other phase types which use the ODE solver in scipy.solve_ivp to propagate a trajectory based on the current control history, AnalyticPhase simply provides its outputs.
AnalyticPhase does not have a notion of segments.
Instead, it simply evaluates the value of the states at some set of N nodes, where N is given by the user and the node locations are the Legendre-Gauss-Lobatto nodes in non-dimensional phase time.

It will also be the last version of the code before we introduce more tailored phase classes that are more closely coupled to their transcription.
In the following 1.7.0 release, instantiating Phase will result in a deprecation warning and inform the user on how to change their phase instantiation calls.

Dymos now automatically generates a linkage report html file when appropriate.
This report looks similar to the N2, and helps to visualize the continuity of variables across phases within a trajectory.

Other changes include a significant cleanup of the timeseries output code, allowing users to rename states/controls/etc. in the timeseries outputs as they see fit.
Timeseries can now also provide approximate rates of outputs (based on fitting them on the current grid and interpolating the derivative of the resulting polynomial).
In an upcoming release, the user will be able to easily apply constraints to these approximated rates.

Backwards Incompatible API Changes & Deprecations

  • State option connected_initial is deprecated in favor of input_initial. This is more in-line with the time option, and reflects the fact that there's no requirement that the user actually connect to the value.
  • The Lagrange interpolation and differentiation matrices are now generated much more efficiently, but change in the order of operations may result in small numerical differences in interpolatation of states and controls (generally on the order of 1E-12).

Enhancements

  • Refactored TimeComp to avoid unnecessary recalculation of partials. #759
  • Added a new N2-like linkage report to show continuity of variables between phases. #764
  • Added timeseries rates for pseudospectral transcriptions. #781
  • Trajectory.phases subgroup is now available before setup. #782
  • Changed time series plots directory to be under the problem reports directory. #784
  • run_problem argument restart now allows a specific Case to be provided. #801
  • Added warning when restarting with fix_final=True. #804
  • Added the classic cart-pole example problem - thank you @kanekosh! #808
  • Updated assert_timeseries_near_equal to work with more general cases #810
  • Refactored the timeseries handling to be more general and less transcription-specific. #816
  • Added AnalyticPhase for phases in which no numerical integration is necessary. #833

Bug Fixes

  • Fixed an error when an invalid rate source is provided for a state. #761
  • Fixed a bug in size of trajectory parameters as passed to phases. #770
  • Minor changes to fix occasional report testing failures. #785
  • Fixed example code impacted by matplotlib change #826
  • Fixed condition under which trajectory linkage reports are generated. #828
  • Fixed issue in reentry example that was causing optimization to fail under SLSQP. #831

Miscellaneous

  • Updated optimizer settings to improve convergence of the racecar example. #752
  • Changed setup to use setuptools instead of distutils. #757
  • Changes to use OpenMDAOs updated report system. #763
  • Updated github workflow and setup.py. #768
  • Switched to using mamba in CI workflow due to issues with conda. #772
  • Updated optimizer settings to improve convergence of two-burn orbit raise example. #775
  • Cleaned up error message from assert_cases_equal test utility a bit. #779
  • Cleaned up CI and testing. #788
  • Fixed two problems with the linkage report test #793
  • Updated pyoptsparse build in github workflows #805
  • Added small changes to improve coverage. #809
  • Fixed CI dependency issues based on some broken jupyter-book dependencies. #812
  • Various code cleanup items added. #807
  • Made a few minor cleanups for the cartpole example. #815

Dymos 1.5.0

05 May 13:29
770c12c
Compare
Choose a tag to compare

Release Notes for Dymos 1.5.0

May 05, 2022

This is version 1.5.0 of Dymos.

This version adds better support for OpenMDAO's automatic generation of reports.
Sub-problems, used to wrap ODEs for simulation or the ExplicitShooting transcription, will no longer generate problem reports by default.

Phase parameters have been refactored so that they are always available as an input (path.to.phase.parameters:{param_name}) and an output (path.to.phase.parameter_vals:{param_name}). This should make connecting parameters to downstream models more intuitive since the user is no longer required to do so via promotion. We also fixed some instances where Dymos would not detect invalid targets for parameters in some situations. This may detect issues in existing models that were previously undetected by Dymos.

The model for providing the 1976 standard atmosphere, USatm1976Comp, was originally intended to support some tests in Dymos but over time has been used by other projects. It has been changed such that it can accept either geodetic or geopotential altitude as input. The default is currently geopotential input (no transformation is performed on the altitude before interpolating the atmosphere table). In the future this will likely change to geodetic, since it's more likely to be the intent of the user that the provided altitude is geodetic. This will result in a minor change in the interpolated atmospheric properties, especially at higher altitudes, but we've found it to have only minor impact on results of several cases.

Several enhancements and bug fixes have been performed regarding constraints. The recent constraint aliasing update in OpenMDAO allows us to apply separate constraints to different indices of the same variables, meaning that we can apply path and boundary constraints directly to the timeseries outputs and no longer need separate pass-thru components to handle them. Also, importantly, all boundary constraints and path constraints are currently marked as nonlinear. Dymos previously attempted to determine when constraints could potentially be linear, but it's difficult to know the linearity of inputs from outside the trajectory or phase. The logic to determine this was starting to get quite complex, so we decided to remove it entirely for now. If the user is 100% certain that a boundary constraint or path constraint can validly be treated as linear, then the linear=True argument can be added to add_boundary_constraint or add_path_constraint. Just note that this WILL cause the failure of the optimization if the constraint output is not actually a linear function of the design variables. This assumption of non-linearity also works around some issues we were seeing with the way OpenMAO and pyOptSparse handle linear constraints with nonzero y-intercepts.
This assumption of nonlinearity in boundary and path constraints may cause some models to have different convergence behavior and we welcome feedback if you experience problems due to this.

Enhancements

  • Users can now pass simulate_kwargs from dymos.run_problem. #720
  • Added set_parameter_options method to Trajectory for better API consistency. #721
  • USatm1976Comp now accepts altitude as either geopotential or geodetic. #735
  • Disabled reports by default for subproblems under simulate and ExplicitShooting. #741
  • Constraints are now applied directly to timeseries outputs, and several other constraint improvements. #743

Bug Fixes

  • Fixed a bug that caused a hang when running the constraint report on MPI. #731
  • Fixed a bug where trajectory parameters with no valid target will not flag an error. #744

Miscellaneous

  • Fixed plots on several of the documentation examples. #709
  • Added an example of using OpenMDAO's FunctionComp API for an ODE. #710
  • Cleanup of the configuration/introspection stack. #713
  • Reuse the OpenMDAO _ReprClass for _unspecified to deal with some issues with MPI operation. #724
  • Added workflow_dispatch trigger on github so Dymos tests can be triggered by OpenMDAO pull requests. #732 #736
  • Fixed an incorrect equation in the documentation of the calculation of flight path angle. #734