Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
energyplus_calibrator
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jonathan Kriwet
energyplus_calibrator
Commits
baac1e69
Commit
baac1e69
authored
7 months ago
by
Jonathan Kriwet
Browse files
Options
Downloads
Patches
Plain Diff
added option to force parameter to min(...) of other parameters
parent
b3d75cd2
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
energyplus_calibrator/calibration_class.py
+5
-1
5 additions, 1 deletion
energyplus_calibrator/calibration_class.py
energyplus_calibrator/energy_plus_api.py
+18
-2
18 additions, 2 deletions
energyplus_calibrator/energy_plus_api.py
with
23 additions
and
3 deletions
energyplus_calibrator/calibration_class.py
+
5
−
1
View file @
baac1e69
...
...
@@ -187,6 +187,10 @@ class EnergyPlusCalibrator:
if
self
.
force_same
is
not
None
:
for
force_to
,
force_from
in
self
.
force_same
.
items
():
check_param
(
force_to
)
if
isinstance
(
force_from
[
0
],
(
list
,
tuple
)):
for
f
in
force_from
[
0
]:
check_param
(
f
)
else
:
check_param
(
force_from
[
0
])
def
_get_tuner_paras_dict
(
self
)
->
Dict
[
str
,
Tuple
[
float
,
Tuple
[
float
,
float
]]]:
...
...
This diff is collapsed.
Click to expand it.
energyplus_calibrator/energy_plus_api.py
+
18
−
2
View file @
baac1e69
...
...
@@ -349,6 +349,7 @@ class EnergyPlusAPI(SimulationAPI):
_df
=
self
.
_single_simulation_solo_mp
(
kwargs
.
copy
())
else
:
_df
=
self
.
_single_simulation_solo
(
kwargs
.
copy
())
if
_df
is
None
:
if
queue
is
not
None
:
queue
.
put
(
None
)
...
...
@@ -466,8 +467,19 @@ class EnergyPlusAPI(SimulationAPI):
if
self
.
force_same
is
not
None
and
not
dont_force_same
:
for
force_to
,
force_from
in
self
.
force_same
.
items
():
if
isinstance
(
force_from
[
0
],
str
):
parameters
[
force_to
]
=
parameters
[
force_from
[
0
]]
+
\
force_from
[
1
]
continue
elif
not
isinstance
(
force_from
[
0
],
tuple
):
raise
ValueError
(
'
force_from must be a tuple or a string
'
)
#force_from is a tuple
if
force_from
[
1
]
==
'
min
'
:
parameters
[
force_to
]
=
min
([
parameters
[
i
]
for
i
in
force_from
[
0
]])
else
:
raise
NameError
(
'
force_from[1] must be
"
min
"'
)
for
key
in
self
.
_set_output_timestep
:
self
.
_set_output_timestep
[
key
]
=
self
.
sim_setup
.
dataframe_interval
...
...
@@ -509,6 +521,10 @@ class EnergyPlusAPI(SimulationAPI):
self
.
logger
.
error
(
'
---ARGS---
\n
%s
'
,
result
.
args
)
self
.
logger
.
error
(
'
---STDOUT---
\n
%s
'
,
result
.
stdout
.
decode
())
self
.
logger
.
error
(
'
---STDERR---
\n
%s
'
,
result
.
stderr
.
decode
())
error_file
=
_temp_output_directory
/
'
eplusout.err
'
if
error_file
.
exists
():
with
open
(
error_file
,
'
r
'
)
as
f
:
self
.
logger
.
error
(
f
.
read
())
shutil
.
rmtree
(
_temp_output_directory
)
shutil
.
rmtree
(
_temp_generated_inputs
)
if
fail_on_error
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment