Skip to content

Commit

Permalink
- Moved plot,plot2,plot2,plotAll and visualize commands to ModelicaBu…
Browse files Browse the repository at this point in the history
…iltin.mo

  - Their API changed slightly (this will be announced when plotParametric also has been moved to ModelicaBuiltin.mo, and documented in trunk/doc):
    * Instead of plot(className, {x,y}), you now call plot({x,y}, "className_res.mat")
    * This is because className is usually used as a default argument, and thus should not be the first argument since then you cannot call plot({x,y})
    * Also, we use the filename of a result file because then we can plot renamed files or files that were created using the fileNamePrefix option of simulate()


git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@8007 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
sjoelund committed Feb 24, 2011
1 parent 2719121 commit 7986a00
Show file tree
Hide file tree
Showing 3 changed files with 108 additions and 548 deletions.
66 changes: 65 additions & 1 deletion Compiler/FrontEnd/ModelicaBuiltin.mo
Expand Up @@ -418,7 +418,7 @@ Besides, it has special semantics."

type TypeName "A path, for example the name of a class, e.g. A.B.C or .A.B" end TypeName;
type VariableName "A variable name, e.g. a.b or a[1].b[3].c" end VariableName;
type VariableNames "An array of variable names, e.g. {a.b,a[1].b[3].c}" end VariableNames;
type VariableNames "An array of variable names, e.g. {a.b,a[1].b[3].c}, or a single VariableName" end VariableNames;

end Code;

Expand Down Expand Up @@ -1024,5 +1024,69 @@ function list "Lists the contents of the given class, or all loaded classes"
external "builtin";
end list;

partial function basePlotFunction "extending this does not seem to work at the moment :("
input VariableNames vars;
input String fileName := "<default>";
input String interpolation := "linear";
input String title := "Plot by OpenModelica";
input Boolean legend := true;
input Boolean grid := true;
input Boolean logX := false;
input Boolean logY := false;
input String xLabel := "time";
input String yLabel := "";
input Boolean points := false;
input Real xRange[2] := {0.0,0.0};
input Real yRange[2] := {0.0,0.0};
output Boolean success;
end basePlotFunction;

function plot
input VariableNames vars;
input String fileName := "<default>";
input String interpolation := "linear";
input String title := "Plot by OpenModelica";
input Boolean legend := true;
input Boolean grid := true;
input Boolean logX := false;
input Boolean logY := false;
input String xLabel := "time";
input String yLabel := "";
input Boolean points := false;
input Real xRange[2] := {0.0,0.0};
input Real yRange[2] := {0.0,0.0};
output Boolean success;
external "builtin";
end plot;

function plotAll
input String fileName := "<default>";
input String interpolation := "linear";
input String title := "Plot by OpenModelica";
input Boolean legend := true;
input Boolean grid := true;
input Boolean logX := false;
input Boolean logY := false;
input String xLabel := "time";
input String yLabel := "";
input Boolean points := false;
input Real xRange[2] := {0.0,0.0};
input Real yRange[2] := {0.0,0.0};
output Boolean success;
external "builtin";
end plotAll;

function plot2
input VariableNames vars;
input String fileName := "<default>";
output Boolean success;
external "builtin";
end plot2;

function visualize
input TypeName classToVisualize;
output Boolean success;
end visualize;

end Scripting;
end OpenModelica;
230 changes: 2 additions & 228 deletions Compiler/FrontEnd/Static.mo
Expand Up @@ -6881,234 +6881,6 @@ protected function elabCallInteractive "function: elabCallInteractive
then
(cache,Expression.makeBuiltinCall("jacobian",{crefExp},DAE.ET_STRING()),DAE.PROP(DAE.T_STRING_DEFAULT,DAE.C_VAR()),SOME(st));

case (cache,env,Absyn.CREF_IDENT(name = "plot2"),{e1},{},impl,SOME(st),_,_)
equation
vars_1 = elabVariablenames({e1});
then
(cache,Expression.makeBuiltinCall("plot2",{DAE.ARRAY(DAE.ET_OTHER(),false,vars_1)},
DAE.ET_BOOL()),DAE.PROP(DAE.T_BOOL_DEFAULT,DAE.C_VAR()),SOME(st));

