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
d6aa5e6c
Commit
d6aa5e6c
authored
Dec 28, 2020
by
刘乐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1,增加余氯分析接口
parent
50cbba70
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
82 additions
and
18 deletions
+82
-18
CivHydrFuncInter.cpp
pandaAnalysis/CivHydrFuncInter.cpp
+9
-0
CivHydrFuncInter.h
pandaAnalysis/CivHydrFuncInter.h
+8
-0
CivOptSchedEngine.cpp
pandaAnalysis/CivOptSchedEngine.cpp
+3
-3
CivResidualChlorineAnalysis.cpp
pandaAnalysis/CivResidualChlorineAnalysis.cpp
+19
-0
CivResidualChlorineAnalysis.h
pandaAnalysis/CivResidualChlorineAnalysis.h
+37
-0
CivPumpHelper.cpp
pandaDbManager/CivPumpHelper.cpp
+5
-13
CivAttributes.h
pandaWaterCore/CivAttributes.h
+1
-1
CivFeature.h
pandaWaterCore/CivFeature.h
+0
-1
No files found.
pandaAnalysis/CivHydrFuncInter.cpp
View file @
d6aa5e6c
...
...
@@ -167,5 +167,13 @@ bool PANDANALYSIS_API optimalSchedulingSimulation(char* uri, char* condition, in
// 复制
strcpy
(
result
,
resultStr
.
c_str
());
return
true
;
}
bool
PANDANALYSIS_API
residualChlorineAnalysis
(
char
*
uri
,
char
*
conditionMap
,
char
*
error
)
{
std
::
string
uriStr
=
uri
;
std
::
string
conditionMapStr
=
conditionMap
;
return
true
;
}
\ No newline at end of file
pandaAnalysis/CivHydrFuncInter.h
View file @
d6aa5e6c
...
...
@@ -69,6 +69,14 @@ extern "C" {
*@param [out] result: 模拟的调度结果
*/
bool
PANDANALYSIS_API
optimalSchedulingSimulation
(
char
*
uri
,
char
*
condition
,
int
timeInterval
,
char
*
result
);
/**
*@brief 优化调度模拟
* @param [in] uri:condition
* @param [in] condition:约束条件, 格式: json字符串 {"startTime":'',"endTime":'',"水池":[{"code":'',"余氯量":},{"code":'',"余氯量":}]}
* @param [error] 错误警告
*/
bool
PANDANALYSIS_API
residualChlorineAnalysis
(
char
*
uri
,
char
*
conditionMap
,
char
*
error
);
#if defined(__cplusplus)
}
#endif
...
...
pandaAnalysis/CivOptSchedEngine.cpp
View file @
d6aa5e6c
...
...
@@ -189,14 +189,14 @@ void CivOptSchedEngine::schedulingResultToJson(string& json)
szNo
=
pumpIter
->
second
;
}
json
.
append
(
szNo
+
":"
+
to_string
(
iter
->
second
));
json
.
append
(
"
\"
"
+
szNo
+
"
\
"
:"
+
to_string
(
iter
->
second
));
json
.
append
(
","
);
}
json
=
json
.
substr
(
0
,
json
.
length
()
-
1
);
json
.
append
(
"},"
);
// 调度组合
json
.
append
(
"
\"
监测点:
\"
"
);
json
.
append
(
"
\"
监测点
\"
:
"
);
json
.
append
(
"{"
);
for
(
auto
iter
=
mBforeSchedulingResults
.
begin
();
iter
!=
mBforeSchedulingResults
.
end
();
iter
++
)
...
...
@@ -226,7 +226,7 @@ void CivOptSchedEngine::schedulingResultToJson(string& json)
}
json
=
json
.
substr
(
0
,
json
.
length
()
-
1
);
json
.
append
(
"}"
);
json
.
append
(
"}
}
"
);
}
...
...
pandaAnalysis/CivResidualChlorineAnalysis.cpp
0 → 100644
View file @
d6aa5e6c
#include "CivResidualChlorineAnalysis.h"
CivResidualChlorineAnalysis
::
CivResidualChlorineAnalysis
(
const
std
::
string
&
uri
,
const
std
::
string
&
startTime
,
const
std
::
string
&
endTime
)
:
mUri
(
uri
),
mStartTime
(
startTime
),
mEndTile
(
endTime
)
{
}
bool
CivResidualChlorineAnalysis
::
convertToInp
()
{
}
bool
CivResidualChlorineAnalysis
::
analysisChlorine
()
{
}
\ No newline at end of file
pandaAnalysis/CivResidualChlorineAnalysis.h
0 → 100644
View file @
d6aa5e6c
#pragma once
#include <string>
/**
余氯分析类
*/
class
CivResidualChlorineAnalysis
{
public
:
/**
* @brief 余氯分析构造函数
* @param [uri] 数据库链接地址
* @param [startTime] 开始时刻
* @param [endTime] 结束时刻
*/
CivResidualChlorineAnalysis
(
const
std
::
string
&
uri
,
const
std
::
string
&
startTime
,
const
std
::
string
&
endTime
);
bool
analysisChlorine
();
/**
返回错误信息
*/
std
::
string
lastError
()
const
{
return
mLastError
;
}
private
:
/**
转inp文件
*/
bool
convertToInp
();
private
:
std
::
string
mUri
;
std
::
string
mStartTime
;
std
::
string
mEndTile
;
std
::
string
mLastError
;
};
pandaDbManager/CivPumpHelper.cpp
View file @
d6aa5e6c
...
...
@@ -134,19 +134,12 @@ void CivPumpHelper::getMonitors(vector<string>& monitors,map<string,string>& mon
map
<
string
,
string
>
tempMap
=
tempMapVec
[
i
];
string
szNo
=
tempMap
.
find
(
"本点号"
)
->
second
;
string
code
=
tempMap
.
find
(
"code"
)
->
second
;
auto
mIter
=
std
::
find
(
monitors
.
begin
(),
monitors
.
end
(),
szNo
);
if
(
mIter
!=
monitors
.
end
())
{
monitorMap
.
insert
(
pair
<
string
,
string
>
(
szNo
,
code
));
}
mIter
=
std
::
find
(
monitors
.
begin
(),
monitors
.
end
(),
code
);
if
(
mIter
!=
monitors
.
end
())
vector
<
string
>::
iterator
iter
=
std
::
find
(
monitors
.
begin
(),
monitors
.
end
(),
code
);
if
(
iter
!=
monitors
.
end
())
{
monitorMap
.
insert
(
pair
<
string
,
string
>
(
szNo
,
code
));
*
iter
=
szNo
;
monitorMap
.
insert
(
pair
<
string
,
string
>
(
szNo
,
code
));
}
}
}
\ No newline at end of file
pandaWaterCore/CivAttributes.h
View file @
d6aa5e6c
...
...
@@ -18,7 +18,7 @@ public:
typedef
map
<
string
,
CivVariant
>
Params
;
CivAttributes
()
=
default
;
CivAttributes
(
const
Params
&
params
);
explicit
CivAttributes
(
const
Params
&
params
);
/**
* @brief 添加单个属性
...
...
pandaWaterCore/CivFeature.h
View file @
d6aa5e6c
#pragma once
#include "CivAttributes.h"
#include "CivGeometry.h"
#include "pandaWaterCore.h"
...
...
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