| 1 | // OpenModelica OMCompiler v1.13.0-dev.287+g0e14e98
|
|---|
| 2 | // Configured 2017-12-02 05:12:37 using arguments: '--disable-option-checking --prefix=/home/adrpo/testing/newinst/OpenModelica/build --with-cppruntime --without-omc --disable-modelica3d CC=clang CXX=clang++ FC=gfortran CFLAGS=-O2 -march=native --with-omlibrary=all --with-ombuilddir=/home/adrpo/testing/newinst/OpenModelica/build --cache-file=/dev/null --srcdir=.'
|
|---|
| 3 | // Ubuntu 16.04.3 LTS x86_64
|
|---|
| 4 | "ScalableTestSuite.Electrical.BreakerCircuits.Verification.BreakerNetwork_3_Array";
|
|---|
| 5 | echo(false);
|
|---|
| 6 | alarm(3000);
|
|---|
| 7 | loadString("
|
|---|
| 8 | function cell
|
|---|
| 9 | input Real elapsedTime;
|
|---|
| 10 | input Boolean greenOnOk := false;
|
|---|
| 11 | input String greenColor := \"#00FF00\";
|
|---|
| 12 | input String mdFile := \"\";
|
|---|
| 13 | output String str;
|
|---|
| 14 | algorithm
|
|---|
| 15 | str := if mdFile == \"\" then \"\" else \" <a href=\\\"files/mdpad_local.html?\"+mdFile+\"\\\"><img width=\\\"16px\\\" src=\\\"files/Modelica.Icons.Example.svg\\\"></img></a>\";
|
|---|
| 16 | str := if elapsedTime==-1.0 then \"<td bgcolor=\\\"#FF0000\\\"> </td>\" else ((if greenOnOk then \"<td bgcolor=\\\"\" + greenColor + \"\\\">\" else \"<td>\") +
|
|---|
| 17 | OpenModelica.Scripting.Internal.Time.readableTime(elapsedTime)+str+\"</td>\");
|
|---|
| 18 | end cell;
|
|---|
| 19 | function length input String str; output Integer len; external \"C\" len=ModelicaStrings_length(str); end length;
|
|---|
| 20 | function substring input String str; input Integer i1,i2; output String out; external \"C\" out=ModelicaStrings_substring(str,i1,i2); end substring;
|
|---|
| 21 | function firstPart input String str; input Integer maxLength := 4096; output String out; algorithm out := if length(str) < maxLength then str else (substring(str,1,maxLength) + \"
|
|---|
| 22 | ... (output truncated, was \" + String(length(str)) + \" bytes)\"); end firstPart;
|
|---|
| 23 | function csvFileToVariable
|
|---|
| 24 | input String str;
|
|---|
| 25 | output String out;
|
|---|
| 26 | protected
|
|---|
| 27 | String matches[2];
|
|---|
| 28 | algorithm
|
|---|
| 29 | (,matches) := OpenModelica.Scripting.regex(str,\"^.*[.]diff[.](.*)$\",2);
|
|---|
| 30 | out := matches[2];
|
|---|
| 31 | end csvFileToVariable;
|
|---|
| 32 | function testcase
|
|---|
| 33 | input Real elapsedTime;
|
|---|
| 34 | input Boolean success;
|
|---|
| 35 | input String errNoXMLLong;
|
|---|
| 36 | output String str;
|
|---|
| 37 | protected
|
|---|
| 38 | String errXML;
|
|---|
| 39 | algorithm
|
|---|
| 40 | errXML := OpenModelica.Scripting.escapeXML(firstPart(errNoXMLLong,16*1024)); // 16 kB log per test should be enough; increase if there is a good reason to do so
|
|---|
| 41 | str:=\"<testcase name=\\\"ScalableTestSuite.Electrical.BreakerCircuits.Verification.BreakerNetwork_3_Array\\\" elapsedTime=\\\"\"+String(elapsedTime)+\"\\\">\"+(
|
|---|
| 42 | if not success then \"<error type=\\\"Failure\\\" />\"
|
|---|
| 43 | else \"\"
|
|---|
| 44 | )+(
|
|---|
| 45 | if errXML <> \"\" then (\"<system-out>\" + errXML + \"</system-out>\")
|
|---|
| 46 | else \"\"
|
|---|
| 47 | )+
|
|---|
| 48 | \"</testcase>
|
|---|
| 49 | \";
|
|---|
| 50 | end testcase;
|
|---|
| 51 | ");getErrorString();
|
|---|
| 52 | statFile := "ScalableTestSuite.Electrical.BreakerCircuits.Verification.BreakerNetwork_3_Array.stat";
|
|---|
| 53 | writeFile("BuildModelRecursive.html","ScalableTestSuite.Electrical.BreakerCircuits.Verification.BreakerNetwork_3_Array
|
|---|
| 54 | ",append=true);
|
|---|
| 55 | writeFile(statFile,"<tr><td bgcolor=\"#ff0000\">ScalableTestSuite.Electrical.BreakerCircuits.Verification.BreakerNetwork_3_Array</td></tr>");getErrorString();
|
|---|
| 56 | writeFile(statFile + ".flat", testcase(0,false,"killed"));getErrorString();
|
|---|
| 57 | writeFile(statFile + ".compile", testcase(0,false,"killed"));getErrorString();
|
|---|
| 58 | writeFile(statFile + ".sim", testcase(0,false,"killed"));getErrorString();
|
|---|
| 59 | writeFile(statFile + ".verify", testcase(0,false,"killed"));getErrorString();
|
|---|
| 60 | writeFile("files/ScalableTestSuite.Electrical.BreakerCircuits.Verification.BreakerNetwork_3_Array.uses", "");getErrorString();
|
|---|
| 61 |
|
|---|
| 62 | outputFormat:="default";
|
|---|
| 63 | javascript:=false;
|
|---|
| 64 | mslRegressionOutput:="";
|
|---|
| 65 |
|
|---|
| 66 | setCommandLineOptions("--daeMode=dynamic -d=execstat,nogen,initialization,backenddaeinfo,discreteinfo,stateselection,newInst"); ulimitExe:="3000"; ulimitOmc:="3000"; sortFiles:=false;
|
|---|
| 67 | extraSimFlags := "-mei=4000 -daeMode -s=ida -idaLS=klu";
|
|---|
| 68 |
|
|---|
| 69 | loadModel(ScalableTestSuite,{"default"});
|
|---|
| 70 |
|
|---|
| 71 | reference_reltol:=0.003;
|
|---|
| 72 | reference_reltolDiffMinMax:=0.003;
|
|---|
| 73 | reference_rangeDelta:=0.001;
|
|---|
| 74 | simFlags:="-abortSlowSimulation -alarm=3000 -mei=4000 -daeMode -s=ida -idaLS=klu";
|
|---|
| 75 |
|
|---|
| 76 | referenceOK := false;
|
|---|
| 77 | referenceFiles := "";
|
|---|
| 78 | referenceCell := if referenceFiles == "" then "" else "<td> </td>";
|
|---|
| 79 | reference := "/ScalableTestSuite.Electrical.BreakerCircuits.Verification.BreakerNetwork_3_Array.mat";
|
|---|
| 80 | referenceExists := referenceFiles <> "" and regularFileExists(reference);
|
|---|
| 81 | if not referenceExists then
|
|---|
| 82 | reference := "/ScalableTestSuite/Electrical/BreakerCircuits/Verification/BreakerNetwork_3_Array/BreakerNetwork_3_Array.mat";
|
|---|
| 83 | referenceExists := referenceFiles <> "" and regularFileExists(reference);
|
|---|
| 84 | end if;
|
|---|
| 85 |
|
|---|
| 86 | // outputFormat can be overridden in CustomCommands.mos, so we set it to 'default' first
|
|---|
| 87 | outputFormat := if outputFormat == "default" then (if referenceExists then "mat" else "empty") else outputFormat;
|
|---|
| 88 |
|
|---|
| 89 | compareVarsUri := "modelica://" + /*libraryString*/ "Buildings" + "/Resources/Scripts/OpenModelica/compareVars/ScalableTestSuite.Electrical.BreakerCircuits.Verification.BreakerNetwork_3_Array.mos";
|
|---|
| 90 | (compareVarsFile,compareVarsFileMessages) := uriToFilename(compareVarsUri);
|
|---|
| 91 |
|
|---|
| 92 | if regularFileExists(compareVarsFile) then
|
|---|
| 93 | runScript(compareVarsFile);
|
|---|
| 94 | vars := compareVars;
|
|---|
| 95 | variableFilter := sum(stringReplace(stringReplace(s,"[","."),"]",".") + "|" for s in vars) + "time";
|
|---|
| 96 | numCompared := size(vars,1);
|
|---|
| 97 | emit_protected := " -emit_protected";
|
|---|
| 98 | elseif referenceExists then
|
|---|
| 99 | vars := readSimulationResultVars(reference, readParameters=true, openmodelicaStyle=true);
|
|---|
| 100 | variableFilter := sum(stringReplace(stringReplace(stringReplace(stringReplace(s,"[","."),"]","."),"(","."),")",".") + "|" for s in vars);
|
|---|
| 101 | numCompared := size(vars,1);
|
|---|
| 102 | emit_protected := " -emit_protected";
|
|---|
| 103 | /* print(variableFilter + "
|
|---|
| 104 | "); */
|
|---|
| 105 | else
|
|---|
| 106 | variableFilter := "";
|
|---|
| 107 | outputFormat := "empty";
|
|---|
| 108 | emit_protected := "";
|
|---|
| 109 | end if;
|
|---|
| 110 |
|
|---|
| 111 | writeFile("files/ScalableTestSuite.Electrical.BreakerCircuits.Verification.BreakerNetwork_3_Array.uses", sum(typeNameString(c) + "
|
|---|
| 112 | " for c in OpenModelica.Scripting.getUsedClassNames(ScalableTestSuite.Electrical.BreakerCircuits.Verification.BreakerNetwork_3_Array)));getErrorString();
|
|---|
| 113 |
|
|---|
| 114 | // Use twice as many output points as the experiment annotation suggests. Else aim for 5000 points.
|
|---|
| 115 | (startTime,stopTime,tolerance,numberOfIntervals,stepSize):=getSimulationOptions(ScalableTestSuite.Electrical.BreakerCircuits.Verification.BreakerNetwork_3_Array,defaultTolerance=1e-06,defaultNumberOfIntervals=2500);
|
|---|
| 116 | numberOfIntervals := 2*numberOfIntervals;
|
|---|
| 117 | alarm(3000); // Reset the alarm in case the other parts took a long time (reading simulation results)
|
|---|
| 118 | res:=buildModel(ScalableTestSuite.Electrical.BreakerCircuits.Verification.BreakerNetwork_3_Array,tolerance=tolerance,outputFormat=outputFormat,numberOfIntervals=numberOfIntervals,variableFilter=variableFilter);
|
|---|
| 119 | // We built the model fine, so reset the alarm. The simulation executable will also have an alarm, making only result verification a potential to stall.
|
|---|
| 120 | alarm(0);
|
|---|
| 121 |
|
|---|
| 122 | greenColor := "#00FF00";
|
|---|
| 123 | errFile:="files/ScalableTestSuite.Electrical.BreakerCircuits.Verification.BreakerNetwork_3_Array.err";
|
|---|
| 124 | simFile:="files/ScalableTestSuite.Electrical.BreakerCircuits.Verification.BreakerNetwork_3_Array.sim";
|
|---|
| 125 | (nmessage,nerror,nwarning) := countMessages();
|
|---|
| 126 | errorLinkClass := if nerror>0 then "messagesError" elseif nwarning>0 then "messagesWarning" else "messagesInfo";
|
|---|
| 127 | err:=getErrorString();
|
|---|
| 128 | system("rm -f " + errFile);
|
|---|
| 129 | writeFile(simFile,"");
|
|---|
| 130 | if err <> "" then
|
|---|
| 131 | writeFile(errFile,err);
|
|---|
| 132 | end if;
|
|---|
| 133 |
|
|---|
| 134 | build :=OpenModelica.Scripting.Internal.Time.timerTock(OpenModelica.Scripting.Internal.Time.RT_CLOCK_BUILD_MODEL);
|
|---|
| 135 | total :=OpenModelica.Scripting.Internal.Time.timerTock(OpenModelica.Scripting.Internal.Time.RT_CLOCK_SIMULATE_TOTAL);
|
|---|
| 136 | templates:=OpenModelica.Scripting.Internal.Time.timerTock(OpenModelica.Scripting.Internal.Time.RT_CLOCK_TEMPLATES);
|
|---|
| 137 | simcode :=OpenModelica.Scripting.Internal.Time.timerTock(OpenModelica.Scripting.Internal.Time.RT_CLOCK_SIMCODE);
|
|---|
| 138 | backend :=OpenModelica.Scripting.Internal.Time.timerTock(OpenModelica.Scripting.Internal.Time.RT_CLOCK_BACKEND);
|
|---|
| 139 | frontend :=OpenModelica.Scripting.Internal.Time.timerTock(OpenModelica.Scripting.Internal.Time.RT_CLOCK_FRONTEND);
|
|---|
| 140 |
|
|---|
| 141 | frontend :=if backend <> -1.0 then frontend-backend else frontend;
|
|---|
| 142 | backend :=if simcode <> -1.0 then backend-simcode else backend;
|
|---|
| 143 | simcode :=if templates <> -1.0 then simcode-templates else simcode;
|
|---|
| 144 | templates:=if build <> -1.0 then templates-build else templates;
|
|---|
| 145 | timeDiff := -1.0;
|
|---|
| 146 |
|
|---|
| 147 | OpenModelica.Scripting.Internal.Time.timerTick(OpenModelica.Scripting.Internal.Time.RT_CLOCK_USER_RESERVED);
|
|---|
| 148 | buildRes := res[1] <> "";
|
|---|
| 149 | simRes := if not buildRes then false else 0 == system("./ScalableTestSuite.Electrical.BreakerCircuits.Verification.BreakerNetwork_3_Array "+simFlags+emit_protected+" > "+simFile+" 2>&1");
|
|---|
| 150 | if buildRes and javascript then
|
|---|
| 151 | system("cp ScalableTestSuite.Electrical.BreakerCircuits.Verification.BreakerNetwork_3_Array.js ScalableTestSuite.Electrical.BreakerCircuits.Verification.BreakerNetwork_3_Array_info.xml ScalableTestSuite.Electrical.BreakerCircuits.Verification.BreakerNetwork_3_Array_init.xml ScalableTestSuite.Electrical.BreakerCircuits.Verification.BreakerNetwork_3_Array.md files/");
|
|---|
| 152 | end if;
|
|---|
| 153 | mdFile := if javascript then "ScalableTestSuite.Electrical.BreakerCircuits.Verification.BreakerNetwork_3_Array.md" else "";
|
|---|
| 154 |
|
|---|
| 155 | resFile := "ScalableTestSuite.Electrical.BreakerCircuits.Verification.BreakerNetwork_3_Array_res." + outputFormat;
|
|---|
| 156 |
|
|---|
| 157 | if mslRegressionOutput <> "" and referenceExists then
|
|---|
| 158 | mslRegressionOutput := mslRegressionOutput + "/ScalableTestSuite/Electrical/BreakerCircuits/Verification/BreakerNetwork_3_Array/";
|
|---|
| 159 | mkdir(mslRegressionOutput);
|
|---|
| 160 | simFailLog := mslRegressionOutput+"simulate_failed.log";
|
|---|
| 161 | simSuccessLog := mslRegressionOutput+"simulate_success.log";
|
|---|
| 162 | buildFailLog := mslRegressionOutput+"translate_failed.log";
|
|---|
| 163 | buildSuccessLog := mslRegressionOutput+"translate_success.log";
|
|---|
| 164 |
|
|---|
| 165 | system("rm -f "+(if simRes then simFailLog else simSuccessLog));
|
|---|
| 166 | system("rm -f "+(if buildRes then buildFailLog else buildSuccessLog));
|
|---|
| 167 |
|
|---|
| 168 | system("cp "+simFile+" " + simFile + ".tmp");
|
|---|
| 169 | if simRes then
|
|---|
| 170 | system("cp "+resFile+" ScalableTestSuite.Electrical.BreakerCircuits.Verification.BreakerNetwork_3_Array.csv");
|
|---|
| 171 | compareFilesAndMove("ScalableTestSuite.Electrical.BreakerCircuits.Verification.BreakerNetwork_3_Array.csv", mslRegressionOutput+"ScalableTestSuite.Electrical.BreakerCircuits.Verification.BreakerNetwork_3_Array.csv");
|
|---|
| 172 | else
|
|---|
| 173 | system("rm -f " + mslRegressionOutput + "ScalableTestSuite.Electrical.BreakerCircuits.Verification.BreakerNetwork_3_Array.csv");
|
|---|
| 174 | end if;
|
|---|
| 175 | system("cp ScalableTestSuite.Electrical.BreakerCircuits.Verification.BreakerNetwork_3_Array.mos ScalableTestSuite.Electrical.BreakerCircuits.Verification.BreakerNetwork_3_Array.mos.tmp");
|
|---|
| 176 |
|
|---|
| 177 | if err == "" then
|
|---|
| 178 | system("echo > " + errFile + ".tmp");
|
|---|
| 179 | else
|
|---|
| 180 | system("cp " + errFile + " " + errFile + ".tmp");
|
|---|
| 181 | end if;
|
|---|
| 182 |
|
|---|
| 183 | compareFilesAndMove(errFile + ".tmp", if buildRes then buildSuccessLog else buildFailLog);
|
|---|
| 184 | compareFilesAndMove(simFile + ".tmp", if buildRes then simSuccessLog else simFailLog);
|
|---|
| 185 | compareFilesAndMove("ScalableTestSuite.Electrical.BreakerCircuits.Verification.BreakerNetwork_3_Array.mos.tmp", mslRegressionOutput+"creation.txt");
|
|---|
| 186 | end if;
|
|---|
| 187 |
|
|---|
| 188 | system("sed -i '300,$ d' '" + simFile + "'"); // Only keep the top 300 lines
|
|---|
| 189 | timeSim := OpenModelica.Scripting.Internal.Time.timerTock(OpenModelica.Scripting.Internal.Time.RT_CLOCK_USER_RESERVED);
|
|---|
| 190 |
|
|---|
| 191 | if simRes then
|
|---|
| 192 | system("touch ScalableTestSuite.Electrical.BreakerCircuits.Verification.BreakerNetwork_3_Array.simsuccess");
|
|---|
| 193 | prefix := "files/ScalableTestSuite.Electrical.BreakerCircuits.Verification.BreakerNetwork_3_Array.diff";
|
|---|
| 194 | if referenceExists then
|
|---|
| 195 | OpenModelica.Scripting.Internal.Time.timerTick(OpenModelica.Scripting.Internal.Time.RT_CLOCK_USER_RESERVED);
|
|---|
| 196 | getErrorString();
|
|---|
| 197 | (referenceOK,diffVars) := diffSimulationResults(resFile,reference,prefix,relTol=reference_reltol,relTolDiffMinMax=reference_reltolDiffMinMax,rangeDelta=reference_rangeDelta);
|
|---|
| 198 | errVerify := getErrorString();
|
|---|
| 199 | if errVerify <> "" then
|
|---|
| 200 | writeFile(errFile, "\nVariables in the reference:"+sum(var+"," for var in OpenModelica.Scripting.readSimulationResultVars(reference, openmodelicaStyle=true)), append=true);
|
|---|
| 201 | writeFile(errFile, "\nVariables in the result:"+sum(var+"," for var in OpenModelica.Scripting.readSimulationResultVars(resFile))+"\n" + errVerify, append=true);
|
|---|
| 202 | end if;
|
|---|
| 203 | if referenceOK then
|
|---|
| 204 | system("touch ScalableTestSuite.Electrical.BreakerCircuits.Verification.BreakerNetwork_3_Array.verifysuccess");
|
|---|
| 205 | end if;
|
|---|
| 206 | timeDiff := OpenModelica.Scripting.Internal.Time.timerTock(OpenModelica.Scripting.Internal.Time.RT_CLOCK_USER_RESERVED);
|
|---|
| 207 | diffFiles := {prefix + "." + var for var in diffVars};
|
|---|
| 208 | // Create a file containing only the calibrated variables, for easy display
|
|---|
| 209 | if not referenceOK then
|
|---|
| 210 | timeDiff := OpenModelica.Scripting.Internal.Time.timerTock(OpenModelica.Scripting.Internal.Time.RT_CLOCK_USER_RESERVED);
|
|---|
| 211 | referenceCell := "<td bgcolor=\"#FF0000\">"+OpenModelica.Scripting.Internal.Time.readableTime(timeDiff)+", <a href=\"files/ScalableTestSuite.Electrical.BreakerCircuits.Verification.BreakerNetwork_3_Array.diff.html\">"+String(size(diffFiles,1))+"/"+String(numCompared)+" signals failed</a></td>";
|
|---|
| 212 | writeFile("files/ScalableTestSuite.Electrical.BreakerCircuits.Verification.BreakerNetwork_3_Array.diff.html","<html><body><h1>ScalableTestSuite.Electrical.BreakerCircuits.Verification.BreakerNetwork_3_Array differences from the reference file</h1><p>startTime: "+String(startTime)+"</p><p>stopTime: "+String(stopTime)+"</p><p>Simulated using tolerance: "+String(tolerance)+"</p><ul>" + sum("<li>"+csvFileToVariable(file)+" <a href=\""+OpenModelica.Scripting.basename(file)+".html\">(javascript)</a> <a href=\""+OpenModelica.Scripting.basename(file)+".csv\">(csv)</a></li>" for file in diffFiles) + "</ul></body></html>");
|
|---|
| 213 | {writeFile(prefix + "." + var + ".html","<html>
|
|---|
| 214 | <head>
|
|---|
| 215 | <script type=\"text/javascript\" src=\"dygraph-combined.js\"></script>
|
|---|
| 216 | <style type=\"text/css\">
|
|---|
| 217 | #graphdiv {
|
|---|
| 218 | position: absolute;
|
|---|
| 219 | left: 10px;
|
|---|
| 220 | right: 10px;
|
|---|
| 221 | top: 40px;
|
|---|
| 222 | bottom: 10px;
|
|---|
| 223 | }
|
|---|
| 224 | </style>
|
|---|
| 225 | </head>
|
|---|
| 226 | <body>
|
|---|
| 227 | <div id=\"graphdiv\"></div>
|
|---|
| 228 | <p><input type=checkbox id=\"0\" checked onClick=\"change(this)\">
|
|---|
| 229 | <label for=\"0\">reference</label>
|
|---|
| 230 | <input type=checkbox id=\"1\" checked onClick=\"change(this)\">
|
|---|
| 231 | <label for=\"1\">actual</label>
|
|---|
| 232 | <input type=checkbox id=\"2\" checked onClick=\"change(this)\">
|
|---|
| 233 | <label for=\"2\">high</label>
|
|---|
| 234 | <input type=checkbox id=\"3\" checked onClick=\"change(this)\">
|
|---|
| 235 | <label for=\"3\">low</label>
|
|---|
| 236 | <input type=checkbox id=\"4\" checked onClick=\"change(this)\">
|
|---|
| 237 | <label for=\"4\">error</label>
|
|---|
| 238 | <input type=checkbox id=\"5\" onClick=\"change(this)\">
|
|---|
| 239 | <label for=\"5\">actual (original)</label>
|
|---|
| 240 | Parameters used for the comparison: Relative tolerance "+String(reference_reltol)+" (local), "+String(reference_reltolDiffMinMax)+" (relative to max-min). Range delta "+String(reference_rangeDelta)+".</p>
|
|---|
| 241 | <script type=\"text/javascript\">
|
|---|
| 242 | g = new Dygraph(document.getElementById(\"graphdiv\"),
|
|---|
| 243 | \""+OpenModelica.Scripting.basename(prefix + "." + var+".csv")+"\",{title: '"+var+"',
|
|---|
| 244 | legend: 'always',
|
|---|
| 245 | connectSeparatedPoints: true,
|
|---|
| 246 | xlabel: ['time'],
|
|---|
| 247 | y2label: ['error'],
|
|---|
| 248 | series : { 'error': { axis: 'y2' } },
|
|---|
| 249 | colors: ['blue','red','teal','lightblue','orange','black'],
|
|---|
| 250 | visibility: [true,true,true,true,true,false]
|
|---|
| 251 | });
|
|---|
| 252 | function change(el) {
|
|---|
| 253 | g.setVisibility(parseInt(el.id), el.checked);
|
|---|
| 254 | }
|
|---|
| 255 | </script>
|
|---|
| 256 | </body>
|
|---|
| 257 | </html>") for var in diffVars};
|
|---|
| 258 |
|
|---|
| 259 | else
|
|---|
| 260 | referenceCell := "<td bgcolor=\"#00FF00\">"+OpenModelica.Scripting.Internal.Time.readableTime(timeDiff)+" ("+String(numCompared)+" signals)</td>";
|
|---|
| 261 | end if;
|
|---|
| 262 | end if;
|
|---|
| 263 | end if;
|
|---|
| 264 |
|
|---|
| 265 | sim:=readFile(simFile);
|
|---|
| 266 | str:="<tr><td>" + (if err <> "" then "<a class=\""+errorLinkClass+"\" href=\""+errFile+"\">ScalableTestSuite.Electrical.BreakerCircuits.Verification.BreakerNetwork_3_Array</a>" else "ScalableTestSuite.Electrical.BreakerCircuits.Verification.BreakerNetwork_3_Array") +
|
|---|
| 267 | (if sim <> "" then " (<a href=\""+simFile+"\">sim</a>)" else "") +
|
|---|
| 268 | "</td>" + referenceCell +
|
|---|
| 269 | cell(if simRes then timeSim else -1.0,greenOnOk=true,greenColor=greenColor,mdFile=mdFile) +
|
|---|
| 270 | "<td bgcolor=\""+(if res[1]<>"" then greenColor else "#FF0000")+"\">"+OpenModelica.Scripting.Internal.Time.readableTime(total)+"</td>" +
|
|---|
| 271 | sum(cell(d,greenColor=greenColor) for d in {frontend,backend,simcode,templates,build}) + "</tr>\n";getErrorString();
|
|---|
| 272 | writeFile(statFile,str);getErrorString();
|
|---|
| 273 | skip:="<testcase name=\"ScalableTestSuite.Electrical.BreakerCircuits.Verification.BreakerNetwork_3_Array\"><skipped /></testcase>";
|
|---|
| 274 | str:=testcase(frontend,backend <> -1.0,err);
|
|---|
| 275 | writeFile(statFile + ".flat", str);getErrorString();
|
|---|
| 276 | str:=if backend <> -1.0 then testcase(total,buildRes,err) else skip;
|
|---|
| 277 | writeFile(statFile + ".compile", str);getErrorString();
|
|---|
| 278 | str:=if buildRes then testcase(timeSim,simRes,sim) else skip;
|
|---|
| 279 | writeFile(statFile + ".sim", str);getErrorString();
|
|---|
| 280 | str:=if simRes then testcase(timeDiff,referenceOK,if referenceOK then "" else "See the generated report for details") else skip;
|
|---|
| 281 | writeFile(statFile + ".verify", str);getErrorString();
|
|---|