Menu

ADiGator + GPOPS-II: Problems with splines and fnval function

Help
2018-09-19
2018-09-20
  • Roger Pallares

    Roger Pallares - 2018-09-19

    Hello,

    I am trying to use ADiGator on my GPOPS-II implementation. However, when I run the code, the tool is not able to generate the derivatives of the continuous function. Running the "adigatorGenFiles4gpops2" function, this error appears:

    Error using fn2fm (line 53)
    Input is not a function.

    Error in fnval (line 52)
    f = fn2fm(f);

    Error in adigatortempfunc1 (line 38)
    st_ik = (fnval(splines.st_pp, t))';

    Error in adigator (line 510)
    FunctionInfo = adigatortempfunc1(FunctionInfo,UserFunInputs);

    Error in adigatorGenFiles4gpops2 (line 204)
    adigator(ContFunc,{cinput},ContDeriv1,ADopts);

    It seems ADiGator has a problem with splines and fnval function. Nevertheless, I need to use these functions as I have experimental data on my optimization and I resample it according to the collocation points GPOPS-II employs in each iteration.

    I do not know how to deal with that. Any help would be really appreciated. I can attach my files or give you more details if needed.

    Many thanks.

     
  • Matthew J. Weinstein

    Roger,

    The issue is that adigator doesn't have fnval overloaded. You should, however, be able to represent your spline as a piece wise polygon and use ppval which adigator supports.

    Matt

     
  • Roger Pallares

    Roger Pallares - 2018-09-20

    Matthew,

    Ok, I see. Thank you very much for your answer.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.