Skip to content
Snippets Groups Projects
Commit 9e36b3c8 authored by Zizhe Wang's avatar Zizhe Wang
Browse files

feat definition of variable type

parent 65a8de7b
Branches
No related tags found
No related merge requests found
......@@ -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",
......
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment