Opened 3 years ago

Closed 3 years ago

#5027 closed defect (fixed)

Casadi cannot handle FSubscriptedExp

Reported by: Christian Andersson Owned by: toivo
Priority: major Milestone: 2.0.x
Component: CasADiInterface Version: trunk
Keywords: Cc:


The follow model cannot be transfered to Casadi:

model ParameterIndexing 

Real TWall[Nwall];

final parameter Integer in = max(1, max_in);
      parameter Integer max_in = 1;
      parameter Integer Nwall(min=1)=1;

TWall[in] = 0;

end ParameterIndexing;

The error:

Java error occurred:
Exception in thread "main" java.lang.UnsupportedOperationException: Cannot convert expression to MX: ({TWall[1]})[in]
        at org.jmodelica.modelica.compiler.FExp.toMX(
        at org.jmodelica.modelica.compiler.FEquation.toMXForLhs(

Change History (2)

comment:1 Changed 3 years ago by Christian Andersson


Added support for subscripted variables. Related to ticket:5027

comment:2 Changed 3 years ago by Christian Andersson

Resolution: fixed
Status: newclosed

This is fixed. Although the indexes are fixed in the model and cannot be changed. See also #5059

Note: See TracTickets for help on using tickets.