void output_saveResults(Project* project, double reportTime) // // Input: reportTime = elapsed simulation time (millisec) // Output: none // Purpose: writes computed results for current report time to binary file. // { int i; DateTime reportDate = getDateTime(project,reportTime); REAL8 date; if ( reportDate < project->ReportStart ) return; for (i=0; i<MAX_SYS_RESULTS; i++) project->SysResults[i] = 0.0f; date = reportDate; fwrite(&date, sizeof(REAL8), 1, project->Fout.file); if (project->Nobjects[SUBCATCH] > 0) output_saveSubcatchResults(project,reportTime, project->Fout.file); if (project->Nobjects[NODE] > 0) output_saveNodeResults(project,reportTime, project->Fout.file); if (project->Nobjects[LINK] > 0) output_saveLinkResults(project,reportTime, project->Fout.file); fwrite(project->SysResults, sizeof(REAL4), MAX_SYS_RESULTS, project->Fout.file); if ( project->Foutflows.mode == SAVE_FILE && !project->IgnoreRouting ) iface_saveOutletResults(project,reportDate, project->Foutflows.file); project->Nperiods++; }
void output_saveResults(double reportTime) // // Input: reportTime = elapsed simulation time (millisec) // Output: none // Purpose: writes computed results for current report time to binary file. // { int i; DateTime reportDate = getDateTime(reportTime); REAL8 date; if ( reportDate < ReportStart ) return; for (i=0; i<MAX_SYS_RESULTS; i++) SysResults[i] = 0.0f; date = reportDate; fwrite(&date, sizeof(REAL8), 1, Fout.file); if (Nobjects[SUBCATCH] > 0) output_saveSubcatchResults(reportTime, Fout.file); if (Nobjects[NODE] > 0) output_saveNodeResults(reportTime, Fout.file); if (Nobjects[LINK] > 0) output_saveLinkResults(reportTime, Fout.file); fwrite(SysResults, sizeof(REAL4), MAX_SYS_RESULTS, Fout.file); if ( Foutflows.mode == SAVE_FILE && RouteModel != NO_ROUTING ) //(5.0.014 - LR) iface_saveOutletResults(reportDate, Foutflows.file); Nperiods++; }