diff --git a/Compiler/BackEnd/OpenTURNS.mo b/Compiler/BackEnd/OpenTURNS.mo
index 826857afdf1..708b2dec16a 100644
--- a/Compiler/BackEnd/OpenTURNS.mo
+++ b/Compiler/BackEnd/OpenTURNS.mo
@@ -93,7 +93,7 @@ algorithm
simSettings := CevalScript.convertSimulationOptionsToSimCode(
CevalScript.buildSimulationOptionsFromModelExperimentAnnotation(
- Interactive.setSymbolTableAST(GlobalScript.emptySymboltable,inProgram),inPath,fileNamePrefix)
+ Interactive.setSymbolTableAST(GlobalScript.emptySymboltable,inProgram),inPath,fileNamePrefix,NONE())
);
// correlation matrix form (vector of records) currently not supported by OpenModelica backend, remove it .
//print("enter dae:");
diff --git a/Compiler/FrontEnd/ModelicaBuiltin.mo b/Compiler/FrontEnd/ModelicaBuiltin.mo
index 4420d39f7e3..ae49215e31e 100644
--- a/Compiler/FrontEnd/ModelicaBuiltin.mo
+++ b/Compiler/FrontEnd/ModelicaBuiltin.mo
@@ -2731,6 +2731,20 @@ function isExperiment "An experiment is defined as having annotation Experiment(
external "builtin";
end isExperiment;
+function getSimulationOptions
+ input TypeName name;
+ input Real defaultStartTime := 0.0;
+ input Real defaultStopTime := 1.0;
+ input Real defaultTolerance := 1e-6;
+ output Real startTime;
+ output Real stopTime;
+ output Real tolerance;
+external "builtin";
+annotation(Documentation(info="
+
Returns the startTime, stopTime, interval and tolerance based on the experiment annotation.
+"));
+end getSimulationOptions;
+
function classAnnotationExists "Check if annotation exists"
input TypeName className;
input TypeName annotationName;
diff --git a/Compiler/Script/CevalScript.mo b/Compiler/Script/CevalScript.mo
index 257558c9617..a68182b15c6 100644
--- a/Compiler/Script/CevalScript.mo
+++ b/Compiler/Script/CevalScript.mo
@@ -111,6 +111,7 @@ protected import SCodeSimplify;
protected import SimCodeMain;
protected import System;
protected import Static;
+protected import StaticScript;
protected import SCode;
protected import SCodeUtil;
protected import Settings;
@@ -427,18 +428,19 @@ public function buildSimulationOptionsFromModelExperimentAnnotation
input GlobalScript.SymbolTable inSymTab;
input Absyn.Path inModelPath;
input String inFileNamePrefix;
+ input Option defaultOption;
output GlobalScript.SimulationOptions outSimOpt;
algorithm
- outSimOpt := matchcontinue (inSymTab, inModelPath, inFileNamePrefix)
+ outSimOpt := matchcontinue (inSymTab, inModelPath, inFileNamePrefix, defaultOption)
local
GlobalScript.SimulationOptions defaults, simOpt;
String experimentAnnotationStr;
list named;
// search inside annotation(experiment(...))
- case (_, _, _)
+ case (_, _, _, _)
equation
- defaults = setFileNamePrefixInSimulationOptions(defaultSimulationOptions, inFileNamePrefix);
+ defaults = Util.getOptionOrDefault(defaultOption, setFileNamePrefixInSimulationOptions(defaultSimulationOptions, inFileNamePrefix));
experimentAnnotationStr =
Interactive.getNamedAnnotation(
@@ -464,11 +466,10 @@ algorithm
simOpt;
// if we fail, just use the defaults
- case (_, _, _)
+ else
equation
defaults = setFileNamePrefixInSimulationOptions(defaultSimulationOptions, inFileNamePrefix);
- then
- defaults;
+ then defaults;
end matchcontinue;
end buildSimulationOptionsFromModelExperimentAnnotation;
@@ -825,6 +826,7 @@ algorithm
platform,usercflags,senddata,res,workdir,gcc,confcmd,touch_file,uname,filenameprefix,compileDir,libDir,exeDir,configDir,from,to,
gridStr, logXStr, logYStr, x1Str, x2Str, y1Str, y2Str, curveWidthStr, curveStyleStr, legendPosition,scriptFile,logFile, simflags2, outputFile,
systemPath, gccVersion, gd, strlinearizeTime, direction, suffix;
+ list simOptions;
list vals;
Absyn.Path path,classpath,className,baseClassPath;
SCode.Program scodeP,sp;
@@ -835,6 +837,9 @@ algorithm
list ic,ic_1;
list iv;
list cf;
+ GlobalScript.SimulationOptions simOpt;
+ Real startTime,stopTime,tolerance;
+ DAE.Exp startTimeExp,stopTimeExp,toleranceExp;
DAE.Type tp;
Absyn.Class absynClass;
Absyn.ClassDef cdef;
@@ -2220,6 +2225,20 @@ algorithm
then
(cache,Values.BOOL(false),st);
+ case (cache,env,"getSimulationOptions",{Values.CODE(Absyn.C_TYPENAME(classpath)),Values.REAL(startTime),Values.REAL(stopTime),Values.REAL(tolerance)},st as GlobalScript.SYMBOLTABLE(ast = p),_)
+ equation
+ cr_1 = Absyn.pathToCref(classpath);
+ // ignore the name of the model
+ ErrorExt.setCheckpoint("getSimulationOptions");
+ simOpt = GlobalScript.SIMULATION_OPTIONS(DAE.RCONST(startTime),DAE.RCONST(stopTime),DAE.ICONST(0),DAE.RCONST(0.0),DAE.RCONST(tolerance),DAE.SCONST(""),DAE.SCONST(""),DAE.SCONST(""),DAE.SCONST(""),DAE.SCONST(""),DAE.BCONST(false),DAE.SCONST(""),DAE.SCONST(""));
+ ErrorExt.rollBack("getSimulationOptions");
+ (_, _::startTimeExp::stopTimeExp::_::toleranceExp::_) = StaticScript.getSimulationArguments(Env.emptyCache(), {},{Absyn.CREF(cr_1)},{},false,SOME(st),Prefix.NOPRE(),Absyn.dummyInfo,SOME(simOpt));
+ startTime = ValuesUtil.valueReal(Util.makeValueOrDefault(Ceval.cevalSimple,startTimeExp,Values.REAL(startTime)));
+ stopTime = ValuesUtil.valueReal(Util.makeValueOrDefault(Ceval.cevalSimple,stopTimeExp,Values.REAL(stopTime)));
+ tolerance = ValuesUtil.valueReal(Util.makeValueOrDefault(Ceval.cevalSimple,toleranceExp,Values.REAL(tolerance)));
+ then
+ (cache,Values.TUPLE({Values.REAL(startTime),Values.REAL(stopTime),Values.REAL(tolerance)}),st);
+
case (cache,env,"classAnnotationExists",{Values.CODE(Absyn.C_TYPENAME(classpath)),Values.CODE(Absyn.C_TYPENAME(path))},st as GlobalScript.SYMBOLTABLE(ast=p),_)
equation
b = Interactive.getNamedAnnotation(classpath, p, path, SOME(false), Util.isSome);
diff --git a/Compiler/Script/Interactive.mo b/Compiler/Script/Interactive.mo
index 09a3190f2fa..4b36b538a7d 100644
--- a/Compiler/Script/Interactive.mo
+++ b/Compiler/Script/Interactive.mo
@@ -1658,22 +1658,6 @@ algorithm
then
(resstr,st);
- case (istmts, st as GlobalScript.SYMBOLTABLE(ast = p))
- equation
- matchApiFunction(istmts, "getSimulationOptions");
- {Absyn.CREF(componentRef = cr)} = getApiFunctionArgs(istmts);
- modelpath = Absyn.crefToPath(cr);
- ErrorExt.setCheckpoint("getSimulationOptions");
- // ignore the name of the model
- (_, _::simOptions) = StaticScript.getSimulationArguments(Env.emptyCache(), {},{Absyn.CREF(cr)},{},false,SOME(st),Prefix.NOPRE(),Absyn.dummyInfo);
- resstr =
- "{" +&
- ExpressionDump.printExpListStr(simOptions) +&
- "} /* startTime, stopTime, numberOfIntervals, tolerance, method, fileNamePrefix, noClean, options, outputFormat */";
- ErrorExt.rollBack("getSimulationOptions");
- then
- (resstr,st);
-
case (istmts, st as GlobalScript.SYMBOLTABLE(ast = p))
equation
matchApiFunction(istmts, "getNamedAnnotation");
@@ -2188,60 +2172,6 @@ algorithm
then
(resstr,st);
- // builds model and writes results to buffer
- case (istmts, st)
- equation
- matchApiFunction(istmts, "writeToBuffer");
- {Absyn.CREF(componentRef = cr)} = getApiFunctionArgs(istmts);
- _ = Flags.enableDebug(Flags.WRITE_TO_BUFFER);
- (cache,simOptions) = StaticScript.getSimulationArguments(Env.emptyCache(),{},{Absyn.CREF(cr)},{},false,SOME(st),Prefix.NOPRE(),Absyn.dummyInfo);
- (_,_,_) = CevalScript.ceval(cache,{},DAE.CALL(Absyn.IDENT("buildModel"),simOptions,DAE.callAttrBuiltinOther),true,SOME(st),Absyn.NO_MSG(),0);
- then
- ("true",st);
-
- //starts label DAE algorithm
- case (istmts, st)
- equation
- matchApiFunction(istmts, "generateLabeledSimCode");
- {Absyn.CREF(componentRef = cr),Absyn.STRING(value = reductionMethod), Absyn.ARRAY(arrayExp = exp_list)} = getApiFunctionArgs(istmts);
- Flags.setConfigBool(Flags.GENERATE_LABELED_SIMCODE,true);
- Flags.setConfigString(Flags.REDUCTION_METHOD,reductionMethod);
- // (cache,simOptions) = StaticScript.getSimulationArguments(Env.emptyCache(),{},{Absyn.CREF(cr)},{},false,SOME(st),Prefix.NOPRE(),Absyn.dummyInfo);
- // (_,_,_) = CevalScript.ceval(cache,{},DAE.CALL(Absyn.IDENT("buildModel"),simOptions,DAE.callAttrBuiltinOther),true,SOME(st),Absyn.NO_MSG());
- modelpath = Absyn.crefToPath(cr);
- filenameprefix = Absyn.pathLastIdent(modelpath);
- (env,st) = buildEnvFromSymboltable(st);
- (_,{_,_,_,_,_,DAE.SCONST(method),_,_,_,_,_,_,_,_}) = StaticScript.getSimulationArguments(Env.emptyCache(),{},{Absyn.CREF(cr)},{},false,SOME(st),Prefix.NOPRE(),Absyn.dummyInfo);
- (_,_,_,libs,file_dir,_) = SimCodeMain.translateModel(Env.emptyCache(),env,modelpath,st,filenameprefix,true,NONE(),
- Absyn.FUNCTIONARGS({Absyn.CREF(cr), Absyn.ARRAY(exp_list)},{}));
- CevalScript.compileModel(filenameprefix,libs,file_dir,method);
- then
- ("true",st);
-
- case (istmts, st)
- equation
- matchApiFunction(istmts, "generateLabeledSimCode");
- then
- ("No such reduction method!",st);
-
- //starts remove terms from DAE algorithm
- case (istmts, st as GlobalScript.SYMBOLTABLE(ast = p))
- equation
- matchApiFunction(istmts, "reduceTerms");
- {Absyn.CREF(componentRef = cr), Absyn.ARRAY(arrayExp = exp_list),Absyn.ARRAY(arrayExp = exp_list2)} = getApiFunctionArgs(istmts);
- modelpath = Absyn.crefToPath(cr);
- filenameprefix = Absyn.pathLastIdent(modelpath);
- (env,st) = buildEnvFromSymboltable(st);
- Flags.setConfigBool(Flags.REDUCE_TERMS,true);
- Flags.setConfigBool(Flags.GENERATE_LABELED_SIMCODE,false);
- _ = Flags.disableDebug(Flags.WRITE_TO_BUFFER);
- (_,{_,_,_,_,_,DAE.SCONST(method),_,_,_,_,_,_,_,_}) = StaticScript.getSimulationArguments(Env.emptyCache(),{},{Absyn.CREF(cr)},{},false,SOME(st),Prefix.NOPRE(),Absyn.dummyInfo);
- (_,_,_,libs,file_dir,_) = SimCodeMain.translateModel(Env.emptyCache(),env,modelpath,st,filenameprefix,true,NONE(),
- Absyn.FUNCTIONARGS({Absyn.CREF(cr), Absyn.ARRAY(exp_list), Absyn.ARRAY(exp_list2)}, {}));
- CevalScript.compileModel(filenameprefix,libs,file_dir,method);
- then
- ("true",st);
-
end matchcontinue;
end evaluateGraphicalApi_dispatch;
diff --git a/Compiler/Script/StaticScript.mo b/Compiler/Script/StaticScript.mo
index 2cc09442817..940def6091a 100644
--- a/Compiler/Script/StaticScript.mo
+++ b/Compiler/Script/StaticScript.mo
@@ -115,11 +115,12 @@ public function getSimulationArguments
input Option inInteractiveInteractiveSymbolTableOption;
input Prefix.Prefix inPrefix;
input Absyn.Info inInfo;
+ input Option defaultOption;
output Env.Cache outCache;
output list outSimulationArguments;
algorithm
(outCache, outSimulationArguments) :=
- match (inCache, inEnv, inAbsynExpLst, inAbsynNamedArgLst, inBoolean, inInteractiveInteractiveSymbolTableOption, inPrefix, inInfo)
+ match (inCache, inEnv, inAbsynExpLst, inAbsynNamedArgLst, inBoolean, inInteractiveInteractiveSymbolTableOption, inPrefix, inInfo, defaultOption)
local
Absyn.Exp crexp;
list args;
@@ -137,7 +138,7 @@ algorithm
Values.Value v;
// fill in defaults
- case (cache,env,{crexp},args,impl,SOME(st),pre,info)
+ case (cache,env,{crexp},args,impl,SOME(st),pre,info,_)
equation
exp = Static.elabCodeExp(crexp,cache,env,DAE.C_TYPENAME(),info);
// We need to force eval in order to get the correct prefix
@@ -145,7 +146,7 @@ algorithm
Values.CODE(Absyn.C_TYPENAME(className)) = CevalScript.evalCodeTypeName(v,env);
cname_str = Absyn.pathString(Absyn.unqotePathIdents(className)) "easier than checking if the file system supports UTF-8...";
- defaulSimOpt = CevalScript.buildSimulationOptionsFromModelExperimentAnnotation(st, className, cname_str);
+ defaulSimOpt = CevalScript.buildSimulationOptionsFromModelExperimentAnnotation(st, className, cname_str, defaultOption);
(cache, startTime, stopTime, numberOfIntervals) =
calculateSimulationTimes(inCache, inEnv, inAbsynExpLst, inAbsynNamedArgLst, impl, inInteractiveInteractiveSymbolTableOption, inPrefix, inInfo, defaulSimOpt);
@@ -267,7 +268,7 @@ public function elabCallInteractive "This function elaborates the functions defi
case (cache,env,Absyn.CREF_IDENT(name = "translateModel"),{Absyn.CREF(componentRef = cr)},args,impl,SOME(st),pre,_)
equation
- (cache, simulationArgs) = getSimulationArguments(cache, env, inExps, args, inBoolean, inInteractiveInteractiveSymbolTableOption, inPrefix, info);
+ (cache, simulationArgs) = getSimulationArguments(cache, env, inExps, args, inBoolean, inInteractiveInteractiveSymbolTableOption, inPrefix, info, NONE());
then
(cache,Expression.makeBuiltinCall("translateModel",simulationArgs,DAE.T_STRING_DEFAULT),DAE.PROP(DAE.T_STRING_DEFAULT,DAE.C_VAR()),SOME(st));
@@ -342,42 +343,42 @@ public function elabCallInteractive "This function elaborates the functions defi
case (cache,env,Absyn.CREF_IDENT(name = "buildModel"),{Absyn.CREF(componentRef = cr)},args,impl,SOME(st),pre,_)
equation
- (cache, simulationArgs) = getSimulationArguments(cache, env, inExps, args, inBoolean, inInteractiveInteractiveSymbolTableOption, inPrefix, info);
+ (cache, simulationArgs) = getSimulationArguments(cache, env, inExps, args, inBoolean, inInteractiveInteractiveSymbolTableOption, inPrefix, info, NONE());
then
(cache,Expression.makeBuiltinCall("buildModel",simulationArgs,DAE.T_UNKNOWN_DEFAULT),
DAE.PROP(DAE.T_ARRAY(DAE.T_STRING_DEFAULT,{DAE.DIM_INTEGER(2)},DAE.emptyTypeSource),DAE.C_VAR()),SOME(st));
case (cache,env,Absyn.CREF_IDENT(name = "buildModelBeast"),{Absyn.CREF(componentRef = cr)},args,impl,SOME(st),pre,_)
equation
- (cache, simulationArgs) = getSimulationArguments(cache, env, inExps, args, inBoolean, inInteractiveInteractiveSymbolTableOption, inPrefix, info);
+ (cache, simulationArgs) = getSimulationArguments(cache, env, inExps, args, inBoolean, inInteractiveInteractiveSymbolTableOption, inPrefix, info, NONE());
then
(cache,Expression.makeBuiltinCall("buildModelBeast",simulationArgs,DAE.T_UNKNOWN_DEFAULT),
DAE.PROP(DAE.T_ARRAY(DAE.T_STRING_DEFAULT,{DAE.DIM_INTEGER(2)},DAE.emptyTypeSource),DAE.C_VAR()),SOME(st));
case (cache,env,Absyn.CREF_IDENT(name = "simulate"),{Absyn.CREF(componentRef = cr)},args,impl,SOME(st),pre,_) /* Fill in rest of defaults here */
equation
- (cache, simulationArgs) = getSimulationArguments(cache, env, inExps, args, inBoolean, inInteractiveInteractiveSymbolTableOption, inPrefix, info);
+ (cache, simulationArgs) = getSimulationArguments(cache, env, inExps, args, inBoolean, inInteractiveInteractiveSymbolTableOption, inPrefix, info, NONE());
recordtype = CevalScript.getSimulationResultType();
then
(cache,Expression.makeBuiltinCall("simulate",simulationArgs,DAE.T_UNKNOWN_DEFAULT),DAE.PROP(recordtype,DAE.C_VAR()),SOME(st));
case (cache,env,Absyn.CREF_IDENT(name = "simulation"),{Absyn.CREF(componentRef = cr)},args,impl,SOME(st),pre,_) /* Fill in rest of defaults here */
equation
- (cache, simulationArgs) = getSimulationArguments(cache, env, inExps, args, inBoolean, inInteractiveInteractiveSymbolTableOption, inPrefix, info);
+ (cache, simulationArgs) = getSimulationArguments(cache, env, inExps, args, inBoolean, inInteractiveInteractiveSymbolTableOption, inPrefix, info, NONE());
recordtype = CevalScript.getDrModelicaSimulationResultType();
then
(cache,Expression.makeBuiltinCall("simulation",simulationArgs,DAE.T_UNKNOWN_DEFAULT),DAE.PROP(recordtype,DAE.C_VAR()),SOME(st));
case (cache,env,Absyn.CREF_IDENT(name = "residualCMP"),{Absyn.CREF(componentRef = cr)},args,impl,SOME(st),pre,_) /* Fill in rest of defaults here */
equation
- (cache, simulationArgs) = getSimulationArguments(cache, env, inExps, args, inBoolean, inInteractiveInteractiveSymbolTableOption, inPrefix, info);
+ (cache, simulationArgs) = getSimulationArguments(cache, env, inExps, args, inBoolean, inInteractiveInteractiveSymbolTableOption, inPrefix, info, NONE());
recordtype = CevalScript.getSimulationResultType();
then
(cache,Expression.makeBuiltinCall("residualCMP",simulationArgs,DAE.T_UNKNOWN_DEFAULT),DAE.PROP(recordtype,DAE.C_VAR()),SOME(st));
case (cache,env,Absyn.CREF_IDENT(name = "linearize"),{Absyn.CREF(componentRef = cr)},args,impl,SOME(st),pre,_) /* Fill in rest of defaults here */
equation
- (cache, simulationArgs) = getSimulationArguments(cache, env, inExps, args, inBoolean, inInteractiveInteractiveSymbolTableOption, inPrefix, info);
+ (cache, simulationArgs) = getSimulationArguments(cache, env, inExps, args, inBoolean, inInteractiveInteractiveSymbolTableOption, inPrefix, info, NONE());
recordtype = CevalScript.getSimulationResultType();
then
(cache,Expression.makeBuiltinCall("linearize",simulationArgs,DAE.T_UNKNOWN_DEFAULT),DAE.PROP(recordtype,DAE.C_VAR()),SOME(st));
diff --git a/Examples/BuildModelRecursive.mos b/Examples/BuildModelRecursive.mos
index f52dc833a99..e8efe9a5db8 100644
--- a/Examples/BuildModelRecursive.mos
+++ b/Examples/BuildModelRecursive.mos
@@ -11,7 +11,7 @@ OpenModelica.Scripting.Internal.Time.timerTick(OpenModelica.Scripting.Internal.T
log:="BuildModelRecursive.html";
ulimitOmc:="1200"; // 20 minutes to generate the C-code
ulimitExe:="480"; // 8 minutes to initialize and run the simulation
-tolerance:=1e-6;
+default_tolerance:=1e-10;
reference_reltol:=1e-3;
reference_rangeDelta:=2e-3;
loadModel(library,{libraryVersion});
@@ -47,9 +47,6 @@ mkdir("files");
min(writeFile(s + ".mos","
\""+s+"\";
echo(false);
-tolerance:="+String(tolerance)+";
-reference_reltol:="+String(reference_reltol)+";
-reference_rangeDelta:="+String(reference_rangeDelta)+";
statFile := \""+s+".stat\";
writeFile(\""+log+"\",\""+s+"\n\",append=true);
writeFile(statFile,\""+s+" |
\");getErrorString();
@@ -57,6 +54,9 @@ writeFile(statFile + \".flat\", \"killed\");getErrorString();
writeFile(statFile + \".compile\", \"killed\");getErrorString();
writeFile(statFile + \".sim\", \"killed\");getErrorString();
"+loadModelCommand+"
+reference_reltol:="+String(reference_reltol)+";
+reference_rangeDelta:="+String(reference_rangeDelta)+";
+(startTime,stopTime,tolerance):=getSimulationOptions("+s+",defaultTolerance="+String(default_tolerance)+");
setCommandLineOptions(\"+d=nogen,initialization\"); setMatchingAlgorithm(\"PFPlusExt\"); setIndexReductionMethod(\"dynamicStateSelection\");
loadString(\"
function cell
@@ -155,13 +155,13 @@ set samples 300
\" + sum(\"set output \\\"\"+file+\".svg\\\"
set title \\\"Result difference of \"+csvFileToVariable(file)+\"\\\"
# Skip setting xrange; it removes too many lines
-set xrange [`head -2 \\\"\"+file+\".csv\\\" | tail -1 | cut -d, -f15,16 | tr , :`]
+set xrange [\"+String(startTime)+\":\"+String(stopTime)+\"]
plot \\\"\"+file+\".csv\\\" using 1:2 title 'reference' with lines, \\\"\"+file+\".csv\\\" using 5:6 title 'actual' with lines, \\\"\"+file+\".csv\\\" using 1:3 title 'high' with lines, \\\"\"+file+\".csv\\\" using 1:4 title 'low' with lines
\" for file in diffFiles));
system(\"gnuplot '"+s+".gnuplot'\");
timeDiff := OpenModelica.Scripting.Internal.Time.timerTock(OpenModelica.Scripting.Internal.Time.RT_CLOCK_USER_RESERVED);
referenceCell := \"\"+OpenModelica.Scripting.Internal.Time.readableTime(timeDiff)+\", \"+String(size(diffFiles,1))+\" failed | \";
- writeFile(\"files/"+s+".diff.html\",\""+s+" differences from the reference file
\");
+ writeFile(\"files/"+s+".diff.html\",\""+s+" differences from the reference file
startTime: \"+String(startTime)+\"
stopTime: \"+String(stopTime)+\"
Simulated using tolerance: \"+String(tolerance)+\"
\");
{writeFile(prefix + \".\" + var + \".html\",\"
@@ -197,8 +197,8 @@ g = new Dygraph(document.getElementById(\\\"graphdiv\\\"),
end if;
sim:=readFile(simFile);
-str:=\"\" + (if err <> \"\" then \""+s+"\" else \""+s+"\") +
- (if sim <> \"\" then \" (sim)\" else \"\") +
+str:=\" |
\" + (if err <> \"\" then \""+s+"\" else \""+s+"\") +
+ (if sim <> \"\" then \" (sim)\" else \"\") +
\" | \" + referenceCell +
cell(if simRes then timeSim else -1.0,greenOnOk=true,greenColor=greenColor) +
\"\"\" then greenColor else \"#FF0000\")+\"\\\">\"+OpenModelica.Scripting.Internal.Time.readableTime(total)+\" | \" +
@@ -229,6 +229,7 @@ str:="Recursive BuildModel Test
Tested Library: "+libraryString+" "+libraryVersionRevision+"
BuildModel time limit: "+ulimitOmc+"s
Simulation time limit: "+ulimitExe+"s
+Default tolerance: "+String(default_tolerance)+"
Flags: setCommandLineOptions(\"+d=nogen,initialization\"); setMatchingAlgorithm(\"PFPlusExt\"); setIndexReductionMethod(\"dynamicStateSelection\");
Links are provided if getErrorString() or the simulation generates output. Green means success, yellow means success if +d=scodeInstShortcut was used. Red is bad and in general signifies a failure.
";
diff --git a/Examples/BuildModelRecursiveDiff.sh b/Examples/BuildModelRecursiveDiff.sh
index b6d0809fada..cb3093269ac 100755
--- a/Examples/BuildModelRecursiveDiff.sh
+++ b/Examples/BuildModelRecursiveDiff.sh
@@ -19,3 +19,5 @@ egrep "$SIM" "$2" | egrep -o "$SEARCH" | tr -d "<> (" > "$2.sim"
echo "Sim diff (failures between $REV1 and $REV2 - *plus is bad*)"
diff -u "$1.sim" "$2.sim" | grep "^[+-][A-Za-z0-9._]"
rm -f "$1.build" "$2.build" "$1.sim" "$2.sim"
+
+# xpath -e "html/body/table/tr/td[2][@bgcolor = '#FF0000']/../td[1]/text()" BuildModelRecursive.html