Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
U
unify_api2
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
chaonan
unify_api2
Commits
c7f1fa76
You need to sign in or sign up before continuing.
Commit
c7f1fa76
authored
Dec 31, 2024
by
ZZH
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update inv eval 2024-12-31 13:44
parent
987ac3ce
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
0 deletions
+4
-0
ems_cps.py
unify_api/modules/inv_eval/components/ems_cps.py
+1
-0
ems.py
unify_api/modules/inv_eval/views/ems.py
+3
-0
No files found.
unify_api/modules/inv_eval/components/ems_cps.py
View file @
c7f1fa76
...
...
@@ -43,3 +43,4 @@ class EmsInvEvalRsp(Model):
irr
:
float
=
Opt
(
Float
(
"内部收益率 "
)
.
eg
(
0.1
))
ior
:
float
=
Opt
(
Float
(
"投资回报率"
)
.
eg
(
0.1
))
cost_kWh
:
float
=
Opt
(
Float
(
"度电成本"
)
.
eg
(
0.1
))
error
:
str
=
Opt
(
Str
(
"不合理输入"
)
.
eg
(
"当前限制条件不合理"
))
unify_api/modules/inv_eval/views/ems.py
View file @
c7f1fa76
...
...
@@ -44,6 +44,9 @@ async def post_inv_eval(req, body: EmsInvEvalReq) -> EmsInvEvalRsp:
sale_price
=
sale_price
,
sale_limit
=
sale_limit
,
sale_cost
=
sale_cost
,
goal
=
goal
)
cfg
=
await
inv_eval
(
d_params
)
if
"Error"
in
cfg
:
return
EmsInvEvalRsp
(
error
=
cfg
[
"Error"
])
return
EmsInvEvalRsp
(
pv
=
cfg
.
get
(
"pv"
,
0
),
es_p
=
cfg
.
get
(
"es_p"
,
0
),
es_cap
=
cfg
.
get
(
"es_cap"
,
0
),
cg
=
cfg
.
get
(
"cg"
,
0
),
...
...
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