case (cache,env,Absyn.CREF_IDENT(name = "plot2"),{Absyn.ARRAY(arrayExp = vars)},{},impl,SOME(st),_,_)
equation
vars_1 = elabVariablenames(vars);
then
(cache,Expression.makeBuiltinCall("plot2",{DAE.ARRAY(DAE.ET_OTHER(),false,vars_1)},
DAE.ET_BOOL()),DAE.PROP(DAE.T_BOOL_DEFAULT,DAE.C_VAR()),SOME(st));

//visualize(model)
case (cache,env,Absyn.CREF_IDENT(name = "visualize"),{Absyn.CREF(componentRef = cr)},args,impl,SOME(st),_,_) /* Fill in rest of defaults here */
equation
className = Absyn.crefToPath(cr);
then
(cache,Expression.makeBuiltinCall("visualize",{DAE.CODE(Absyn.C_TYPENAME(className),DAE.ET_OTHER())},
DAE.ET_BOOL()),DAE.PROP(DAE.T_BOOL_DEFAULT,DAE.C_VAR()),SOME(st));


//plotAll(model)
case (cache,env,Absyn.CREF_IDENT(name = "plotAll"),{Absyn.CREF(componentRef = cr)},args,impl,SOME(st),pre,_) /* Fill in rest of defaults here */
equation
// vars_1 = elabVariablenames({cr2});
className = Absyn.crefToPath(cr);
(cache,interpolation) = getOptionalNamedArg(cache,env, SOME(st), impl, "interpolation", DAE.T_STRING_DEFAULT,
args, DAE.SCONST("linear"),pre,info);
(cache,title) = getOptionalNamedArg(cache,env, SOME(st), impl, "title", DAE.T_STRING_DEFAULT,
args, DAE.SCONST("Plot by OpenModelica"),pre,info);
(cache,legend) = getOptionalNamedArg(cache,env, SOME(st), impl, "legend", DAE.T_BOOL_DEFAULT,
args, DAE.BCONST(true),pre,info);
(cache,grid) = getOptionalNamedArg(cache,env, SOME(st), impl, "grid", DAE.T_BOOL_DEFAULT,
args, DAE.BCONST(true),pre,info);
(cache,logX) = getOptionalNamedArg(cache,env, SOME(st), impl, "logX", DAE.T_BOOL_DEFAULT,
args, DAE.BCONST(false),pre,info);
(cache,logY) = getOptionalNamedArg(cache,env, SOME(st), impl, "logY", DAE.T_BOOL_DEFAULT,
args, DAE.BCONST(false),pre,info);
(cache,xLabel) = getOptionalNamedArg(cache,env, SOME(st), impl, "xLabel", DAE.T_STRING_DEFAULT,
args, DAE.SCONST("time"),pre,info);
(cache,yLabel) = getOptionalNamedArg(cache,env, SOME(st), impl, "yLabel", DAE.T_STRING_DEFAULT,
args, DAE.SCONST(""),pre,info);
(cache,points) = getOptionalNamedArg(cache,env, SOME(st), impl, "points", DAE.T_BOOL_DEFAULT,
args, DAE.BCONST(false),pre,info);

(cache,xRange) = getOptionalNamedArg(cache,env, SOME(st), impl, "xRange", (DAE.T_ARRAY(DAE.DIM_INTEGER(2),DAE.T_REAL_DEFAULT),NONE()),
args, DAE.ARRAY(DAE.ET_REAL(), false, {DAE.RCONST(0.0), DAE.RCONST(0.0)}),pre,info);// DAE.ARRAY(DAE.ET_REAL(), false, {0, 0}));
(cache,yRange) = getOptionalNamedArg(cache,env, SOME(st), impl, "yRange", (DAE.T_ARRAY(DAE.DIM_INTEGER(2),DAE.T_REAL_DEFAULT),NONE()),
args, DAE.ARRAY(DAE.ET_REAL(), false, {DAE.RCONST(0.0), DAE.RCONST(0.0)}),pre,info);// DAE.ARRAY(DAE.ET_REAL(), false, {0, 0}));


then
(cache,Expression.makeBuiltinCall("plotAll",{DAE.CODE(Absyn.C_TYPENAME(className),DAE.ET_OTHER()), interpolation, title, legend, grid, logX, logY, xLabel, yLabel, points, xRange, yRange},
DAE.ET_BOOL()),DAE.PROP(DAE.T_BOOL_DEFAULT,DAE.C_VAR()),SOME(st));

