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
8963b8ee
Commit
8963b8ee
authored
Jun 17, 2020
by
刘乐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1,代码修改
parent
47d69698
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
32 additions
and
23 deletions
+32
-23
.gitignore
.gitignore
+4
-5
EPNAET2.vcxproj
EPNAET2/EPNAET2.vcxproj
+4
-3
funcDemo.vcxproj
funcDemo/funcDemo.vcxproj
+1
-1
pandaAnalysis.vcxproj
pandaAnalysis/pandaAnalysis.vcxproj
+3
-3
CivDbConnection.cpp
pandaDbManager/CivDbConnection.cpp
+10
-7
CivTypes.h
pandaDbManager/CivTypes.h
+6
-1
pandaDbManager.vcxproj
pandaDbManager/pandaDbManager.vcxproj
+4
-3
水力模型.docx
建模文档/水力模型.docx
+0
-0
No files found.
.gitignore
View file @
8963b8ee
EPNAET2/x64/
EPNAET2/x64/
pandaAnalysis/x64/
pandaAnalysis/x64/
pandaDbManager/x64/
pandaDbManager/x64/
funcDemo/x64/
*.inp
*.rpt
*.bin
.vs/
.vs/
/pandaHydrCalcMiddle/x64/Release
/pandaHydrDemo/bin/Release
/pandaHydrDemo/obj/Debug
/pandaHydrDemo/obj/Release
/pandaHydrDemo/bin/Debug
/EPNAET2/Release
/EPNAET2/Release
.suo
.suo
.vs/hydraulicModel/v16/Browse.VC.db
.vs/hydraulicModel/v16/Browse.VC.db
...
...
EPNAET2/EPNAET2.vcxproj
View file @
8963b8ee
...
@@ -49,8 +49,8 @@
...
@@ -49,8 +49,8 @@
<ConfigurationType>
DynamicLibrary
</ConfigurationType>
<ConfigurationType>
DynamicLibrary
</ConfigurationType>
<UseDebugLibraries>
false
</UseDebugLibraries>
<UseDebugLibraries>
false
</UseDebugLibraries>
<PlatformToolset>
v142
</PlatformToolset>
<PlatformToolset>
v142
</PlatformToolset>
<WholeProgramOptimization>
tru
e
</WholeProgramOptimization>
<WholeProgramOptimization>
fals
e
</WholeProgramOptimization>
<CharacterSet>
Unicod
e
</CharacterSet>
<CharacterSet>
MultiByt
e
</CharacterSet>
</PropertyGroup>
</PropertyGroup>
<Import
Project=
"$(VCTargetsPath)\Microsoft.Cpp.props"
/>
<Import
Project=
"$(VCTargetsPath)\Microsoft.Cpp.props"
/>
<ImportGroup
Label=
"ExtensionSettings"
>
<ImportGroup
Label=
"ExtensionSettings"
>
...
@@ -142,12 +142,13 @@ copy epanet2.h $(OutDir)..\include /y</Command>
...
@@ -142,12 +142,13 @@ copy epanet2.h $(OutDir)..\include /y</Command>
<SDLCheck>
true
</SDLCheck>
<SDLCheck>
true
</SDLCheck>
<PreprocessorDefinitions>
_CRT_SECURE_NO_WARNINGS
</PreprocessorDefinitions>
<PreprocessorDefinitions>
_CRT_SECURE_NO_WARNINGS
</PreprocessorDefinitions>
<ConformanceMode>
true
</ConformanceMode>
<ConformanceMode>
true
</ConformanceMode>
<Optimization>
Disabled
</Optimization>
</ClCompile>
</ClCompile>
<Link>
<Link>
<SubSystem>
Console
</SubSystem>
<SubSystem>
Console
</SubSystem>
<EnableCOMDATFolding>
true
</EnableCOMDATFolding>
<EnableCOMDATFolding>
true
</EnableCOMDATFolding>
<OptimizeReferences>
true
</OptimizeReferences>
<OptimizeReferences>
true
</OptimizeReferences>
<GenerateDebugInformation>
tru
e
</GenerateDebugInformation>
<GenerateDebugInformation>
fals
e
</GenerateDebugInformation>
<AdditionalLibraryDirectories>
<AdditionalLibraryDirectories>
</AdditionalLibraryDirectories>
</AdditionalLibraryDirectories>
<ImportLibrary>
$(OutDir)..\lib\$(TargetName).lib
</ImportLibrary>
<ImportLibrary>
$(OutDir)..\lib\$(TargetName).lib
</ImportLibrary>
...
...
funcDemo/funcDemo.vcxproj
View file @
8963b8ee
...
@@ -137,7 +137,7 @@
...
@@ -137,7 +137,7 @@
<SubSystem>
Console
</SubSystem>
<SubSystem>
Console
</SubSystem>
<EnableCOMDATFolding>
true
</EnableCOMDATFolding>
<EnableCOMDATFolding>
true
</EnableCOMDATFolding>
<OptimizeReferences>
true
</OptimizeReferences>
<OptimizeReferences>
true
</OptimizeReferences>
<GenerateDebugInformation>
tru
e
</GenerateDebugInformation>
<GenerateDebugInformation>
fals
e
</GenerateDebugInformation>
<AdditionalDependencies>
pandaAnalysis.lib;%(AdditionalDependencies)
</AdditionalDependencies>
<AdditionalDependencies>
pandaAnalysis.lib;%(AdditionalDependencies)
</AdditionalDependencies>
<AdditionalLibraryDirectories>
$(OUTDIR)..\lib
</AdditionalLibraryDirectories>
<AdditionalLibraryDirectories>
$(OUTDIR)..\lib
</AdditionalLibraryDirectories>
</Link>
</Link>
...
...
pandaAnalysis/pandaAnalysis.vcxproj
View file @
8963b8ee
...
@@ -49,8 +49,8 @@
...
@@ -49,8 +49,8 @@
<ConfigurationType>
DynamicLibrary
</ConfigurationType>
<ConfigurationType>
DynamicLibrary
</ConfigurationType>
<UseDebugLibraries>
false
</UseDebugLibraries>
<UseDebugLibraries>
false
</UseDebugLibraries>
<PlatformToolset>
v142
</PlatformToolset>
<PlatformToolset>
v142
</PlatformToolset>
<WholeProgramOptimization>
tru
e
</WholeProgramOptimization>
<WholeProgramOptimization>
fals
e
</WholeProgramOptimization>
<CharacterSet>
Unicod
e
</CharacterSet>
<CharacterSet>
MultiByt
e
</CharacterSet>
</PropertyGroup>
</PropertyGroup>
<Import
Project=
"$(VCTargetsPath)\Microsoft.Cpp.props"
/>
<Import
Project=
"$(VCTargetsPath)\Microsoft.Cpp.props"
/>
<ImportGroup
Label=
"ExtensionSettings"
>
<ImportGroup
Label=
"ExtensionSettings"
>
...
@@ -142,7 +142,7 @@
...
@@ -142,7 +142,7 @@
<SubSystem>
Console
</SubSystem>
<SubSystem>
Console
</SubSystem>
<EnableCOMDATFolding>
true
</EnableCOMDATFolding>
<EnableCOMDATFolding>
true
</EnableCOMDATFolding>
<OptimizeReferences>
true
</OptimizeReferences>
<OptimizeReferences>
true
</OptimizeReferences>
<GenerateDebugInformation>
tru
e
</GenerateDebugInformation>
<GenerateDebugInformation>
fals
e
</GenerateDebugInformation>
<AdditionalDependencies>
libpq.lib;pandaDbManager.lib;EPNAET2.lib;%(AdditionalDependencies)
</AdditionalDependencies>
<AdditionalDependencies>
libpq.lib;pandaDbManager.lib;EPNAET2.lib;%(AdditionalDependencies)
</AdditionalDependencies>
<AdditionalLibraryDirectories>
$(OUTDIR)..\lib
</AdditionalLibraryDirectories>
<AdditionalLibraryDirectories>
$(OUTDIR)..\lib
</AdditionalLibraryDirectories>
<ImportLibrary>
$(OutDir)..\lib\$(TargetName).lib
</ImportLibrary>
<ImportLibrary>
$(OutDir)..\lib\$(TargetName).lib
</ImportLibrary>
...
...
pandaDbManager/CivDbConnection.cpp
View file @
8963b8ee
...
@@ -37,6 +37,7 @@ bool CivDbConnection::open()
...
@@ -37,6 +37,7 @@ bool CivDbConnection::open()
{
{
mConn
=
PQconnectdb
(
mUri
);
mConn
=
PQconnectdb
(
mUri
);
if
(
PQstatus
(
mConn
)
==
CONNECTION_BAD
)
{
if
(
PQstatus
(
mConn
)
==
CONNECTION_BAD
)
{
mConn
=
NULL
;
PQfinish
(
mConn
);
PQfinish
(
mConn
);
return
false
;
return
false
;
}
}
...
@@ -88,12 +89,12 @@ bool CivDbConnection::updateNode(const NodeResultItems& nodeItems)
...
@@ -88,12 +89,12 @@ bool CivDbConnection::updateNode(const NodeResultItems& nodeItems)
if
(
!
isValid
())
if
(
!
isValid
())
return
false
;
return
false
;
if
(
createTable
(
"__node_result__"
,
"public"
,
NODE_TABLE
))
std
::
stringstream
os
;
if
(
createTable
(
NODERESULTTABLE
,
"public"
,
NODE_TABLE
))
{
{
NodeFieldName
filedNames
;
NodeFieldName
filedNames
;
std
::
stringstream
os
;
os
<<
"INSERT INTO public."
<<
NODERESULTTABLE
<<
" ( "
;
os
<<
"INSERT INTO public.__node_result__ ( "
;
os
<<
filedNames
.
Number
<<
","
;
os
<<
filedNames
.
Number
<<
","
;
os
<<
filedNames
.
dDemand
<<
","
;
os
<<
filedNames
.
dDemand
<<
","
;
os
<<
filedNames
.
dHead
<<
","
;
os
<<
filedNames
.
dHead
<<
","
;
...
@@ -138,6 +139,7 @@ bool CivDbConnection::updateNode(const NodeResultItems& nodeItems)
...
@@ -138,6 +139,7 @@ bool CivDbConnection::updateNode(const NodeResultItems& nodeItems)
// 2, 参数值
// 2, 参数值
size_t
total
=
nodeItems
.
size
();
size_t
total
=
nodeItems
.
size
();
os
<<
"update public."
<<
PIPENODE
;
for
(
int
i
=
0
;
i
<
total
;
i
++
)
for
(
int
i
=
0
;
i
<
total
;
i
++
)
{
{
NodeResultItem
item
=
nodeItems
[
i
];
NodeResultItem
item
=
nodeItems
[
i
];
...
@@ -178,10 +180,10 @@ bool CivDbConnection::updateLink(const LinkResultItems& lineItems)
...
@@ -178,10 +180,10 @@ bool CivDbConnection::updateLink(const LinkResultItems& lineItems)
return
false
;
return
false
;
std
::
stringstream
os
;
std
::
stringstream
os
;
if
(
createTable
(
"__pipe_result__"
,
"public"
,
PIPE_TABLE
))
if
(
createTable
(
PIPERESULTTABLE
,
"public"
,
PIPE_TABLE
))
{
{
LinkFiledName
filedNames
;
LinkFiledName
filedNames
;
os
<<
"INSERT INTO public.
__pipe_result__
( "
;
os
<<
"INSERT INTO public.
"
<<
PIPERESULTTABLE
<<
"
( "
;
os
<<
filedNames
.
szNo
<<
","
;
os
<<
filedNames
.
szNo
<<
","
;
os
<<
filedNames
.
dFlow
<<
","
;
os
<<
filedNames
.
dFlow
<<
","
;
/* os<< filedNames.nFlowDirect;
/* os<< filedNames.nFlowDirect;
...
@@ -597,9 +599,9 @@ bool CivDbConnection::createTable(StrQuote tableName, StrQuote schema,TableType
...
@@ -597,9 +599,9 @@ bool CivDbConnection::createTable(StrQuote tableName, StrQuote schema,TableType
tableTemp
.
addProperty
(
filedName
.
dTankVolume
,
CivTableTemp
::
FILED_DOUBLE
);
tableTemp
.
addProperty
(
filedName
.
dTankVolume
,
CivTableTemp
::
FILED_DOUBLE
);
tableTemp
.
addProperty
(
filedName
.
dTankMaxVolume
,
CivTableTemp
::
FILED_DOUBLE
);
tableTemp
.
addProperty
(
filedName
.
dTankMaxVolume
,
CivTableTemp
::
FILED_DOUBLE
);
tableTemp
.
addProperty
(
filedName
.
dTankLevel
,
CivTableTemp
::
FILED_DOUBLE
);
tableTemp
.
addProperty
(
filedName
.
dTankLevel
,
CivTableTemp
::
FILED_DOUBLE
);
tableTemp
.
addProperty
(
"类型"
,
CivTableTemp
::
FILED_INT
);
tableTemp
.
addProperty
(
"水质"
,
CivTableTemp
::
FILED_DOUBLE
);
tableTemp
.
addProperty
(
"水质"
,
CivTableTemp
::
FILED_DOUBLE
);
tableTemp
.
addProperty
(
"时间"
,
CivTableTemp
::
FILED_DATETIME
);
tableTemp
.
addProperty
(
"时间"
,
CivTableTemp
::
FILED_DATETIME
);
tableTemp
.
addProperty
(
"时段"
,
CivTableTemp
::
FILED_INT
);
}
}
break
;
break
;
case
PIPE_TABLE
:
case
PIPE_TABLE
:
...
@@ -618,6 +620,7 @@ bool CivDbConnection::createTable(StrQuote tableName, StrQuote schema,TableType
...
@@ -618,6 +620,7 @@ bool CivDbConnection::createTable(StrQuote tableName, StrQuote schema,TableType
tableTemp
.
addProperty
(
pipeFileds
.
szStatus
,
CivTableTemp
::
FILED_VARCHAR
);
tableTemp
.
addProperty
(
pipeFileds
.
szStatus
,
CivTableTemp
::
FILED_VARCHAR
);
tableTemp
.
addProperty
(
"水质"
,
CivTableTemp
::
FILED_DOUBLE
);
tableTemp
.
addProperty
(
"水质"
,
CivTableTemp
::
FILED_DOUBLE
);
tableTemp
.
addProperty
(
"时间"
,
CivTableTemp
::
FILED_DATETIME
);
tableTemp
.
addProperty
(
"时间"
,
CivTableTemp
::
FILED_DATETIME
);
tableTemp
.
addProperty
(
"时段"
,
CivTableTemp
::
FILED_INT
);
}
}
break
;
break
;
case
PATTERN_TABLE
:
case
PATTERN_TABLE
:
...
...
pandaDbManager/CivTypes.h
View file @
8963b8ee
...
@@ -12,6 +12,9 @@ typedef const std::string& StrQuote;
...
@@ -12,6 +12,9 @@ typedef const std::string& StrQuote;
#define RESIVOIR Str("水库")
#define RESIVOIR Str("水库")
#define TANK Str("水池")
#define TANK Str("水池")
#define PUMP Str("水泵")
#define PUMP Str("水泵")
#define NODERESULTTABLE Str("__node_result__")
#define PIPERESULTTABLE Str("__pipe_result__")
#define PATTERNTABLE Str("__pattern__")
#define PATTERNTABLE Str("__pattern__")
#define CURVETABLE Str("__curve__")
#define CURVETABLE Str("__curve__")
#define OPTIONTTABLE Str("__parameter__")
#define OPTIONTTABLE Str("__parameter__")
...
@@ -202,8 +205,9 @@ struct NodeFieldName
...
@@ -202,8 +205,9 @@ struct NodeFieldName
Str
dDemand
=
" 实际需水量"
;
Str
dDemand
=
" 实际需水量"
;
Str
dTankVolume
=
" 水池容量"
;
Str
dTankVolume
=
" 水池容量"
;
Str
dTankMaxVolume
=
" 水池最大容量"
;
Str
dTankMaxVolume
=
" 水池最大容量"
;
Str
dTankLevel
=
" 液位高度"
;
Str
dTankLevel
=
" 液位高度"
;
Str
lTime
=
"时间"
;
Str
lTime
=
"时间"
;
Str
dInterval
=
"时段"
;
};
};
struct
LinkFiledName
struct
LinkFiledName
...
@@ -220,6 +224,7 @@ struct LinkFiledName
...
@@ -220,6 +224,7 @@ struct LinkFiledName
Str
dFrictionHeadloss
=
"摩擦水头损"
;
Str
dFrictionHeadloss
=
"摩擦水头损"
;
Str
szStatus
=
"状态"
;
Str
szStatus
=
"状态"
;
Str
lTime
=
"时间"
;
Str
lTime
=
"时间"
;
Str
dInterval
=
"时段"
;
};
};
// 水力计算管点结果缓存
// 水力计算管点结果缓存
...
...
pandaDbManager/pandaDbManager.vcxproj
View file @
8963b8ee
...
@@ -49,8 +49,8 @@
...
@@ -49,8 +49,8 @@
<ConfigurationType>
DynamicLibrary
</ConfigurationType>
<ConfigurationType>
DynamicLibrary
</ConfigurationType>
<UseDebugLibraries>
false
</UseDebugLibraries>
<UseDebugLibraries>
false
</UseDebugLibraries>
<PlatformToolset>
v142
</PlatformToolset>
<PlatformToolset>
v142
</PlatformToolset>
<WholeProgramOptimization>
tru
e
</WholeProgramOptimization>
<WholeProgramOptimization>
fals
e
</WholeProgramOptimization>
<CharacterSet>
Unicod
e
</CharacterSet>
<CharacterSet>
MultiByt
e
</CharacterSet>
</PropertyGroup>
</PropertyGroup>
<Import
Project=
"$(VCTargetsPath)\Microsoft.Cpp.props"
/>
<Import
Project=
"$(VCTargetsPath)\Microsoft.Cpp.props"
/>
<ImportGroup
Label=
"ExtensionSettings"
>
<ImportGroup
Label=
"ExtensionSettings"
>
...
@@ -137,12 +137,13 @@
...
@@ -137,12 +137,13 @@
<PreprocessorDefinitions>
_CRT_SECURE_NO_WARNINGS;WINDOWS
</PreprocessorDefinitions>
<PreprocessorDefinitions>
_CRT_SECURE_NO_WARNINGS;WINDOWS
</PreprocessorDefinitions>
<ConformanceMode>
true
</ConformanceMode>
<ConformanceMode>
true
</ConformanceMode>
<AdditionalIncludeDirectories>
$(OUTDIR)..\include;%(AdditionalIncludeDirectories)
</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>
$(OUTDIR)..\include;%(AdditionalIncludeDirectories)
</AdditionalIncludeDirectories>
<Optimization>
Disabled
</Optimization>
</ClCompile>
</ClCompile>
<Link>
<Link>
<SubSystem>
Console
</SubSystem>
<SubSystem>
Console
</SubSystem>
<EnableCOMDATFolding>
true
</EnableCOMDATFolding>
<EnableCOMDATFolding>
true
</EnableCOMDATFolding>
<OptimizeReferences>
true
</OptimizeReferences>
<OptimizeReferences>
true
</OptimizeReferences>
<GenerateDebugInformation>
tru
e
</GenerateDebugInformation>
<GenerateDebugInformation>
fals
e
</GenerateDebugInformation>
<AdditionalDependencies>
libpq.lib;json_vc71_libmt.lib;%(AdditionalDependencies)
</AdditionalDependencies>
<AdditionalDependencies>
libpq.lib;json_vc71_libmt.lib;%(AdditionalDependencies)
</AdditionalDependencies>
<AdditionalLibraryDirectories>
$(OUTDIR)..\lib;%(AdditionalLibraryDirectories)
</AdditionalLibraryDirectories>
<AdditionalLibraryDirectories>
$(OUTDIR)..\lib;%(AdditionalLibraryDirectories)
</AdditionalLibraryDirectories>
<ImportLibrary>
$(OutDir)..\lib\$(TargetName).lib
</ImportLibrary>
<ImportLibrary>
$(OutDir)..\lib\$(TargetName).lib
</ImportLibrary>
...
...
建模文档/水力模型.docx
View file @
8963b8ee
No preview for this file type
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