optimization objectives / parameters

Nov 10, 2016 at 10:16 PM
I am trying to create a new plan with the exact same optimization objectives as a previous plan.

I can access the objectives and parameters of the old plan, but am having trouble extracting the information because each objective/parameter is a particular type inherited type of the objective (i.e. an NTO objective, a point objective, etc.).

And, it seems one can only add a newly created objective - there is no copy constructor and/or bulk assignment operator. So, I am trying to 'type match' the inherited objectives from the old plan to use their data to create new objectives for the new plan.

Does this seem like the correct approach? I can provide a code snippet, if needed.
Dec 4, 2016 at 7:23 PM
Yes, that does seem to be the correct approach. There's no Clone() method either, so I believe comparing types and casting is the way to go.