//plotAll()
case (cache,env,Absyn.CREF_IDENT(name = "plotAll"),{},args,impl,SOME(st),pre,_) /* Fill in rest of defaults here */
equation
// vars_1 = elabVariablenames({cr2});
// className = Absyn.crefToPath(cr);
(cache,interpolation) = getOptionalNamedArg(cache,env, SOME(st), impl, "interpolation", DAE.T_STRING_DEFAULT,
args, DAE.SCONST("linear"),pre,info);
(cache,title) = getOptionalNamedArg(cache,env, SOME(st), impl, "title", DAE.T_STRING_DEFAULT,
args, DAE.SCONST("Plot by OpenModelica"),pre,info);
(cache,legend) = getOptionalNamedArg(cache,env, SOME(st), impl, "legend", DAE.T_BOOL_DEFAULT,
args, DAE.BCONST(true),pre,info);
(cache,grid) = getOptionalNamedArg(cache,env, SOME(st), impl, "grid", DAE.T_BOOL_DEFAULT,
args, DAE.BCONST(true),pre,info);
(cache,logX) = getOptionalNamedArg(cache,env, SOME(st), impl, "logX", DAE.T_BOOL_DEFAULT,
args, DAE.BCONST(false),pre,info);
(cache,logY) = getOptionalNamedArg(cache,env, SOME(st), impl, "logY", DAE.T_BOOL_DEFAULT,
args, DAE.BCONST(false),pre,info);
(cache,xLabel) = getOptionalNamedArg(cache,env, SOME(st), impl, "xLabel", DAE.T_STRING_DEFAULT,
args, DAE.SCONST("time"),pre,info);
(cache,yLabel) = getOptionalNamedArg(cache,env, SOME(st), impl, "yLabel", DAE.T_STRING_DEFAULT,
args, DAE.SCONST(""),pre,info);
(cache,points) = getOptionalNamedArg(cache,env, SOME(st), impl, "points", DAE.T_BOOL_DEFAULT,
args, DAE.BCONST(false),pre,info);

(cache,xRange) = getOptionalNamedArg(cache,env, SOME(st), impl, "xRange", (DAE.T_ARRAY(DAE.DIM_INTEGER(2),DAE.T_REAL_DEFAULT),NONE()),
args, DAE.ARRAY(DAE.ET_REAL(), false, {DAE.RCONST(0.0), DAE.RCONST(0.0)}),pre,info);// DAE.ARRAY(DAE.ET_REAL(), false, {0, 0}));
(cache,yRange) = getOptionalNamedArg(cache,env, SOME(st), impl, "yRange", (DAE.T_ARRAY(DAE.DIM_INTEGER(2),DAE.T_REAL_DEFAULT),NONE()),
args, DAE.ARRAY(DAE.ET_REAL(), false, {DAE.RCONST(0.0), DAE.RCONST(0.0)}),pre,info);// DAE.ARRAY(DAE.ET_REAL(), false, {0, 0}));


then
(cache,Expression.makeBuiltinCall("plotAll",{interpolation, title, legend, grid, logX, logY, xLabel, yLabel, points, xRange, yRange},
DAE.ET_BOOL()),DAE.PROP(DAE.T_BOOL_DEFAULT,DAE.C_VAR()),SOME(st));


//plot2(model, x)
case (cache,env,Absyn.CREF_IDENT(name = "plot"),{Absyn.CREF(componentRef = cr), e2},args,impl,SOME(st),pre,_) /* Fill in rest of defaults here */
equation
vars_1 = elabVariablenames({e2});
className = Absyn.crefToPath(cr);
(cache,interpolation) = getOptionalNamedArg(cache,env, SOME(st), impl, "interpolation", DAE.T_STRING_DEFAULT,
args, DAE.SCONST("linear"),pre,info);
(cache,title) = getOptionalNamedArg(cache,env, SOME(st), impl, "title", DAE.T_STRING_DEFAULT,
args, DAE.SCONST("Plot by OpenModelica"),pre,info);
(cache,legend) = getOptionalNamedArg(cache,env, SOME(st), impl, "legend", DAE.T_BOOL_DEFAULT,
args, DAE.BCONST(true),pre,info);
(cache,grid) = getOptionalNamedArg(cache,env, SOME(st), impl, "grid", DAE.T_BOOL_DEFAULT,
args, DAE.BCONST(true),pre,info);
(cache,logX) = getOptionalNamedArg(cache,env, SOME(st), impl, "logX", DAE.T_BOOL_DEFAULT,
args, DAE.BCONST(false),pre,info);
(cache,logY) = getOptionalNamedArg(cache,env, SOME(st), impl, "logY", DAE.T_BOOL_DEFAULT,
args, DAE.BCONST(false),pre,info);
(cache,xLabel) = getOptionalNamedArg(cache,env, SOME(st), impl, "xLabel", DAE.T_STRING_DEFAULT,
args, DAE.SCONST("time"),pre,info);
(cache,yLabel) = getOptionalNamedArg(cache,env, SOME(st), impl, "yLabel", DAE.T_STRING_DEFAULT,
args, DAE.SCONST(""),pre,info);
(cache,points) = getOptionalNamedArg(cache,env, SOME(st), impl, "points", DAE.T_BOOL_DEFAULT,
args, DAE.BCONST(false),pre,info);

