Menu

ADiGator & GPOPS-II

Help
John Ash
2014-07-09
2014-07-10
  • John Ash

    John Ash - 2014-07-09

    Hello,

    I'm attempting to use ADiGator on my GPOPS-II simulation, instead of SparseCD.

    From the GPOPS-II documentation, after installing ADiGator, I should only have to change/add the following line:
    setup.derivatives.supplier = 'adigator';

    However when I run my program I get the following error:
    "Error using gpopsVerifySetup (line 3675)
    GPOPS-II ERROR: AdiGator could not produce derivative files"

    Using the documentation I then follow up with running the following command:

    adigatorGenFiles4gpops2(setup)

    Which produces the following output:

    Warning: File not found or permission denied

    In adigator at 79
    In adigatorGenFiles4gpops2 at 200
    Transforming User Function: 'Endpoint'
    Taking Derivatives wrt: 'v'...
    Subscripted assignment dimension mismatch.

    Error in adigatorCellStrucAsgn (line 136)
    ADIGATOR.VARINFO.NAMELOCS(PreOpCount:ADIGATOR.VARINFO.COUNT-1,2) = ...

    Error in adigatortempfunc1 (line 190)
    output.eventgroup =
    adigatorCellStrucAsgn(16,adigatorDummyStruc,adigatorStrucAsgn16,'output.eventgroup(number_of_gates+1).event =
    adigatorStrucAsgn16;',number_of_gates+1);

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

    Error in adigatorGenFiles4gpops2 (line 200)
    adigator(PointFunc,{pinput},PointDeriv1,ADopts);

    Any help with where to start would be great. I can attach my code if needed.

    Thanks for taking a look,

    John Ash

     
  • Matthew J. Weinstein

    Hi John,

    This is a bug on my end in the adigatorStrucAsgn file

    Lines 136 and 137 should read

      ADIGATOR.VARINFO.NAMELOCS(PreOpCount:ADIGATOR.VARINFO.COUNT-1,2) = ...
        1:ADIGATOR.VARINFO.COUNT-PreOpCount;
    

    (there was a -1 on the RHS that was wrong)

    I attached a file that has the change if you want to just replace the old one - should be located at adigator/util/adigatorCellStrucAsgn

    Please let me know if you find any other issues or have any questions.

    -Matt

     
  • John Ash

    John Ash - 2014-07-10

    Hi Matthew, thanks for the quick turn around.

    Here is the next error I found:

    EDU>> adigatorGenFiles4gpops2(setup)
    Warning: File not found or permission denied

    In adigator at 79
    In adigatorGenFiles4gpops2 at 200
    Transforming User Function: 'Endpoint'
    Taking Derivatives wrt: 'v'...
    Illegal right hand side in assignment. Too many elements.

    Error in adigatorCellStrucAsgn (line 165)
    s(varargin{1}.func.value).(fieldname) = b;

    Error in adigatortempfunc1 (line 190)
    output.eventgroup =
    adigatorCellStrucAsgn(16,adigatorDummyStruc,adigatorStrucAsgn16,'output.eventgroup(number_of_gates+1).event
    = adigatorStrucAsgn16;',number_of_gates+1);

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

    Error in adigatorGenFiles4gpops2 (line 200)
    adigator(PointFunc,{pinput},PointDeriv1,ADopts);

    Would this be any easier for you if you had my files?

    I appreciate your help,

    --Ash

     
  • Matthew J. Weinstein

    Hey John,

    Yeah I can't tell what is causing this just from the error message. If you could either attach your files here or send then to me at weinstein87@gmail.com I can try to figure out what's going on.

    Apologies for the errors - cell and structure assignments have been a major pain on the debugging front.

    -Matt

     

Log in to post a comment.

MongoDB Logo MongoDB