OpenMDAO / dymos

Open Source Optimization of Dynamic Multidisciplinary Systems
Apache License 2.0
210 stars 67 forks source link

Birkhoff design variables inferred values. #1042

Closed robfalck closed 5 months ago

robfalck commented 9 months ago

Proposed feature.

The Birkhoff transcription duplicates several inputs for the sake of improving the conditioning of the corresponding optimization problem.

X: state values at all nodes (including the initial and final nodes for the CGL and LGL grids) V: state rates at all nodes X_a: initial state values (duplicates the initial value in X for the CGL and LGL grids) X_b: final state values (duplicates the final value in X for the CGL and LGL grids)

Providing initial guesses for all of these values is something dymos should allow, but by default it should be able to infer guesses of some parameters given limited information.

Values of these variables should default to NaN, and then the guess_nonlinear method of the birkhoff iter group should set those values based on available information.

Example

Case 1: states provided, others missing.

set_val('phase.states:h', phase.interp('h', [0, 1])) sets the values of h by interpolating the given data (this is how dymos currently works.

If otherwise unprovided, phase.initial_states:h will assume the first value in the interpolation (0), and phase.final_states:h will assume the final value (1).

If otherwise unprovided, the lagrange differentiation matrix will be used to obtain the rates of h, in conjunction with the intitial guess of t_duration of the phase.

Case 2: states not provided, but initial and final states are

Dymos will linearly interpolate the initial and final states to obtain the value for states. In conjunction with t_duration, a constant rate of change from initial to final will be used to populate the state rates, unless otherwise provided.

Case 3: states not provided initial OR final provided.

A constant value for the state is assumed, and the state rate is zero unless otherwise provided.

robfalck commented 5 months ago

Closed by #1072