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

Unrecognized field name #55

Open
coltbk opened this issue May 31, 2023 · 1 comment
Open

Unrecognized field name #55

coltbk opened this issue May 31, 2023 · 1 comment

Comments

@coltbk
Copy link

coltbk commented May 31, 2023

I've just cloned the repository and tried running a few of the demos, but I keep getting the following error:

WARNING: options.nlpOpt.GradConstr is not a valid option
WARNING: options.nlpOpt.GradObj is not a valid option
WARNING: options.nlpOpt.DerivativeCheck is not a valid option
WARNING: options.nlpOpt.GradConstr is not a valid option
WARNING: options.nlpOpt.GradObj is not a valid option
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Running OptimTraj, iteration 1
  -> Transcription via trapezoid method, nGrid = 10
Unrecognized field name "GradObj".

Error in directCollocation (line 26)
flagGradObj = strcmp(Opt.nlpOpt.GradObj,'on');

Error in trapezoid (line 74)
    soln = directCollocation(problem);

Error in optimTraj (line 180)
            soln(iter) = trapezoid(P);

Error in MAIN (line 167)
soln = optimTraj(problem);

That's specifically the printout from the gradientsTutorial.
I've checked that problem.options(1).nlpOpt.GradObj is set to on before being passed from Main.m > optimTraj.m > trapezoid.m > directCollocation.m. I also haven't modified the files in any way. I just opened Main.m in the demo folder and hit run. Is anyone else experiencing this or am I missing something?

@beijiguang94
Copy link

The error and the above Warning should not appear because GradConstr etc. is added to options.nlpOpt by the optimset function in either Line 62, 68, or 74 in 'getDefaultOptions.m'. Thus, Line 87 should not be executed which will give the Warning information. Instead, Line 89 should be executed in terms of options GradConstr, etc.

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