09 2013 档案

摘要:如果选了Host-only,那么虚拟机与跑虚拟机的宿主就无法连通了。可以选用Bridged模式,那么虚拟机与跑虚拟机的主机连通了 阅读全文
posted @ 2013-09-23 16:23 KingOfFreedom 阅读(345) 评论(0) 推荐(1) 编辑
摘要:1 /* 2 ********************************************************************** 3 4 INPUT3.C -- Input data parser for EPANET; 5 6 VERSION: 2.00 7 DATE: 5/30/00 8 9/7/00 9 10/25/00 10 3/1/01 11 6/24/02 12 8/15/... 阅读全文
posted @ 2013-09-13 17:54 KingOfFreedom 阅读(1682) 评论(0) 推荐(0) 编辑
摘要:首先介绍下这3个文件的关系:可以说INPUT1.C的函数粒度最大,它的函数getdata()就完成了整个INPUT文件数据的读入,该函数又调用了INPUT2.C中的部分函数,INPUT2.C文件中的函数分为两类,一类是解析INPUT文件的函数;另一类是工具函数,包括将节点、管段数据存入哈希表中,构建哈希索引、字符串的匹配,从哈希表中查找数据等,该文件的粒度中等。而INPUT3.C的粒度是最细的,他是用于解析单行INPUT文件的对象内容并保存到内存中。INPUT3.C的组织结构也很简单,各个函数具有较大的相似性,分别是对INPUT文件中的不同段落数据的处理。 其中INPUT2.C文件中的unl. 阅读全文
posted @ 2013-09-13 17:37 KingOfFreedom 阅读(916) 评论(0) 推荐(0) 编辑
摘要:引自input2.Cint getfloat(char *s, double *y)/***-----------------------------------------------------------** Input: *s = character string ;输入:字符串** Output: *y = floating point number ;输出:doulbe类型的指针** returns 1 if conversion successful, 0 if not 如果转换成功返回1,否则返回0** Purpose: converts string to floating 阅读全文
posted @ 2013-09-12 09:54 KingOfFreedom 阅读(510) 评论(0) 推荐(0) 编辑
摘要:/*-----------------------------------------------------------------------------** hash.c**** Implementation of a simple Hash Table for string storage & retrieval**** Written by L. Rossman** Last Updated on 6/19/03**** The hash table data structure (HTable) is defined in "hash.h".** Int 阅读全文
posted @ 2013-09-12 09:20 KingOfFreedom 阅读(745) 评论(0) 推荐(0) 编辑
摘要:/***********************************************************************INPUT3.C -- Input data parser for EPANET;VERSION: 2.00DATE: 5/30/00 9/7/00 10/25/00 3/1/01 6/24/02 8/15/07 (2.00.11) 2/14/08 (2.00.12)AUTHOR: L. Rossman US EPA - NRMRLThis module parses data from each line of input from file InF 阅读全文
posted @ 2013-09-11 11:27 KingOfFreedom 阅读(990) 评论(0) 推荐(0) 编辑
摘要:What Epanet cand and cannot doGood news!Epanet can do most of the calculations you may need for your project,andthose that Epanet cannot do are actually pretty easy to do on a piece fo paper,You willuse Epanet mainly for: 》Determining what pipes with which diameters should be used. 》Determining what 阅读全文
posted @ 2013-09-10 17:39 KingOfFreedom 阅读(597) 评论(0) 推荐(0) 编辑
摘要:/************************************************************************* Global Variables for EPANET Program VERSION: 2.00 DATE: 5/8/00 6/24/02 2/14/08 (2.00.12)AUTHOR: L. Rossman US EPA - NRMRL *************************************************************************///该文件定义了EPANET程序中的全局变量。文件的组.. 阅读全文
posted @ 2013-09-10 15:42 KingOfFreedom 阅读(695) 评论(0) 推荐(0) 编辑
摘要:/*************************************************************************** FUNCS.H -- Function Prototypes for EPANET Program VERSION: 2.00DATE: 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 **************************************************************. 阅读全文
posted @ 2013-09-10 14:12 KingOfFreedom 阅读(402) 评论(0) 推荐(0) 编辑
摘要:/*************************************************************************** FUNCS.H -- Function Prototypes for EPANET Program VERSION: 2.00DATE: 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 **************************************************************. 阅读全文
posted @ 2013-09-10 11:46 KingOfFreedom 阅读(467) 评论(0) 推荐(0) 编辑
摘要://EPANET应用程序使用了大量的节点与管段数据,而且每个对象数据又有不同时段的数据,这些数据占用了大量内存,而mempool.h就是一个简单快速的内存分配相关的头文件/*** mempool.h**** Header for mempool.c**** The type alloc_handle_t provides an opaque reference to the** alloc pool - only the alloc routines know its structure.*/typedef struct{ long dummy;} alloc_handle_t;alloc_h 阅读全文
posted @ 2013-09-10 11:36 KingOfFreedom 阅读(388) 评论(0) 推荐(0) 编辑
摘要:该文件是EPANET中HASH.C的头文件,下面列出了该文件的源码以及我的中文注释/* HASH.H**** Header file for Hash Table module HASH.C***/#define HTMAXSIZE 1999#define NOTFOUND 0//哈希表结构,是一个单向链表结构struct HTentry{char *key;int data;structHTentry *next;};//定义一个指向哈希表的指针typedef struct HTentry *HTtable;//接口函数HTtable *HTcreate(void); //创建一个哈希表,并 阅读全文
posted @ 2013-09-10 11:27 KingOfFreedom 阅读(469) 评论(0) 推荐(0) 编辑
摘要:/************************************************************************ TYPES.H -- Global constants and data types for EPANET program VERSION: 2.00 DATE: 5/8/00 9/7/00 10/25/00 3/1/01 12/6/01 6/24/02 8/15/07 (2.00.11) 2/14/08 (2.00.12)AUTHOR: L. Rossman US EPA - NRMRL ***************************.. 阅读全文
posted @ 2013-09-10 11:10 KingOfFreedom 阅读(881) 评论(0) 推荐(0) 编辑
摘要:该头文件的功能与系列3中的TOOLKIT.H类似,而且内容也几乎一致,所以也就不再详细介绍。 阅读全文
posted @ 2013-09-10 09:39 KingOfFreedom 阅读(489) 评论(0) 推荐(0) 编辑
摘要:/********************************************************************TOOLKIT.H - Prototypes for EPANET Functions Exported to DLL Toolkit VERSION: 2.00DATE: 5/8/00 10/25/00 3/1/01 8/15/07 (2.00.11) 2/14/08 (2.00.12)AUTHOR: L. Rossman US EPA - NRMRL***************************************************** 阅读全文
posted @ 2013-09-10 09:21 KingOfFreedom 阅读(1021) 评论(0) 推荐(0) 编辑
摘要:在前一系统中介绍了text.h,回顾下,该文件包含了EPANET中所有字符串常量的定义,而ENUMSTXT.H文件则是以text.h中定义的字符串常量为基础,来对这些字符串常量进行合理的分组,形成字符串数组,这里的字符串用指针的形式来表示,也即用指针数组来进行分组。下面简单介绍下各个分组:ENUMSTXT.H for assignment of string constants to enumerated types 以下部分是整个ENUMSTXT.H的原文,以及红色部分是我增加的注释/*****************************************************. 阅读全文
posted @ 2013-09-09 17:42 KingOfFreedom 阅读(537) 评论(0) 推荐(0) 编辑
摘要:定义在TEXT.H文件中的字符常量都以小写开头,然后紧跟一个下划线,再接着就全是大写字母/***************************************************** String Constants for EPANET Program VERSION: 2.00 DATE: 5/8/00 10/25/00 8/15/07 (2.00.11) 2/14/08 (2.00.12)AUTHOR: L. Rossman US EPA - NRMRL *****************************************************//* --. 阅读全文
posted @ 2013-09-09 17:00 KingOfFreedom 阅读(791) 评论(0) 推荐(0) 编辑
摘要:/************************************************************************ ENUMSTXT.H -- Text strings for enumerated data types in EPANET VERSION: 2.00 DATE: 5/8/00AUTHOR: L. Rossman US EPA - NRMRL ***********************************************************************/char *NodeTxt[] = {t_JUNCTION.. 阅读全文
posted @ 2013-09-09 16:16 KingOfFreedom 阅读(265) 评论(0) 推荐(0) 编辑
摘要:#ifdef CLE //(2.00.11 - LR)int main(int argc, char *argv[])/*--------------------------------------------------------------** Input: argc = number of command line arguments** *argv[] = array of command line arguments** Output: none** Purpose: main program segment**** Command line for stand-alone ope 阅读全文
posted @ 2013-09-09 16:07 KingOfFreedom 阅读(360) 评论(0) 推荐(0) 编辑
摘要:在C语言中,一个函数总是占用一段连续的内存区,而函数名就是该函数所占内存区的首地址。我们可以把函数的这个首地址(或称入口地址)赋予一个指针变量,使该指针变量指向该函数。然后通过指针变量就可以找到并调用这个函数。我们把这种指向函数的指针变量称为“函数指针变量”。 函数指针变量定义的一般形式为: 类型说明符 (*指针变量名)(); 其中“类型说明符”表示被指函数的返回值的类型。“(* 指针变量名)”表示“* ”后面的变量是定义的指针变量。最后的空括号表示指针变量所指的是一个函数。 例如: int (*pf)(); 表示 pf 是一个指向函数入口的指针变量,该函数的返回值(函数值)是整型。前面我们. 阅读全文
posted @ 2013-09-09 15:58 KingOfFreedom 阅读(305) 评论(0) 推荐(0) 编辑
摘要:struct Floatlist /* Element of list of floats */{ double value; struct Floatlist *next;};typedef struct Floatlist SFloatlist;struct Tmplist /* Element of temp list for Pattern & Curve data */{ int i; char ID[MAXID+1]; SFloatlist *x; SFloatlist *y; struct Tmplist *next;};typedef struct Tmplist ST 阅读全文
posted @ 2013-09-09 14:07 KingOfFreedom 阅读(301) 评论(0) 推荐(0) 编辑