10. Daily/Yearly Outputs |
Top Previous Next |
As you might saw from the previous task you can output variables or results from SimComponents to the output files, but you also can control the frequency of the output, which means how often the result will be written to the output file. It can be controlled by the "frequence" attribute, which can be:
Frequencies types |
Definition |
frequence="DAILY" |
Daily output |
frequence="MONTHLY" |
Monthly output |
frequence="YEARLY" |
Yearly output |
frequence="COMPLEX" |
Given rule |
frequence="BOOLEAN" |
Based on a BOOLEAN variable (e.g. when DoHarvest is TRUE) |
frequence="END" |
At end of simulations |
The frequency of the output "Lintul2Daily" in solution 10_DailyYearlyOutputs.sol.xml is frequence="DAILY" the period between start and end dates is one year, which means that at the end of simulation you will have 365 entries in the output file.
Now let's exercise
Task 10. Change the frequency to YEARLY in the output with id="Lintul2Daily" in the 10_DailyYearlyOutputs.sol.xml
You can also add attribute 'mode' when the frequence='YEARLY' to each output variable, e.g.
<out id="TSUM" datatype="DOUBLE" mode="MAX" rule="Lintul2.sTSUM" />
The modes of the output variables are: SUM, MAX, MIN, AVG, VAR, IGNORE, FIRST, LAST.
Add the 'AVG' mode to the last output variable of the output so the output will contain annual average for that variable
Hints
- Add attribute mode as in the example above
Solution
Open the 10_DailyYearlyOutputs_Answer.sol.xml to see how it should be done.
*ModelSolutions are found in simplace_modules\test\training\solution\1_WorkingWithSolutions