Skip to content
This repository was archived by the owner on May 18, 2019. It is now read-only.

Commit 8b33074

Browse files
arun3688OpenModelica-Hudson
authored andcommitted
generate dataReconc-csvInputs when not exists
Belonging to [master]: - #3066
1 parent a5eccba commit 8b33074

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

Compiler/BackEnd/Uncertainties.mo

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -462,11 +462,12 @@ algorithm
462462
tmpglobalKnownVars=BackendVariable.listVar(List.map1(listAppend(tempvar,tempvar1),BackendVariable.setVarDirection,DAE.INPUT()));
463463
shared = BackendDAEUtil.setSharedGlobalKnownVars(shared,BackendVariable.mergeVariables(globalKnownVars, tmpglobalKnownVars));
464464
//BackendDump.dumpVariables(tmpglobalKnownVars,"inputvars");
465-
466465
// write the variables to the csv file
467-
str = "Variable Names,Measured Value-x,HalfWidthConfidenceInterval,xi,xk,rx_ik\n";
468-
str = dumpToCsv(str,tempvar);
469-
System.writeFile(modelname+"_Inputs.csv", str);
466+
if not System.regularFileExists(modelname+"_Inputs.csv") then
467+
str = "Variable Names,Measured Value-x,HalfWidthConfidenceInterval,xi,xk,rx_ik\n";
468+
str = dumpToCsv(str,tempvar);
469+
System.writeFile(modelname+"_Inputs.csv", str);
470+
end if;
470471
outDae=BackendDAE.DAE({currentSystem}, shared);
471472
then
472473
outDae;

0 commit comments

Comments
 (0)