Skip to content

Commit

Permalink
OMEdit: handle equations also for Model_info.json files
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@23301 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
sjoelund committed Nov 10, 2014
1 parent 0245655 commit 71b4e00
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions Compiler/SimCode/SerializeModelInfo.mo
Expand Up @@ -69,7 +69,6 @@ algorithm
local
SimCode.ModelInfo mi;
SimCodeVar.SimVars vars;
// SimCode.SimEqSystem eq;
list<SimCode.SimEqSystem> eqs;
case SimCode.SIMCODE(modelInfo=mi as SimCode.MODELINFO(vars=vars))
equation
Expand All @@ -83,7 +82,6 @@ algorithm
serializeVars(file,vars,withOperations);
File.write(file, "\n},\n\"equations\":[");
// Handle no comma for the first equation
_ = SimCodeUtil.sortEqSystems(code.initialEquations);
File.write(file,"{\"eqIndex\":0,\"tag\":\"dummy\"}");
min(serializeEquation(file,eq,"initial",withOperations) for eq in SimCodeUtil.sortEqSystems(code.initialEquations));
min(serializeEquation(file,eq,"removed-initial",withOperations) for eq in SimCodeUtil.sortEqSystems(code.removedInitialEquations));
Expand Down Expand Up @@ -482,7 +480,7 @@ algorithm
File.write(file, ",\"section\":\"");
File.write(file, section);
// Ax=b
File.write(file, "\",\"tag\":\"linear\",\"defines\":[");
File.write(file, "\",\"tag\":\"container\",\"display\":\"linear\",\"defines\":[");
serializeUses(file,list(match v case SimCodeVar.SIMVAR() then v.name; end match
for v in eq.vars));
File.write(file, "],\"equation\":{\"size\":");
Expand Down

0 comments on commit 71b4e00

Please sign in to comment.