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:
AngelaMarchi
2016-11-08 18:37:54 +10:30
parent 4e349cd3c1
commit 83dd6c7b7c
4 changed files with 79 additions and 28 deletions

View File

@@ -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 */