Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Long setup times for dymos model #892

Open
caksland opened this issue Jan 19, 2023 · 1 comment
Open

Long setup times for dymos model #892

caksland opened this issue Jan 19, 2023 · 1 comment

Comments

@caksland
Copy link

caksland commented Jan 19, 2023

Task Description

This is a follow up to the stack exchange post here: https://stackoverflow.com/questions/75129083/can-i-add-or-remove-design-variables-from-a-problem-after-setup-call

The model (repo here) has an extremely long setup time that is strongly dependent on the number of nodes in the Dymos problem. The readme and stack exchange fully describes the issue. The contents of the readme is posted below. Any recommendations to address this issue would be appreciated. Thanks!

README Contents:
This model is used to design a flow system. Currently, the code doesn't
optimize any control or parameters values. It only converges the
ODE dynamics. Run: OptLQRModel.py.

The setup times are really long and strongly dependent on the number of nodes
in the phase nn. eg. when nn=5, the setup time is about ~7s. when nn=20, the
setup time inceasese to ~150s.
The majority of the setup time happens when
transcription.configure_timeseries_outputs(self) is called in phase.py
configure(self) function (149 of the 150s when nn=20)

Package versions:
dymos 1.2.0
openmdao 3.16.0

NOTE 1. there is a manual bug fix that is required for the code to run.
in trajectory.py, the add_parameter() function definition needs to
specify None units as default:
e.g.
def add_parameter(self, name, units=None, val=_unspecified, desc=_unspecified, opt=False,

NOTE 2. I've also run the code in the latest version of dymos and openmdao
dymos 1.6.1
openmdao 3.23.0
and the setup time is still slow. However, the optimization does not complete.

@robfalck robfalck removed their assignment Jul 6, 2023
@robfalck
Copy link
Contributor

robfalck commented Sep 7, 2023

I strongly suspect this is caused by automatic report generation in OpenMDAO. Initializing the Problem instance with reports=False will likely resolve this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants