I am wondering if it is possible to handle problems where a boundary constraint is dependent on a parameter that can be changed by the optimizer. I have model of a multistage rocket and I can optimize the trajectory and certain parameters like for example, thrust for a given stage. However, let's say I want to also make the actual stage masses parameters (subject to constraint that they all add up to a constant). I have certain boundary constraints in my model that depend on mass -- one phase representing one stage ends when propellant mass burned is equal to propellant load, and that's encoded as boundary constraint. So the actual constraint itself would vary based on how the parameter of that stages mass is changed by the optimizer. Also, the phase linking that happens between stages, phases representing rocket stages, requires me to add a linkage constraint in the form
traj.add_linkage_constraint('stage_1', 'stage_2', equals=stage_1_dry_mass)
in order to represent jettisoning the first stage empty mass. So that jettison mass is predetermined, and can't be changed as a parameter that gets optimized.
Is there a way to handle this in Dymos? I think I may be able to reformulate the problem in terms of fractions but haven't thought it through yet, and I have feeling the phase linkage would still be a problem.