(cache,xRange) = getOptionalNamedArg(cache,env, SOME(st), impl, "xRange", (DAE.T_ARRAY(DAE.DIM_INTEGER(2),DAE.T_REAL_DEFAULT),NONE()),
args, DAE.ARRAY(DAE.ET_REAL(), false, {DAE.RCONST(0.0), DAE.RCONST(0.0)}),pre,info);// DAE.ARRAY(DAE.ET_REAL(), false, {0, 0}));
(cache,yRange) = getOptionalNamedArg(cache,env, SOME(st), impl, "yRange", (DAE.T_ARRAY(DAE.DIM_INTEGER(2),DAE.T_REAL_DEFAULT),NONE()),
args, DAE.ARRAY(DAE.ET_REAL(), false, {DAE.RCONST(0.0), DAE.RCONST(0.0)}),pre,info);// DAE.ARRAY(DAE.ET_REAL(), false, {0, 0}));

then
(cache,Expression.makeBuiltinCall("plot",{DAE.CODE(Absyn.C_TYPENAME(className),DAE.ET_OTHER()), DAE.ARRAY(DAE.ET_OTHER(),false,vars_1), interpolation, title, legend, grid, logX, logY, xLabel, yLabel, points, xRange, yRange},
DAE.ET_BOOL()),DAE.PROP(DAE.T_BOOL_DEFAULT,DAE.C_VAR()),SOME(st));

//plot2(model, {x,y})
case (cache,env,Absyn.CREF_IDENT(name = "plot"),{Absyn.CREF(componentRef = cr), Absyn.ARRAY(arrayExp = vars)},args,impl,SOME(st),pre,_) /* Fill in rest of defaults here */
equation
vars_1 = elabVariablenames(vars);
className = Absyn.crefToPath(cr);
(cache,interpolation) = getOptionalNamedArg(cache,env, SOME(st), impl, "interpolation", DAE.T_STRING_DEFAULT,
args, DAE.SCONST("linear"),pre,info);


(cache,title) = getOptionalNamedArg(cache,env, SOME(st), impl, "title", DAE.T_STRING_DEFAULT,
args, DAE.SCONST("Plot by OpenModelica"),pre,info);
(cache,legend) = getOptionalNamedArg(cache,env, SOME(st), impl, "legend", DAE.T_BOOL_DEFAULT,
args, DAE.BCONST(true),pre,info);
(cache,grid) = getOptionalNamedArg(cache,env, SOME(st), impl, "grid", DAE.T_BOOL_DEFAULT,
args, DAE.BCONST(true),pre,info);
(cache,logX) = getOptionalNamedArg(cache,env, SOME(st), impl, "logX", DAE.T_BOOL_DEFAULT,
args, DAE.BCONST(false),pre,info);
(cache,logY) = getOptionalNamedArg(cache,env, SOME(st), impl, "logY", DAE.T_BOOL_DEFAULT,
args, DAE.BCONST(false),pre,info);
(cache,xLabel) = getOptionalNamedArg(cache,env, SOME(st), impl, "xLabel", DAE.T_STRING_DEFAULT,
args, DAE.SCONST("time"),pre,info);
(cache,yLabel) = getOptionalNamedArg(cache,env, SOME(st), impl, "yLabel", DAE.T_STRING_DEFAULT,
args, DAE.SCONST(""),pre,info);
(cache,points) = getOptionalNamedArg(cache,env, SOME(st), impl, "points", DAE.T_BOOL_DEFAULT,
args, DAE.BCONST(false),pre,info);

