EPANET頭文件解讀系列8——FUNCS.H

/*
**************************************************************************
                                                                  
FUNCS.H -- Function Prototypes for EPANET Program                      
                                                                  
VERSION:    2.00
DATE:       5/8/00
            9/25/00
            10/25/00
            12/29/00
            3/1/01
            2/14/08    (2.00.12)
AUTHOR:     L. Rossman
            US EPA - NRMRL
                                                                               
**************************************************************************
*/node

/*****************************************************************/
/*   Most float arguments have been changed to double - 7/3/07   */
/*****************************************************************/
//main module providing supervisory control;主要模塊提供監控
/* ------- EPANET.C --------------------*/
/*
**  NOTE: The exportable functions that can be called
**        via the DLL are prototyped in TOOLKIT.H.         
*/
//EPANET.C中函數原型的聲明分別由下列函數以及TOOLKIT.H中所聲明,並且TOOLKIT.H中所聲明的函數能夠經過DLL的方式來進行調用。
void    initpointers(void);               /* Initializes pointers       */
int     allocdata(void);                  /* Allocates memory           */
void    freeTmplist(STmplist *);          /* Frees items in linked list */
void    freeFloatlist(SFloatlist *);      /* Frees list of floats       */
void    freedata(void);                   /* Frees allocated memory     */react

...函數


/* ------- INPUT1.C --------------------*/
//controls processing of input data;輸入數據的處理控制。
int     getdata(void);                    /* Gets network data          */
void    setdefaults(void);                /* Sets default values        */
void    initreport(void);                 /* Initializes report options */
void    adjustdata(void);                 /* Adjusts input data         */
int     inittanks(void);                  /* Initializes tank levels    */
void    initunits(void);                  /* Determines reporting units */
void    convertunits(void);               /* Converts data to std. units*/ui

/* -------- INPUT2.C -------------------*/
//reads data from input file;從輸入文件讀入數據
int     netsize(void);                    /* Determines network size    */
int     readdata(void);                   /* Reads in network data      */
int     newline(int, char *);             /* Processes new line of data */
int     addnodeID(int, char *);           /* Adds node ID to data base  */spa

...prototype

/* ---------- INPUT3.C -----------------*/
//parses individual lines of input data;一行行解析輸入數據
int     juncdata(void);                   /* Processes junction data    */
int     tankdata(void);                   /* Processes tank data        */
int     pipedata(void);                   /* Processes pipe data        */
int     pumpdata(void);                   /* Processes pump data        */
int     valvedata(void);                  /* Processes valve data       */orm

...ip

/* -------------- RULES.C --------------*/
//implements rule-based control of piping system;實現了基於規則的管道控制系統
void    initrules(void);                  /* Initializes rule base      */
void    addrule(char *);                  /* Adds rule to rule base     */
int     allocrules(void);                 /* Allocates memory for rule  */
int     ruledata(void);                   /* Processes rule input data  */
int     checkrules(long);                 /* Checks all rules           */
void    freerules(void);                  /* Frees rule base memory     */  get

/* ------------- REPORT.C --------------*/
//handles reporting of results to text file;將報告結果寫入到文本文件
int     writereport(void);                /* Writes formatted report    */
void    writelogo(void);                  /* Writes program logo        */input

...

/* --------- HYDRAUL.C -----------------*/
//computes extended period hydraulic behavior;計算延時水力結果
int     openhyd(void);                    /* Opens hydraulics solver    */

/*** Updated 3/1/01 ***/
void    inithyd(int);                     /* Re-sets initial conditions */

int     runhyd(long *);                   /* Solves 1-period hydraulics */
int     nexthyd(long *);                  /* Moves to next time period  */
void    closehyd(void);                   /* Closes hydraulics solver   */

...

/* ----------- SMATRIX.C ---------------*/
//sparse matrix linear equation solver routines;稀疏矩陣線性方程解算器例程,這部分是一些矩陣運算相關的函數
int     createsparse(void);               /* Creates sparse matrix      */
int     allocsparse(void);                /* Allocates matrix memory    */
void    freesparse(void);                 /* Frees matrix memory        */
int     buildlists(int);                  /* Builds adjacency lists     */

...

/* ----------- QUALITY.C ---------------*/
//tracks transport & fate of water quality;跟蹤水質,水質解算相關的函數聲明
int     openqual(void);                   /* Opens WQ solver system     */
void    initqual(void);                   /* Initializes WQ solver      */
int     runqual(long *);                  /* Gets current WQ results    */

...

/* ------------ OUTPUT.C ---------------*/
//handles transfer of data to and from binary files;處理二進制文件數據的輸入與輸出
int     savenetdata(void);                /* Saves basic data to file   */
int     savehyd(long *);                  /* Saves hydraulic solution   */
int     savehydstep(long *);              /* Saves hydraulic timestep   */
int     saveenergy(void);                 /* Saves energy usage         */
int     readhyd(long *);                  /* Reads hydraulics from file */
int     readhydstep(long *);              /* Reads time step from file  */
int     saveoutput(void);                 /* Saves results to file      */
int     nodeoutput(int, REAL4 *, double); /* Saves node results to file */
int     linkoutput(int, REAL4 *, double); /* Saves link results to file */
int     savefinaloutput(void);            /* Finishes saving output     */
int     savetimestat(REAL4 *, char);      /* Saves time stats to file   */
int     savenetreacts(double, double,
                      double, double);    /* Saves react. rates to file */
int     saveepilog(void);                 /* Saves output file epilog   */

/* ------------ INPFILE.C --------------*///saves modified input data to a text file;將輸入數據作格式等修改並保存到文本文件中int     saveinpfile(char *);              /* Saves network to text file  */

相關文章
相關標籤/搜索