ChangingRuleBased_v2
The code has the following modifications: - RULE section is written just after controls - SYST is now written SYSTEM (also PRESSURE, DEMAND, POWER, SETTING, FILLTIME and DRAINTIME have been changed) - some description to the function writeRuleinInp has been added - Actions are now written in the correct order
This commit is contained in:
@@ -421,6 +421,17 @@ int saveinpfile(char *fname)
|
||||
}
|
||||
}
|
||||
|
||||
/*moved after control section */
|
||||
fprintf(f, "\n\n[RULES]");
|
||||
for (i=1; i<=Nrules; i++)
|
||||
{
|
||||
fprintf(f, "\nRULE %s",Rule[i].label);
|
||||
errcode = writeRuleinInp(f, i);
|
||||
fprintf(f, "\n");
|
||||
}
|
||||
//fprintf(f, "\n\n");
|
||||
/* end move after control section */
|
||||
|
||||
/* Write [QUALITY] section */
|
||||
/* (Skip nodes with default quality of 0) */
|
||||
|
||||
@@ -624,6 +635,7 @@ int saveinpfile(char *fname)
|
||||
}
|
||||
fprintf(f, "\n\n");
|
||||
|
||||
/*moved after control section
|
||||
fprintf(f, "\n\n[RULES]");
|
||||
for (i=1; i<=Nrules; i++)
|
||||
{
|
||||
@@ -632,6 +644,7 @@ int saveinpfile(char *fname)
|
||||
fprintf(f, "\n");
|
||||
}
|
||||
fprintf(f, "\n\n");
|
||||
end move after control section */
|
||||
|
||||
/* Write [COORDINATES] section */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user