(cache,xRange) = getOptionalNamedArg(cache,env, SOME(st), impl, "xRange", (DAE.T_ARRAY(DAE.DIM_INTEGER(2),DAE.T_REAL_DEFAULT),NONE()),
args, DAE.ARRAY(DAE.ET_REAL(), false, {DAE.RCONST(0.0), DAE.RCONST(0.0)}),pre,info);// DAE.ARRAY(DAE.ET_REAL(), false, {0, 0}));
(cache,yRange) = getOptionalNamedArg(cache,env, SOME(st), impl, "yRange", (DAE.T_ARRAY(DAE.DIM_INTEGER(2),DAE.T_REAL_DEFAULT),NONE()),
args, DAE.ARRAY(DAE.ET_REAL(), false, {DAE.RCONST(0.0), DAE.RCONST(0.0)}),pre,info);// DAE.ARRAY(DAE.ET_REAL(), false, {0, 0}));

then
(cache,Expression.makeBuiltinCall("plot",{DAE.CODE(Absyn.C_TYPENAME(className),DAE.ET_OTHER()), DAE.ARRAY(DAE.ET_OTHER(),false,vars_1), interpolation, title, legend, grid, logX, logY, xLabel, yLabel, points, xRange, yRange},
DAE.ET_BOOL()),DAE.PROP(DAE.T_BOOL_DEFAULT,DAE.C_VAR()),SOME(st));



//plot2(x)
case (cache,env,Absyn.CREF_IDENT(name = "plot"),{e1},args,impl,SOME(st),pre,_)
equation
vars_1 = elabVariablenames({e1});

(cache,interpolation) = getOptionalNamedArg(cache,env, SOME(st), impl, "interpolation", DAE.T_STRING_DEFAULT,
args, DAE.SCONST("linear"),pre,info);
(cache,title) = getOptionalNamedArg(cache,env, SOME(st), impl, "title", DAE.T_STRING_DEFAULT,
args, DAE.SCONST("Plot by OpenModelica"),pre,info);
(cache,legend) = getOptionalNamedArg(cache,env, SOME(st), impl, "legend", DAE.T_BOOL_DEFAULT,
args, DAE.BCONST(true),pre,info);
(cache,grid) = getOptionalNamedArg(cache,env, SOME(st), impl, "grid", DAE.T_BOOL_DEFAULT,
args, DAE.BCONST(true),pre,info);
(cache,logX) = getOptionalNamedArg(cache,env, SOME(st), impl, "logX", DAE.T_BOOL_DEFAULT,
args, DAE.BCONST(false),pre,info);
(cache,logY) = getOptionalNamedArg(cache,env, SOME(st), impl, "logY", DAE.T_BOOL_DEFAULT,
args, DAE.BCONST(false),pre,info);
(cache,xLabel) = getOptionalNamedArg(cache,env, SOME(st), impl, "xLabel", DAE.T_STRING_DEFAULT,
args, DAE.SCONST("time"),pre,info);
(cache,yLabel) = getOptionalNamedArg(cache,env, SOME(st), impl, "yLabel", DAE.T_STRING_DEFAULT,
args, DAE.SCONST(""),pre,info);
(cache,points) = getOptionalNamedArg(cache,env, SOME(st), impl, "points", DAE.T_BOOL_DEFAULT,
args, DAE.BCONST(false),pre,info);

(cache,xRange) = getOptionalNamedArg(cache,env, SOME(st), impl, "xRange", (DAE.T_ARRAY(DAE.DIM_INTEGER(2),DAE.T_REAL_DEFAULT),NONE()),
args, DAE.ARRAY(DAE.ET_REAL(), false, {DAE.RCONST(0.0), DAE.RCONST(0.0)}),pre,info);// DAE.ARRAY(DAE.ET_REAL(), false, {0, 0}));
(cache,yRange) = getOptionalNamedArg(cache,env, SOME(st), impl, "yRange", (DAE.T_ARRAY(DAE.DIM_INTEGER(2),DAE.T_REAL_DEFAULT),NONE()),
args, DAE.ARRAY(DAE.ET_REAL(), false, {DAE.RCONST(0.0), DAE.RCONST(0.0)}),pre,info);// DAE.ARRAY(DAE.ET_REAL(), false, {0, 0}));

then
(cache,Expression.makeBuiltinCall("plot",{DAE.ARRAY(DAE.ET_OTHER(),false,vars_1), interpolation, title, legend, grid, logX, logY, xLabel, yLabel, points, xRange, yRange},
DAE.ET_BOOL()),DAE.PROP(DAE.T_BOOL_DEFAULT,DAE.C_VAR()),SOME(st));

