Skip to content
This repository has been archived by the owner on Jun 1, 2023. It is now read-only.

User-input initial guess with getInitialGuessWithUserData() #166

Open
qchen-07 opened this issue May 24, 2023 · 0 comments
Open

User-input initial guess with getInitialGuessWithUserData() #166

qchen-07 opened this issue May 24, 2023 · 0 comments

Comments

@qchen-07
Copy link

The getInitialGuess() does not reliably provide a feasible solution to my optimal control problem, and I would like to specify a feasible solution to my optimal control problem as the initial guess. I tried the following but get stuck when calling getInitialGuessWithUserData.m:

  1. Create my Problem ocp
  2. Get an initial guess: sol_ig=ocp.getInitialGuess();
  3. General a feasible control and the corresponding paths of the states, and Initialize the InitialGuess in ocp by calling ocp.initialize(...)
  4. General the feasible initial guess by: sol_igf = getInitialGuessWithUserData(sol_ig, ocp.stage, ocp.solver.collocationList{1})

It seems that there is a syntax error with the first argument of getInitialGuessWithUserData(). Any advice on this? Or are there examples to show how to specify a solution as the initial guess to my optimal control problem? Thanks!

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

No branches or pull requests

1 participant