Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
hydraulicModel
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
刘乐
hydraulicModel
Commits
6f8296c6
Commit
6f8296c6
authored
4 years ago
by
刘乐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1, 代码改造
parent
e7a421fe
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
1104 additions
and
119 deletions
+1104
-119
CivAssembly.cpp
pandaAnalysis/CivAssembly.cpp
+163
-15
CivAssembly.h
pandaAnalysis/CivAssembly.h
+352
-18
CivBuilder.cpp
pandaAnalysis/CivBuilder.cpp
+13
-12
CivBuilder.h
pandaAnalysis/CivBuilder.h
+20
-18
CivHydrCalc.cpp
pandaAnalysis/CivHydrCalc.cpp
+65
-33
CivHydrCalc.h
pandaAnalysis/CivHydrCalc.h
+1
-1
CivInpDirector.cpp
pandaAnalysis/CivInpDirector.cpp
+14
-0
CivInpDirector.h
pandaAnalysis/CivInpDirector.h
+13
-0
CivNewInp.cpp
pandaAnalysis/CivNewInp.cpp
+390
-0
CivNewInp.h
pandaAnalysis/CivNewInp.h
+54
-10
pandaAnalysis.vcxproj
pandaAnalysis/pandaAnalysis.vcxproj
+5
-2
pandaAnalysis.vcxproj.filters
pandaAnalysis/pandaAnalysis.vcxproj.filters
+12
-3
CivCommonUtils.cpp
pandaDbManager/CivCommonUtils.cpp
+0
-7
CivTypes.h
pandaDbManager/CivTypes.h
+2
-0
No files found.
pandaAnalysis/CivAssembly.cpp
View file @
6f8296c6
#include "CivAssembly.h"
#include "CivAssembly.h"
CivAssembly
::
CivAssembly
()
Str
CivAssembly
::
toString
()
{
{
return
Str
();
}
void
CivNode
::
addItem
(
NodeTable
table
)
{
mTables
.
push_back
(
table
);
}
}
CivNode
::
CivNode
()
void
CivNode
::
addItems
(
std
::
list
<
NodeTable
>
tables
)
{
{
//mTables.merge(tables);
}
void
CivPipe
::
addItem
(
PipesTable
table
)
{
mTables
.
push_back
(
table
);
}
}
CivPipe
::
CivPipe
()
void
CivPipe
::
addItems
(
std
::
list
<
PipesTable
>
tables
)
{
{
//mTables.merge(tables);
}
void
CivTank
::
addItem
(
TankTable
table
)
{
mTables
.
push_back
(
table
);
}
}
CivTank
::
CivTank
()
void
CivTank
::
addItems
(
std
::
list
<
TankTable
>
tables
)
{
{
//mTables.merge(tables);
}
void
CivValve
::
addItem
(
ValveTable
table
)
{
mTables
.
push_back
(
table
);
}
void
CivValve
::
addItems
(
std
::
list
<
ValveTable
>
tables
)
{
//mTables.merge(tables);
}
}
CivValve
::
CivValve
()
{
void
CivPumps
::
addItem
(
PumpTable
table
)
{
mTables
.
push_back
(
table
);
}
}
CivPumps
::
CivPumps
()
void
CivPumps
::
addItems
(
std
::
list
<
PumpTable
>
tables
)
{
{
//mTables.merge(tables);
}
void
CivReservoirs
::
addItem
(
ReservoirsTable
table
)
{
mTables
.
push_back
(
table
);
}
}
CivReservoirs
::
CivReservoirs
()
void
CivReservoirs
::
addItems
(
std
::
list
<
ReservoirsTable
>
tables
)
{
{
//mTables.merge(tables);
}
void
CivEmitters
::
addItem
(
EmittersTable
table
)
{
mTables
.
push_back
(
table
);
}
}
CivEmitters
::
CivEmitters
()
void
CivEmitters
::
addItems
(
std
::
list
<
EmittersTable
>
tables
)
{
{
//mTables.merge(tables);
}
void
CivCoordinates
::
addItem
(
CoordTable
table
)
{
mTables
.
push_back
(
table
);
}
void
CivCoordinates
::
addItems
(
std
::
list
<
CoordTable
>
tables
)
{
//mTables.merge(tables);
}
void
CivMixing
::
addItem
(
MixingTable
table
)
{
mTables
.
push_back
(
table
);
}
void
CivMixing
::
addItems
(
std
::
list
<
MixingTable
>
tables
)
{
//mTables.merge(tables);
}
void
CivParameter
::
addItem
(
ParamTable
table
)
{
mTables
.
push_back
(
table
);
}
void
CivParameter
::
addItems
(
std
::
list
<
ParamTable
>
tables
)
{
//mTables.merge(tables);
}
void
CivPatterns
::
addItem
(
PatternTable
table
)
{
mTables
.
push_back
(
table
);
}
void
CivPatterns
::
addItems
(
std
::
list
<
PatternTable
>
tables
)
{
//mTables.merge(tables);
}
void
CivCurves
::
addItem
(
CurvesTable
table
)
{
mTables
.
push_back
(
table
);
}
void
CivCurves
::
addItems
(
std
::
list
<
CurvesTable
>
tables
)
{
//mTables.merge(tables);
}
void
CivDemands
::
addItem
(
DemandsTable
table
)
{
mTables
.
push_back
(
table
);
}
void
CivDemands
::
addItems
(
std
::
list
<
DemandsTable
>
tables
)
{
//mTables.merge(tables);
}
void
CivSources
::
addItem
(
CurvesTable
table
)
{
mTables
.
push_back
(
table
);
}
void
CivSources
::
addItems
(
std
::
list
<
CurvesTable
>
tables
)
{
//mTables.merge(tables);
}
void
CivStatus
::
addItem
(
StatusTable
table
)
{
mTables
.
push_back
(
table
);
}
void
CivStatus
::
addItems
(
std
::
list
<
StatusTable
>
tables
)
{
//mTables.merge(tables);
}
void
CivQuality
::
addItem
(
QualityTable
table
)
{
mTables
.
push_back
(
table
);
}
void
CivQuality
::
addItems
(
std
::
list
<
QualityTable
>
tables
)
{
//mTables.merge(tables);
}
void
CivLabels
::
addItem
(
LabelTable
table
)
{
mTables
.
push_back
(
table
);
}
void
CivLabels
::
addItems
(
std
::
list
<
LabelTable
>
tables
)
{
//mTables.merge(tables);
}
void
CivTags
::
addItem
(
TagsTable
table
)
{
mTables
.
push_back
(
table
);
}
void
CivTags
::
addItems
(
std
::
list
<
TagsTable
>
tables
)
{
//mTables.merge(tables);
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
pandaAnalysis/CivAssembly.h
View file @
6f8296c6
#ifndef CIVASSEMBLY_H
#ifndef CIVASSEMBLY_H
#define CIVASSEMBLY_H
#define CIVASSEMBLY_H
#include "CivTypes.h"
#include "CivTypes.h"
#include <list>
class
CivAssembly
;
class
CivAssembly
;
class
CivNode
;
class
CivNode
;
...
@@ -16,10 +17,7 @@ class CivEmitters;
...
@@ -16,10 +17,7 @@ class CivEmitters;
class
CivAssembly
class
CivAssembly
{
{
public
:
public
:
CivAssembly
();
virtual
Str
toString
();
protected
:
};
};
/**
/**
...
@@ -28,10 +26,19 @@ protected:
...
@@ -28,10 +26,19 @@ protected:
class
CivNode
:
public
CivAssembly
class
CivNode
:
public
CivAssembly
{
{
public
:
public
:
CivNode
();
typedef
struct
Table
{
// ; ID Elev Demand Pattern
Str
ID
;
Str
Elev
;
Str
Demand
;
Str
PatternId
;
}
NodeTable
;
private
:
void
addItem
(
NodeTable
table
);
void
addItems
(
std
::
list
<
NodeTable
>
tables
);
std
::
list
<
NodeTable
>
mTables
;
};
};
/**
/**
...
@@ -40,12 +47,23 @@ private:
...
@@ -40,12 +47,23 @@ private:
class
CivPipe
:
public
CivAssembly
class
CivPipe
:
public
CivAssembly
{
{
public
:
public
:
CivPipe
();
typedef
struct
Table
{
// ; ID Node1 Node2 Length Diameter Roughness MinorLoss Status
Str
ID
;
Str
Node1
;
Str
Node2
;
Str
Length
;
Str
Diameter
;
Str
Roughness
;
Str
MinorLoss
;
Str
Status
;
}
PipesTable
;
void
addItem
(
PipesTable
table
);
void
addItems
(
std
::
list
<
PipesTable
>
tables
);
private
:
std
::
list
<
PipesTable
>
mTables
;
Str
mID
;
// id号
CivNode
*
mStartNode
=
nullptr
;
// 上点号
CivNode
*
mStopNode
=
nullptr
;
// 本点号
};
};
...
@@ -55,20 +73,55 @@ private:
...
@@ -55,20 +73,55 @@ private:
class
CivTank
:
public
CivAssembly
class
CivTank
:
public
CivAssembly
{
{
public
:
public
:
CivTank
();
typedef
struct
Table
{
// ; ID Elevation InitLevel MinLevel MaxLevel Diameter MinVol VolCurve
Str
ID
;
Str
Elev
;
Str
InitLevel
;
Str
MinLevel
;
Str
MaxLevel
;
Str
Diameter
;
Str
MinVol
;
Str
VolCurve
;
}
TankTable
;
void
addItem
(
TankTable
table
);
void
addItems
(
std
::
list
<
TankTable
>
tables
);
std
::
list
<
TankTable
>
mTables
;
};
};
/*
/*
阀门
定义包含在管网中所有控制阀门。
*/
*/
class
CivValve
:
public
CivAssembly
class
CivValve
:
public
CivAssembly
{
{
public
:
public
:
CivValve
();
typedef
struct
Table
{
/*
阀门的ID标签
起始节点ID
终止节点ID
直径,mm(英寸)
阀门类型
阀门设置
局部损失系数
*/
Str
ID
;
Str
Node1
;
Str
Node2
;
Str
Diameter
;
Str
Type
;
Str
Setting
;
Str
MinorLoss
;
}
ValveTable
;
void
addItem
(
ValveTable
table
);
void
addItems
(
std
::
list
<
ValveTable
>
tables
);
std
::
list
<
ValveTable
>
mTables
;
};
};
/**
/**
...
@@ -77,18 +130,43 @@ public:
...
@@ -77,18 +130,43 @@ public:
class
CivPumps
:
public
CivAssembly
class
CivPumps
:
public
CivAssembly
{
{
public
:
public
:
CivPumps
();
typedef
struct
Table
{
// ;ID Node1 Node2 Parameters
Str
ID
;
Str
Node1
;
Str
Node2
;
Str
Parameters
;
}
PumpTable
;
void
addItem
(
PumpTable
table
);
void
addItems
(
std
::
list
<
PumpTable
>
tables
);
std
::
list
<
PumpTable
>
mTables
;
};
};
/*
/*
水源
定义管网中包含的所有水库节点
*/
*/
class
CivReservoirs
:
public
CivAssembly
class
CivReservoirs
:
public
CivAssembly
{
{
public
:
public
:
CivReservoirs
();
typedef
struct
Table
{
/*
ID标签
水头,ft(m)
水头模式ID(可选)
*/
Str
ID
;
Str
Head
;
Str
Pattern
;
}
ReservoirsTable
;
void
addItem
(
ReservoirsTable
table
);
void
addItems
(
std
::
list
<
ReservoirsTable
>
tables
);
std
::
list
<
ReservoirsTable
>
mTables
;
};
};
/**
/**
...
@@ -97,8 +175,264 @@ public:
...
@@ -97,8 +175,264 @@ public:
class
CivEmitters
:
public
CivAssembly
class
CivEmitters
:
public
CivAssembly
{
{
public
:
public
:
CivEmitters
();
typedef
struct
Table
{
/*
连接节点ID标签
流量系数,在1米(1 psi)压降下的流量单位
*/
Str
ID
;
Str
coeff
;
}
EmittersTable
;
void
addItem
(
EmittersTable
table
);
void
addItems
(
std
::
list
<
EmittersTable
>
tables
);
std
::
list
<
EmittersTable
>
mTables
;
};
/**
坐标
*/
class
CivCoordinates
:
public
CivAssembly
{
public
:
typedef
struct
Table
{
// ; ;Node X-Coord Y-Coord
Str
ID
;
Str
XCoord
;
Str
YCoord
;
}
CoordTable
;
void
addItem
(
CoordTable
table
);
void
addItems
(
std
::
list
<
CoordTable
>
tables
);
std
::
list
<
CoordTable
>
mTables
;
};
/**
参数控制选项
*/
class
CivMixing
:
public
CivAssembly
{
public
:
typedef
struct
Table
{
/*
水池ID标签
混合模型(MIXED, 2COMP, FIFO或LIFO)
室的容积(小数)
*/
Str
ID
;
Str
hyModel
;
Str
volume
;
}
MixingTable
;
void
addItem
(
MixingTable
table
);
void
addItems
(
std
::
list
<
MixingTable
>
tables
);
std
::
list
<
MixingTable
>
mTables
;
};
/**
确定控制蓄水池混合的模型。
*/
class
CivParameter
:
public
CivAssembly
{
public
:
typedef
struct
Table
{
/*
[OPTIONS]
[TIMES]
[REACTIONS]
[ENERGY]
[REPORT]
*/
Str
name
;
Str
val
;
}
ParamTable
;
void
addItem
(
ParamTable
table
);
void
addItems
(
std
::
list
<
ParamTable
>
tables
);
void
setType
(
const
std
::
string
&
type
)
{
mType
=
type
;
}
std
::
string
mType
;
std
::
list
<
ParamTable
>
mTables
;
};
/**
模式
*/
class
CivPatterns
:
public
CivAssembly
{
public
:
typedef
struct
Table
{
Str
name
;
// 模式名
Str
val
;
// 模式值
}
PatternTable
;
void
addItem
(
PatternTable
table
);
void
addItems
(
std
::
list
<
PatternTable
>
tables
);
std
::
list
<
PatternTable
>
mTables
;
};
/*
定义数据曲线及其X、Y点。
*/
class
CivCurves
:
public
CivAssembly
{
public
:
typedef
struct
Table
{
Str
ID
;
// 模式名
Str
XCoord
;
// X数值
Str
YCoord
;
// Y数值
}
CurvesTable
;
void
addItem
(
CurvesTable
table
);
void
addItems
(
std
::
list
<
CurvesTable
>
tables
);
std
::
list
<
CurvesTable
>
mTables
;
};
/**
定义连接节点的多模式需水,是对[JUNCTIONS]的补充。
*/
class
CivDemands
:
public
CivAssembly
{
public
:
typedef
struct
Table
{
/*
连接节点ID标签;
基本需水量(流量单位);
需水量模式ID(可选);
分号之后的需水量类型名称(可选)
*/
Str
ID
;
Str
BaseDemand
;
Str
PatternId
;
Str
DemandType
;
}
DemandsTable
;
void
addItem
(
DemandsTable
table
);
void
addItems
(
std
::
list
<
DemandsTable
>
tables
);
std
::
list
<
DemandsTable
>
mTables
;
};
// 定义水质源头的位置。
class
CivSources
:
public
CivAssembly
{
public
:
typedef
struct
Table
{
/*
节点ID标签
源头类型(CONCEN, MASS, FLOWPACED或SETPOINT)
基准源头强度
时间模式ID(可选);Node Type Quality Pattern
*/
Str
ID
;
Str
Type
;
Str
Quality
;
Str
Pattern
;
}
CurvesTable
;
void
addItem
(
CurvesTable
table
);
void
addItems
(
std
::
list
<
CurvesTable
>
tables
);
std
::
list
<
CurvesTable
>
mTables
;
};
// 定义模拟开始时被选管段的初始状态。
class
CivStatus
:
public
CivAssembly
{
public
:
typedef
struct
Table
{
/*
管段ID标签
状态或者设置 ID Status/Setting
*/
Str
ID
;
Str
Setting
;
}
StatusTable
;
void
addItem
(
StatusTable
table
);
void
addItems
(
std
::
list
<
StatusTable
>
tables
);
std
::
list
<
StatusTable
>
mTables
;
};
// 定义节点的初始水质。
class
CivQuality
:
public
CivAssembly
{
public
:
typedef
struct
Table
{
/*
节点ID标签
初始水质
*/
Str
ID
;
Str
InitQuality
;
}
QualityTable
;
void
addItem
(
QualityTable
table
);
void
addItems
(
std
::
list
<
QualityTable
>
tables
);
std
::
list
<
QualityTable
>
mTables
;
};
// 给地图标签赋以坐标值。
class
CivLabels
:
public
CivAssembly
{
public
:
typedef
struct
Table
{
/*
X坐标
Y坐标
双引号中的标签文本
锚定节点的ID标签(可选)
*/
Str
XCoord
;
Str
YCoord
;
Str
Label
;
Str
ID
;
}
LabelTable
;
void
addItem
(
LabelTable
table
);
void
addItems
(
std
::
list
<
LabelTable
>
tables
);
std
::
list
<
LabelTable
>
mTables
;
};
// 将类型标签与特定节点和管段相连。
class
CivTags
:
public
CivAssembly
{
public
:
typedef
struct
Table
{
/*
关键词为NODE或者LINK
节点或者管段ID标签
标签的文本(无空格)
*/
Str
Key
;
Str
Id
;
Str
Label
;
}
TagsTable
;
void
addItem
(
TagsTable
table
);
void
addItems
(
std
::
list
<
TagsTable
>
tables
);
std
::
list
<
TagsTable
>
mTables
;
};
};
#endif // !CIVASSEMBLY_H
#endif // !CIVASSEMBLY_H
...
...
This diff is collapsed.
Click to expand it.
pandaAnalysis/Civ
Inp
Builder.cpp
→
pandaAnalysis/CivBuilder.cpp
View file @
6f8296c6
#include "Civ
Inp
Builder.h"
#include "CivBuilder.h"
#include "CivTypes.h"
#include "CivTypes.h"
CivInpBuilder
::
CivInpBuilder
()
CivInpBuilder
::
CivInpBuilder
()
...
@@ -41,7 +41,7 @@ bool CivInpBuilder::exportInp(char* fileName)
...
@@ -41,7 +41,7 @@ bool CivInpBuilder::exportInp(char* fileName)
bool
cii
=
mDbConn
->
createTable
(
OPTIONTTABLE
,
"public"
,
CivTableTemp
::
PARAMETER_TABLE
);
bool
cii
=
mDbConn
->
createTable
(
OPTIONTTABLE
,
"public"
,
CivTableTemp
::
PARAMETER_TABLE
);
// 获取表格
// 获取表格
Tables
tables
=
mDbConn
->
getTables
(
""
);
Tables
tables
=
mDbConn
->
getTables
(
"
进贤"
,
"public
"
);
//2,解析管网组件
//2,解析管网组件
// 解析管网组件顺序: 管线放最后
// 解析管网组件顺序: 管线放最后
...
@@ -54,9 +54,9 @@ bool CivInpBuilder::exportInp(char* fileName)
...
@@ -54,9 +54,9 @@ bool CivInpBuilder::exportInp(char* fileName)
if
(
PIPELINE
==
table
)
if
(
PIPELINE
==
table
)
continue
;
continue
;
assemble
(
table
,
civInp
);
builder
(
table
,
civInp
);
}
}
assemble
(
PIPELINE
,
civInp
);
builder
(
PIPELINE
,
civInp
);
// 设置曲线
// 设置曲线
...
@@ -92,7 +92,7 @@ bool CivInpBuilder::exportInp(char* fileName)
...
@@ -92,7 +92,7 @@ bool CivInpBuilder::exportInp(char* fileName)
return
true
;
return
true
;
}
}
void
CivInpBuilder
::
assemble
(
StrQuote
table
,
CivInp
&
inp
)
void
CivInpBuilder
::
builder
(
StrQuote
table
,
CivInp
&
inp
)
{
{
// 根据组建类型解析字段
// 根据组建类型解析字段
if
(
PIPELINE
==
table
)
if
(
PIPELINE
==
table
)
...
@@ -386,36 +386,37 @@ void CivInpBuilder::assemble(StrQuote table, CivInp& inp)
...
@@ -386,36 +386,37 @@ void CivInpBuilder::assemble(StrQuote table, CivInp& inp)
}
}
}
}
void
CivInpBuilder
::
buildNode
()
void
CivInpBuilder
::
build
er
Node
()
{
{
}
}
void
CivInpBuilder
::
buildPipe
()
void
CivInpBuilder
::
build
er
Pipe
()
{
{
}
}
void
CivInpBuilder
::
buildTank
()
void
CivInpBuilder
::
build
er
Tank
()
{
{
}
}
void
CivInpBuilder
::
buildVavle
()
void
CivInpBuilder
::
build
er
Vavle
()
{
{
}
}
void
CivInpBuilder
::
buildPump
()
void
CivInpBuilder
::
builderPump
()
{
{
}
}
void
CivInpBuilder
::
buildReservoir
()
void
CivInpBuilder
::
build
er
Reservoir
()
{
{
}
}
void
CivInpBuilder
::
buildEmitter
()
void
CivInpBuilder
::
build
er
Emitter
()
{
{
}
}
...
...
This diff is collapsed.
Click to expand it.
pandaAnalysis/Civ
Inp
Builder.h
→
pandaAnalysis/CivBuilder.h
View file @
6f8296c6
...
@@ -7,22 +7,24 @@
...
@@ -7,22 +7,24 @@
/**
/**
* 抽象建造者
* 抽象建造者
*/
*/
class
Civ
AbsBuilder
class
Civ
Builder
{
{
public
:
public
:
virtual
void
buildNode
()
=
0
;
virtual
void
build
er
Node
()
=
0
;
virtual
void
buildPipe
()
=
0
;
virtual
void
build
er
Pipe
()
=
0
;
virtual
void
buildTank
()
=
0
;
virtual
void
build
er
Tank
()
=
0
;
virtual
void
buildVavle
()
=
0
;
virtual
void
build
er
Vavle
()
=
0
;
virtual
void
buildPump
()
=
0
;
virtual
void
build
er
Pump
()
=
0
;
virtual
void
buildReservoir
()
=
0
;
virtual
void
build
er
Reservoir
()
=
0
;
virtual
void
buildEmitter
()
=
0
;
virtual
void
build
er
Emitter
()
=
0
;
virtual
CivNewInp
*
getNewInp
()
=
0
;
virtual
CivNewInp
*
getNewInp
()
=
0
;
};
};
/**
/**
* 导出inp文件类
* 导出inp文件类
*/
*/
class
CivInpBuilder
:
public
Civ
Abs
Builder
class
CivInpBuilder
:
public
CivBuilder
{
{
public
:
public
:
CivInpBuilder
();
CivInpBuilder
();
...
@@ -42,15 +44,15 @@ public:
...
@@ -42,15 +44,15 @@ public:
*@table:表
*@table:表
*@inp: inp文件对象
*@inp: inp文件对象
*/
*/
void
assemble
(
StrQuote
table
,
CivInp
&
inp
);
void
builder
(
StrQuote
table
,
CivInp
&
inp
);
virtual
void
buildNode
();
virtual
void
build
er
Node
();
virtual
void
buildPipe
();
virtual
void
build
er
Pipe
();
virtual
void
buildTank
()
;
virtual
void
build
er
Tank
()
;
virtual
void
buildVavle
();
virtual
void
build
er
Vavle
();
virtual
void
buildPump
();
virtual
void
build
er
Pump
();
virtual
void
buildReservoir
()
;
virtual
void
build
er
Reservoir
()
;
virtual
void
buildEmitter
();
virtual
void
build
er
Emitter
();
virtual
CivNewInp
*
getNewInp
();
virtual
CivNewInp
*
getNewInp
();
private
:
private
:
...
...
This diff is collapsed.
Click to expand it.
pandaAnalysis/CivHydrCalc.cpp
View file @
6f8296c6
...
@@ -51,7 +51,7 @@ bool CivHydrCalc::hydrSimulation(char* fileName, char* rptFile, char* binOutFile
...
@@ -51,7 +51,7 @@ bool CivHydrCalc::hydrSimulation(char* fileName, char* rptFile, char* binOutFile
float
dHStep
;
float
dHStep
;
ENGetVal
(
4
,
&
dHStep
);
ENGetVal
(
4
,
&
dHStep
);
hydrCompute
(
errcode
);
//
hydrCompute(errcode);
bool
isFirst
=
true
;
bool
isFirst
=
true
;
// 计算
// 计算
do
do
...
@@ -95,48 +95,36 @@ bool CivHydrCalc::hydrSimulation(char* fileName, char* rptFile, char* binOutFile
...
@@ -95,48 +95,36 @@ bool CivHydrCalc::hydrSimulation(char* fileName, char* rptFile, char* binOutFile
bool
CivHydrCalc
::
qualitySimulation
(
char
*
inpFile
,
char
*
rptFile
,
char
*
binOutFile
)
bool
CivHydrCalc
::
qualitySimulation
(
char
*
inpFile
,
char
*
rptFile
,
char
*
binOutFile
)
{
{
if
(
!
hydrSimulation
(
inpFile
,
rptFile
,
binOutFile
))
if
(
!
exportInp
(
inpFile
))
{
return
false
;
return
false
;
}
// 运行水质运算需要先进行水力运算
int
errcode
=
0
;
// 进行水质分析
ENopenQ
();
ENinitQ
(
1
);
short
hydCode
=
1
;
long
t
(
0
),
tstep
(
0
);
long
t
(
0
),
tstep
(
0
);
int
iTime
(
0
);
int
iTime
(
0
);
int
errcode
=
0
;
int
errcode
=
0
;
do
errcode
=
ENopen
(
inpFile
,
rptFile
,
binOutFile
);
if
(
errcode
>
0
)
{
{
errcode
=
ENrunQ
(
&
t
);
// errcode > 100 是错误
ENclose
();
if
(
errcode
>
100
)
return
false
;
{
}
ENcloseQ
();
ENclose
();
return
;
}
// 存储水质计算结果
ENstepQ
(
&
tstep
);
iTime
++
;
}
while
(
tstep
>
0
);
if
(
ENopenH
()
>
0
)
{
ENclose
();
return
false
;
}
if
(
ENinitH
(
0
)
>
0
)
{
ENclose
();
return
false
;
}
ENcloseQ
();
float
dHStep
;
ENclose
();
ENGetVal
(
4
,
&
dHStep
);
return
true
;
}
bool
CivHydrCalc
::
hydrCompute
(
int
&
errorcode
)
{
bool
isFirst
=
true
;
bool
isFirst
=
true
;
// 计算
// 计算
do
do
...
@@ -168,6 +156,47 @@ bool CivHydrCalc::hydrCompute(int& errorcode)
...
@@ -168,6 +156,47 @@ bool CivHydrCalc::hydrCompute(int& errorcode)
getLinkResult
(
iTime
);
getLinkResult
(
iTime
);
iTime
++
;
iTime
++
;
}
while
(
tstep
>
0
);
}
while
(
tstep
>
0
);
// 更新管网数据库数据
(
void
)
mDbConn
->
updateNodeByInterval
(
CurrentDate
,
"0"
);
(
void
)
mDbConn
->
updateLinkByInterval
(
CurrentDate
,
"0"
);
ENcloseH
();
// 运行水质运算需要先进行水力运算
errcode
=
0
;
// 进行水质分析
ENopenQ
();
ENinitQ
(
1
);
t
=
0
;
tstep
=
0
;
iTime
=
0
;
errcode
=
0
;
do
{
errcode
=
ENrunQ
(
&
t
);
// errcode > 100 是错误
if
(
errcode
>
100
)
{
ENcloseQ
();
ENclose
();
return
false
;
}
// 存储水质计算结果
ENstepQ
(
&
tstep
);
iTime
++
;
}
while
(
tstep
>
0
);
ENcloseQ
();
ENclose
();
return
true
;
}
}
bool
CivHydrCalc
::
exportInp
(
char
*
fileName
)
bool
CivHydrCalc
::
exportInp
(
char
*
fileName
)
...
@@ -570,7 +599,8 @@ void CivHydrCalc::getNodeResult(short time)
...
@@ -570,7 +599,8 @@ void CivHydrCalc::getNodeResult(short time)
ENgetnodevalue
(
i
,
EN_MAXVOLUME
,
&
nodeItem
.
dTankMaxVolume
);
ENgetnodevalue
(
i
,
EN_MAXVOLUME
,
&
nodeItem
.
dTankMaxVolume
);
// 液位高度
// 液位高度
ENgetnodevalue
(
i
,
EN_TANKLEVEL
,
&
nodeItem
.
dTankLevel
);
ENgetnodevalue
(
i
,
EN_TANKLEVEL
,
&
nodeItem
.
dTankLevel
);
// 水质
ENgetnodevalue
(
i
,
EN_QUALITY
,
&
nodeItem
.
dQuality
);
nodeItem
.
dInterval
=
time
;
nodeItem
.
dInterval
=
time
;
...
@@ -621,6 +651,8 @@ void CivHydrCalc::getLinkResult(short time)
...
@@ -621,6 +651,8 @@ void CivHydrCalc::getLinkResult(short time)
ENgetnodevalue
(
node1
,
EN_HEAD
,
&
linkItem
.
dFromNodHeadloss
);
ENgetnodevalue
(
node1
,
EN_HEAD
,
&
linkItem
.
dFromNodHeadloss
);
// 本点水头
// 本点水头
ENgetnodevalue
(
node2
,
EN_HEAD
,
&
linkItem
.
dToNodHeadloss
);
ENgetnodevalue
(
node2
,
EN_HEAD
,
&
linkItem
.
dToNodHeadloss
);
// 水质
ENgetlinkvalue
(
i
,
EN_LINKQUAL
,
&
linkItem
.
dQuality
);
// 局部水头损失
// 局部水头损失
float
fCoeff
;
float
fCoeff
;
ENgetlinkvalue
(
i
,
EN_MINORLOSS
,
&
fCoeff
);
ENgetlinkvalue
(
i
,
EN_MINORLOSS
,
&
fCoeff
);
...
...
This diff is collapsed.
Click to expand it.
pandaAnalysis/CivHydrCalc.h
View file @
6f8296c6
...
@@ -45,7 +45,7 @@ private:
...
@@ -45,7 +45,7 @@ private:
*/
*/
void
assemble
(
const
std
::
string
&
table
,
CivInp
&
inp
);
void
assemble
(
const
std
::
string
&
table
,
CivInp
&
inp
);
bool
hydrCompute
(
int
&
errorcode
);
/*
/*
*@brief 获取节点计算结果
*@brief 获取节点计算结果
*@time: 时间
*@time: 时间
...
...
This diff is collapsed.
Click to expand it.
pandaAnalysis/CivInpDirector.cpp
0 → 100644
View file @
6f8296c6
#include "CivInpDirector.h"
#include "CivBuilder.h"
void
CivInpDirector
::
create
(
CivBuilder
*
builder
)
{
builder
->
builderNode
();
builder
->
builderPipe
();
builder
->
builderTank
();
builder
->
builderReservoir
();
builder
->
builderPump
();
builder
->
builderVavle
();
builder
->
builderEmitter
();
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
pandaAnalysis/CivInpDirector.h
0 → 100644
View file @
6f8296c6
#ifndef CIVINPDIRECTOR_H
#define CIVINPDIRECTOR_H
class
CivBuilder
;
// ָ
class
CivInpDirector
{
public
:
void
create
(
CivBuilder
*
builder
);
};
#endif // !CIVINPDIRECTOR_H
This diff is collapsed.
Click to expand it.
pandaAnalysis/CivNewInp.cpp
0 → 100644
View file @
6f8296c6
#include "CivNewInp.h"
#include <time.h>
void
CivNewInp
::
setTtitle
(
const
std
::
string
&
title
)
{
writeString
(
"[TITLES]"
);
writeString
(
"Scenario: Base"
);
writeString
(
"Date:"
+
currentTime
()
);
}
void
CivNewInp
::
writeHead
(
const
std
::
string
&
head
)
{
mTextStream
<<
"["
<<
head
<<
"]"
<<
"
\n
"
;
}
std
::
string
CivNewInp
::
currentTime
()
{
time_t
rawtime
;
struct
tm
*
timeinfo
;
char
s
[
100
];
time
(
&
rawtime
);
timeinfo
=
localtime
(
&
rawtime
);
time_t
tick
=
mktime
(
timeinfo
);
strftime
(
s
,
sizeof
(
s
),
"%Y-%m-%d %H:%M:%S"
,
timeinfo
);
return
s
;
}
void
CivNewInp
::
setNode
(
const
CivNode
&
node
)
{
auto
tables
=
node
.
mTables
;
writeHead
(
"JUNCTIONS"
);
for
(
auto
iter
=
tables
.
rbegin
();
iter
!=
tables
.
rend
();
iter
++
)
{
CivNode
::
NodeTable
nodeTable
=
*
iter
;
writeStringFormat
(
nodeTable
.
ID
);
writeStringFormat
(
nodeTable
.
Elev
);
writeStringFormat
(
nodeTable
.
Demand
);
writeString
(
nodeTable
.
PatternId
);
}
}
void
CivNewInp
::
setPipes
(
const
CivPipe
&
pipes
)
{
auto
tables
=
pipes
.
mTables
;
writeHead
(
"PIPES"
);
for
(
auto
iter
=
tables
.
rbegin
();
iter
!=
tables
.
rend
();
iter
++
)
{
CivPipe
::
PipesTable
pipesTable
=
*
iter
;
writeStringFormat
(
pipesTable
.
ID
);
writeStringFormat
(
pipesTable
.
Node1
);
writeStringFormat
(
pipesTable
.
Node2
);
writeStringFormat
(
pipesTable
.
Length
);
writeStringFormat
(
pipesTable
.
Diameter
);
writeStringFormat
(
pipesTable
.
Roughness
);
writeStringFormat
(
pipesTable
.
MinorLoss
);
writeString
(
pipesTable
.
Status
);
}
}
void
CivNewInp
::
setTank
(
const
CivTank
&
tank
)
{
auto
tables
=
tank
.
mTables
;
if
(
tables
.
size
()
<=
0
)
return
;
writeHead
(
"TANKS"
);
for
(
auto
iter
=
tables
.
rbegin
();
iter
!=
tables
.
rend
();
iter
++
)
{
CivTank
::
TankTable
table
=
*
iter
;
writeStringFormat
(
table
.
ID
);
writeStringFormat
(
table
.
Elev
);
writeStringFormat
(
table
.
InitLevel
);
writeStringFormat
(
table
.
MinLevel
);
writeStringFormat
(
table
.
MaxLevel
);
writeStringFormat
(
table
.
Diameter
);
writeStringFormat
(
table
.
MinVol
);
writeString
(
table
.
VolCurve
);
}
}
void
CivNewInp
::
setValves
(
const
CivValve
&
valve
)
{
auto
tables
=
valve
.
mTables
;
if
(
tables
.
size
()
<=
0
)
return
;
writeHead
(
"VALVES"
);
for
(
auto
iter
=
tables
.
rbegin
();
iter
!=
tables
.
rend
();
iter
++
)
{
CivValve
::
ValveTable
table
=
*
iter
;
writeStringFormat
(
table
.
ID
);
writeStringFormat
(
table
.
Node1
);
writeStringFormat
(
table
.
Node2
);
writeStringFormat
(
table
.
Diameter
);
writeStringFormat
(
table
.
Type
);
writeStringFormat
(
table
.
Setting
);
writeString
(
table
.
MinorLoss
);
}
}
void
CivNewInp
::
setPumps
(
const
CivPumps
&
pumps
)
{
auto
tables
=
pumps
.
mTables
;
if
(
tables
.
size
()
<=
0
)
return
;
writeHead
(
"PUMPS"
);
for
(
auto
iter
=
tables
.
rbegin
();
iter
!=
tables
.
rend
();
iter
++
)
{
CivPumps
::
PumpTable
table
=
*
iter
;
writeStringFormat
(
table
.
ID
);
writeStringFormat
(
table
.
Node1
);
writeStringFormat
(
table
.
Node2
);
writeString
(
table
.
Parameters
);
}
}
void
CivNewInp
::
setEmitters
(
const
CivEmitters
&
mitters
)
{
auto
tables
=
mitters
.
mTables
;
if
(
tables
.
size
()
<=
0
)
{
return
;
}
writeHead
(
"EMITTERS"
);
for
(
auto
iter
=
tables
.
rbegin
();
iter
!=
tables
.
rend
();
iter
++
)
{
CivEmitters
::
EmittersTable
table
=
*
iter
;
writeStringFormat
(
table
.
ID
);
writeString
(
table
.
coeff
);
}
}
void
CivNewInp
::
setReservoirs
(
const
CivReservoirs
&
res
)
{
auto
tables
=
res
.
mTables
;
if
(
tables
.
size
()
<=
0
)
{
return
;
}
writeHead
(
"RESERVOIRS"
);
for
(
auto
iter
=
tables
.
rbegin
();
iter
!=
tables
.
rend
();
iter
++
)
{
CivReservoirs
::
ReservoirsTable
table
=
*
iter
;
writeStringFormat
(
table
.
ID
);
writeStringFormat
(
table
.
Head
);
writeString
(
table
.
Pattern
);
}
}
// 系统运行
void
CivNewInp
::
setCurves
(
const
CivCurves
&
cureves
)
{
auto
tables
=
cureves
.
mTables
;
if
(
tables
.
size
()
<=
0
)
{
return
;
}
writeHead
(
"CURVES"
);
for
(
auto
iter
=
tables
.
rbegin
();
iter
!=
tables
.
rend
();
iter
++
)
{
CivCurves
::
Table
table
=
*
iter
;
writeStringFormat
(
table
.
ID
);
writeStringFormat
(
table
.
XCoord
);
writeString
(
table
.
YCoord
);
}
}
void
CivNewInp
::
setPatterns
(
const
CivPatterns
&
patterns
)
{
auto
tables
=
patterns
.
mTables
;
if
(
tables
.
size
()
<=
0
)
{
return
;
}
writeHead
(
"PATTERNS"
);
for
(
auto
iter
=
tables
.
rbegin
();
iter
!=
tables
.
rend
();
iter
++
)
{
CivPatterns
::
PatternTable
table
=
*
iter
;
writeStringFormat
(
table
.
name
);
writeString
(
table
.
val
);
}
}
void
CivNewInp
::
setStatus
(
const
CivStatus
&
status
)
{
auto
tables
=
status
.
mTables
;
if
(
tables
.
size
()
<=
0
)
{
return
;
}
writeHead
(
"STATUS"
);
for
(
auto
iter
=
tables
.
rbegin
();
iter
!=
tables
.
rend
();
iter
++
)
{
CivStatus
::
Table
table
=
*
iter
;
writeStringFormat
(
table
.
ID
);
writeString
(
table
.
Setting
);
}
}
void
CivNewInp
::
setControls
(
const
std
::
string
&
control
)
{
writeHead
(
"CONTROLS"
);
writeString
(
control
);
}
void
CivNewInp
::
setRules
(
const
std
::
string
&
ruleId
,
const
std
::
string
&
rules
)
{
writeHead
(
"RULES"
);
writeString
(
"RULE "
+
ruleId
);
writeString
(
rules
);
}
void
CivNewInp
::
setDemands
(
const
CivDemands
&
demands
)
{
auto
tables
=
demands
.
mTables
;
if
(
tables
.
size
()
<=
0
)
{
return
;
}
writeHead
(
"DEMANDS"
);
for
(
auto
iter
=
tables
.
rbegin
();
iter
!=
tables
.
rend
();
iter
++
)
{
CivDemands
::
Table
table
=
*
iter
;
writeStringFormat
(
table
.
ID
);
writeStringFormat
(
table
.
BaseDemand
);
writeStringFormat
(
table
.
PatternId
);
writeString
(
table
.
DemandType
);
}
}
// 水质
void
CivNewInp
::
setQuality
(
const
CivQuality
&
quality
)
{
auto
tables
=
quality
.
mTables
;
if
(
tables
.
size
()
<=
0
)
{
return
;
}
writeHead
(
"QUALITY"
);
for
(
auto
iter
=
tables
.
rbegin
();
iter
!=
tables
.
rend
();
iter
++
)
{
CivQuality
::
Table
table
=
*
iter
;
writeStringFormat
(
table
.
ID
);
writeStringFormat
(
table
.
InitQuality
);
}
}
void
CivNewInp
::
setSources
(
const
CivSources
&
sources
)
{
auto
tables
=
sources
.
mTables
;
if
(
tables
.
size
()
<=
0
)
{
return
;
}
writeHead
(
"SOURCES"
);
for
(
auto
iter
=
tables
.
rbegin
();
iter
!=
tables
.
rend
();
iter
++
)
{
CivSources
::
Table
table
=
*
iter
;
writeStringFormat
(
table
.
ID
);
writeStringFormat
(
table
.
Type
);
writeStringFormat
(
table
.
Quality
);
writeString
(
table
.
Pattern
);
}
}
void
CivNewInp
::
setMixing
(
const
CivMixing
&
mixing
)
{
auto
tables
=
mixing
.
mTables
;
if
(
tables
.
size
()
<=
0
)
{
return
;
}
writeHead
(
"MIXING"
);
for
(
auto
iter
=
tables
.
rbegin
();
iter
!=
tables
.
rend
();
iter
++
)
{
CivMixing
::
Table
table
=
*
iter
;
writeStringFormat
(
table
.
ID
);
writeStringFormat
(
table
.
hyModel
);
writeString
(
table
.
volume
);
}
}
// 选项和报表
void
CivNewInp
::
setParamter
(
const
CivParameter
&
params
,
const
std
::
string
&
type
)
{
auto
tables
=
params
.
mTables
;
if
(
tables
.
size
()
<=
0
)
{
return
;
}
auto
iter
=
tables
.
rbegin
();
writeHead
(
type
);
for
(;
iter
!=
tables
.
rend
();
iter
++
)
{
CivParameter
::
ParamTable
table
=
*
iter
;
writeStringFormat
(
table
.
name
);
writeString
(
table
.
val
);
}
}
//管网地图/标签
void
CivNewInp
::
setCoordnates
(
const
CivCoordinates
&
coords
)
{
auto
tables
=
coords
.
mTables
;
if
(
tables
.
size
()
<=
0
)
{
return
;
}
auto
iter
=
tables
.
rbegin
();
writeHead
(
"COORDINATES"
);
for
(;
iter
!=
tables
.
rend
();
iter
++
)
{
CivCoordinates
::
Table
table
=
*
iter
;
writeStringFormat
(
table
.
ID
);
writeStringFormat
(
table
.
XCoord
);
writeString
(
table
.
YCoord
);
}
}
void
CivNewInp
::
setVertices
()
{
}
void
CivNewInp
::
setLabels
(
const
CivLabels
&
labels
)
{
auto
tables
=
labels
.
mTables
;
if
(
tables
.
size
()
<=
0
)
{
return
;
}
auto
iter
=
tables
.
rbegin
();
writeHead
(
"LABELS"
);
for
(;
iter
!=
tables
.
rend
();
iter
++
)
{
CivLabels
::
Table
table
=
*
iter
;
writeStringFormat
(
table
.
XCoord
);
writeStringFormat
(
table
.
YCoord
);
writeStringFormat
(
table
.
Label
);
writeStringFormat
(
table
.
ID
);
}
}
void
CivNewInp
::
setBackDrop
()
{
}
void
CivNewInp
::
setTags
(
const
CivTags
&
tags
)
{
auto
tables
=
tags
.
mTables
;
if
(
tables
.
size
()
<=
0
)
{
return
;
}
auto
iter
=
tables
.
rbegin
();
writeHead
(
"TAGS"
);
for
(;
iter
!=
tables
.
rend
();
iter
++
)
{
CivTags
::
Table
table
=
*
iter
;
writeStringFormat
(
table
.
Key
);
writeStringFormat
(
table
.
Id
);
writeString
(
table
.
Label
);
}
}
void
CivNewInp
::
writeString
(
const
std
::
string
&
s
)
{
mTextStream
<<
s
<<
"
\n
"
;
}
void
CivNewInp
::
writeStringFormat
(
const
std
::
string
&
s
,
const
std
::
string
&
sep
)
{
mTextStream
<<
s
<<
sep
;
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
pandaAnalysis/CivNewInp.h
View file @
6f8296c6
#ifndef CIVNEWINP_H
#ifndef CIVNEWINP_H
#define CIVNEWINP_H
#define CIVNEWINP_H
#include <sstream>
#include <string>
#include "CivAssembly.h"
#include "CivAssembly.h"
#include <list>
/**
转inp文件类
*/
class
CivNewInp
class
CivNewInp
{
{
public
:
public
:
CivNewInp
();
/**
~
CivNewInp
();
管网组件
*/
void
setTtitle
(
const
std
::
string
&
title
);
void
setNode
(
const
CivNode
&
node
);
void
setPipes
(
const
CivPipe
&
pipes
);
void
setTank
(
const
CivTank
&
tank
);
void
setReservoirs
(
const
CivReservoirs
&
res
);
void
setValves
(
const
CivValve
&
valve
);
void
setPumps
(
const
CivPumps
&
pumps
);
void
setEmitters
(
const
CivEmitters
&
mitters
);
// 系统运行
void
setCurves
(
const
CivCurves
&
cureves
);
void
setPatterns
(
const
CivPatterns
&
patterns
);
void
setStatus
(
const
CivStatus
&
status
);
void
setControls
(
const
std
::
string
&
control
);
void
setRules
(
const
std
::
string
&
ruleName
,
const
std
::
string
&
rules
);
void
setDemands
(
const
CivDemands
&
demands
);
// 水质
void
setQuality
(
const
CivQuality
&
quality
);
void
setSources
(
const
CivSources
&
sources
);
void
setMixing
(
const
CivMixing
&
mixing
);
// 选项和报表
/*void setReactions();
void setOptions();
void setTimes();
void setReport();
void setEnergy();
*/
void
setParamter
(
const
CivParameter
&
params
,
const
std
::
string
&
type
);
//管网地图/标签
void
setCoordnates
(
const
CivCoordinates
&
coords
);
void
setVertices
();
void
setLabels
(
const
CivLabels
&
labels
);
void
setBackDrop
();
void
setTags
(
const
CivTags
&
tags
);
private
:
void
inline
writeString
(
const
std
::
string
&
s
);
void
inline
writeStringFormat
(
const
std
::
string
&
s
,
const
std
::
string
&
sep
=
"
\t
"
);
void
inline
writeHead
(
const
std
::
string
&
head
);
std
::
string
currentTime
();
private
:
private
:
//
std
::
ostringstream
mTextStream
;
CivNode
mNode
;
// 节点
CivPipe
mPipes
;
// 管线
CivTank
mTanks
;
// 水池
CivValve
mValves
;
// 阀门
CivPumps
mPumps
;
// 水泵
CivEmitters
mEmitters
;
// 喷嘴
};
};
#endif // !CIVNEWINP_H
#endif // !CIVNEWINP_H
This diff is collapsed.
Click to expand it.
pandaAnalysis/pandaAnalysis.vcxproj
View file @
6f8296c6
...
@@ -157,14 +157,17 @@
...
@@ -157,14 +157,17 @@
<ClCompile
Include=
"CivHydrCalc.cpp"
/>
<ClCompile
Include=
"CivHydrCalc.cpp"
/>
<ClCompile
Include=
"CivHydrFuncInter.cpp"
/>
<ClCompile
Include=
"CivHydrFuncInter.cpp"
/>
<ClCompile
Include=
"CivInp.cpp"
/>
<ClCompile
Include=
"CivInp.cpp"
/>
<ClCompile
Include=
"CivInpBuilder.cpp"
/>
<ClCompile
Include=
"CivBuilder.cpp"
/>
<ClCompile
Include=
"CivInpDirector.cpp"
/>
<ClCompile
Include=
"CivNewInp.cpp"
/>
</ItemGroup>
</ItemGroup>
<ItemGroup>
<ItemGroup>
<ClInclude
Include=
"CivAssembly.h"
/>
<ClInclude
Include=
"CivAssembly.h"
/>
<ClInclude
Include=
"CivHydrCalc.h"
/>
<ClInclude
Include=
"CivHydrCalc.h"
/>
<ClInclude
Include=
"CivHydrFuncInter.h"
/>
<ClInclude
Include=
"CivHydrFuncInter.h"
/>
<ClInclude
Include=
"CivInp.h"
/>
<ClInclude
Include=
"CivInp.h"
/>
<ClInclude
Include=
"CivInpBuilder.h"
/>
<ClInclude
Include=
"CivBuilder.h"
/>
<ClInclude
Include=
"CivInpDirector.h"
/>
<ClInclude
Include=
"CivNewInp.h"
/>
<ClInclude
Include=
"CivNewInp.h"
/>
</ItemGroup>
</ItemGroup>
<Import
Project=
"$(VCTargetsPath)\Microsoft.Cpp.targets"
/>
<Import
Project=
"$(VCTargetsPath)\Microsoft.Cpp.targets"
/>
...
...
This diff is collapsed.
Click to expand it.
pandaAnalysis/pandaAnalysis.vcxproj.filters
View file @
6f8296c6
...
@@ -30,7 +30,13 @@
...
@@ -30,7 +30,13 @@
<ClCompile
Include=
"CivAssembly.cpp"
>
<ClCompile
Include=
"CivAssembly.cpp"
>
<Filter>
源文件
</Filter>
<Filter>
源文件
</Filter>
</ClCompile>
</ClCompile>
<ClCompile
Include=
"CivInpBuilder.cpp"
>
<ClCompile
Include=
"CivBuilder.cpp"
>
<Filter>
源文件
</Filter>
</ClCompile>
<ClCompile
Include=
"CivInpDirector.cpp"
>
<Filter>
源文件
</Filter>
</ClCompile>
<ClCompile
Include=
"CivNewInp.cpp"
>
<Filter>
源文件
</Filter>
<Filter>
源文件
</Filter>
</ClCompile>
</ClCompile>
</ItemGroup>
</ItemGroup>
...
@@ -47,10 +53,13 @@
...
@@ -47,10 +53,13 @@
<ClInclude
Include=
"CivAssembly.h"
>
<ClInclude
Include=
"CivAssembly.h"
>
<Filter>
头文件
</Filter>
<Filter>
头文件
</Filter>
</ClInclude>
</ClInclude>
<ClInclude
Include=
"Civ
InpBuilder
.h"
>
<ClInclude
Include=
"Civ
NewInp
.h"
>
<Filter>
头文件
</Filter>
<Filter>
头文件
</Filter>
</ClInclude>
</ClInclude>
<ClInclude
Include=
"CivNewInp.h"
>
<ClInclude
Include=
"CivBuilder.h"
>
<Filter>
头文件
</Filter>
</ClInclude>
<ClInclude
Include=
"CivInpDirector.h"
>
<Filter>
头文件
</Filter>
<Filter>
头文件
</Filter>
</ClInclude>
</ClInclude>
</ItemGroup>
</ItemGroup>
...
...
This diff is collapsed.
Click to expand it.
pandaDbManager/CivCommonUtils.cpp
View file @
6f8296c6
...
@@ -49,13 +49,6 @@ std::string CivCommonUtils::UTF8_To_string(const std::string& str)
...
@@ -49,13 +49,6 @@ std::string CivCommonUtils::UTF8_To_string(const std::string& str)
return
strRet
;
return
strRet
;
}
}
//std::map<std::string, std::string> CivCommonUtils::parseJson(std::string jsonStr)
//{
// std::map<std::string, std::string> map;
//
// return map;
//}
std
::
string
CivCommonUtils
::
currentTime
()
std
::
string
CivCommonUtils
::
currentTime
()
{
{
time_t
rawtime
;
time_t
rawtime
;
...
...
This diff is collapsed.
Click to expand it.
pandaDbManager/CivTypes.h
View file @
6f8296c6
...
@@ -250,6 +250,7 @@ struct NodeResultItem
...
@@ -250,6 +250,7 @@ struct NodeResultItem
float
dTankVolume
;
// 水池容量
float
dTankVolume
;
// 水池容量
float
dTankMaxVolume
;
// 水池最大容量
float
dTankMaxVolume
;
// 水池最大容量
float
dTankLevel
;
// 液位高度
float
dTankLevel
;
// 液位高度
float
dQuality
;
// 水质
char
dDate
[
32
];
// 日期
char
dDate
[
32
];
// 日期
int
dInterval
;
// 时段
int
dInterval
;
// 时段
};
};
...
@@ -267,6 +268,7 @@ struct LinkResultItem
...
@@ -267,6 +268,7 @@ struct LinkResultItem
float
dToNodHeadloss
;
// 本点水头
float
dToNodHeadloss
;
// 本点水头
float
dLocalHeadloss
;
// 局部水头损失
float
dLocalHeadloss
;
// 局部水头损失
float
dFrictionHeadloss
;
// 摩擦水头损失
float
dFrictionHeadloss
;
// 摩擦水头损失
float
dQuality
;
// 水质
char
szStatus
[
20
];
// 状态
char
szStatus
[
20
];
// 状态
char
dDate
[
32
];
// 日期
char
dDate
[
32
];
// 日期
int
dInterval
;
// 时段
int
dInterval
;
// 时段
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment