Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
OptiOrch
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
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Zizhe Wang
OptiOrch
Commits
9e36b3c8
Commit
9e36b3c8
authored
11 months ago
by
Zizhe Wang
Browse files
Options
Downloads
Patches
Plain Diff
feat definition of variable type
parent
65a8de7b
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/config.json
+10
-4
10 additions, 4 deletions
src/config.json
src/config.py
+10
-0
10 additions, 0 deletions
src/config.py
with
20 additions
and
4 deletions
src/config.json
+
10
−
4
View file @
9e36b3c8
...
...
@@ -6,15 +6,21 @@
"OBJECTIVES"
:
[
"energy"
,
"comfort"
],
"MAXIMIZE"
:
[
"comfort"
],
"PARAM_BOUNDS"
:
{
"Q_max"
:
[
1000
,
5000
],
"T_set"
:
[
280
,
310
]
"Q_max"
:
{
"bounds"
:
[
1000
,
5000
],
"type"
:
"int"
},
"T_set"
:
{
"bounds"
:
[
280
,
310
],
"type"
:
"int"
}
},
"PRECISION"
:
2
,
"OPTIMIZATION_CONFIG"
:
{
"USE_ADAPTIVE_INSTANCE_SELECTION"
:
true
,
"ALGORITHM_NAME"
:
"NSGA2"
,
"POP_SIZE"
:
5
,
"N_GEN"
:
5
"POP_SIZE"
:
1
,
"N_GEN"
:
1
},
"PLOT_CONFIG"
:
{
"PLOT_X"
:
"Energy Consumption"
,
...
...
This diff is collapsed.
Click to expand it.
src/config.py
+
10
−
0
View file @
9e36b3c8
...
...
@@ -31,6 +31,16 @@ N_JOBS = config['N_JOBS']
# Derived configuration
MODEL_PATH
=
os
.
path
.
join
(
os
.
getcwd
(),
MODEL_FILE
)
# Helper functions to get bounds and types
def
get_bounds
(
param_bounds
):
return
{
param
:
bounds_info
[
"
bounds
"
]
for
param
,
bounds_info
in
param_bounds
.
items
()}
def
get_types
(
param_bounds
):
return
{
param
:
bounds_info
[
"
type
"
]
for
param
,
bounds_info
in
param_bounds
.
items
()}
PARAM_BOUND_VALUES
=
get_bounds
(
PARAM_BOUNDS
)
PARAM_TYPES
=
get_types
(
PARAM_BOUNDS
)
# "PARAMETERS": Parameters to be varied
# "OBJECTIVES": Objectives to be optimized
# "MAXIMIZE": Objectives to be maximized
...
...
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