//plot2({x,y})
case (cache,env,Absyn.CREF_IDENT(name = "plot"),{Absyn.ARRAY(arrayExp = vars)},args,impl,SOME(st),pre,_)
equation
vars_1 = elabVariablenames(vars);
(cache,interpolation) = getOptionalNamedArg(cache,env, SOME(st), impl, "interpolation", DAE.T_STRING_DEFAULT,
args, DAE.SCONST("linear"),pre,info);
(cache,title) = getOptionalNamedArg(cache,env, SOME(st), impl, "title", DAE.T_STRING_DEFAULT,
args, DAE.SCONST("Plot by OpenModelica"),pre,info);
(cache,legend) = getOptionalNamedArg(cache,env, SOME(st), impl, "legend", DAE.T_BOOL_DEFAULT,
args, DAE.BCONST(true),pre,info);
(cache,grid) = getOptionalNamedArg(cache,env, SOME(st), impl, "grid", DAE.T_BOOL_DEFAULT,
args, DAE.BCONST(true),pre,info);
(cache,logX) = getOptionalNamedArg(cache,env, SOME(st), impl, "logX", DAE.T_BOOL_DEFAULT,
args, DAE.BCONST(false),pre,info);
(cache,logY) = getOptionalNamedArg(cache,env, SOME(st), impl, "logY", DAE.T_BOOL_DEFAULT,
args, DAE.BCONST(false),pre,info);
(cache,xLabel) = getOptionalNamedArg(cache,env, SOME(st), impl, "xLabel", DAE.T_STRING_DEFAULT,
args, DAE.SCONST("time"),pre,info);
(cache,yLabel) = getOptionalNamedArg(cache,env, SOME(st), impl, "yLabel", DAE.T_STRING_DEFAULT,
args, DAE.SCONST(""),pre,info);
(cache,points) = getOptionalNamedArg(cache,env, SOME(st), impl, "points", DAE.T_BOOL_DEFAULT,
args, DAE.BCONST(false),pre,info);

(cache,xRange) = getOptionalNamedArg(cache,env, SOME(st), impl, "xRange", (DAE.T_ARRAY(DAE.DIM_INTEGER(2),DAE.T_REAL_DEFAULT),NONE()),
args, DAE.ARRAY(DAE.ET_REAL(), false, {DAE.RCONST(0.0), DAE.RCONST(0.0)}),pre,info);// DAE.ARRAY(DAE.ET_REAL(), false, {0, 0}));
(cache,yRange) = getOptionalNamedArg(cache,env, SOME(st), impl, "yRange", (DAE.T_ARRAY(DAE.DIM_INTEGER(2),DAE.T_REAL_DEFAULT),NONE()),
args, DAE.ARRAY(DAE.ET_REAL(), false, {DAE.RCONST(0.0), DAE.RCONST(0.0)}),pre,info);// DAE.ARRAY(DAE.ET_REAL(), false, {0, 0}));


then
(cache,Expression.makeBuiltinCall("plot",{DAE.ARRAY(DAE.ET_OTHER(),false,vars_1), interpolation, title, legend, grid, logX, logY, xLabel, yLabel, points, xRange, yRange},
DAE.ET_BOOL()),DAE.PROP(DAE.T_BOOL_DEFAULT,DAE.C_VAR()),SOME(st));

case (cache,env,Absyn.CREF_IDENT(name = "plotParametric2"),vars,{},impl,SOME(st),_,_) /* PlotParametric is similar to plot but does not allow a single CREF as an
argument as you are plotting at least one variable as a function of another.
Thus, plotParametric has to take an array as an argument, or two componentRefs. */
Expand Down Expand Up @@ -13265,6 +13037,8 @@ algorithm
then DAE.CODE(Absyn.C_TYPENAME(path),DAE.ET_OTHER());
case (Absyn.CREF(componentRef=cr),DAE.C_VARIABLENAME(),_)
then DAE.CODE(Absyn.C_VARIABLENAME(cr),DAE.ET_OTHER());
case (Absyn.CREF(componentRef=cr),DAE.C_VARIABLENAMES(),info)
then DAE.ARRAY(DAE.ET_OTHER(),false,{DAE.CODE(Absyn.C_VARIABLENAME(cr),DAE.ET_OTHER())});
case (Absyn.ARRAY(es),DAE.C_VARIABLENAMES(),info)
equation
es_1 = Util.listMap2(es,elabCodeExp,DAE.C_VARIABLENAME(),info);
Expand Down

0 comments on commit 7986a00

Please sign in to comment.