Correct issues with gml files and ep_workflow
This commit is contained in:
parent
8d3cf3a341
commit
9fa55f2ca3
|
@ -1,10 +1,9 @@
|
||||||
const { dialog } = require('@electron/remote')
|
const { dialog } = require('@electron/remote')
|
||||||
const { Console } = require('console')
|
const { Console } = require('console')
|
||||||
const { app, BrowserWindow, Notification } = require('electron')
|
const { app, BrowserWindow, Notification, electron } = require('electron')
|
||||||
const { get } = require('http')
|
const { get } = require('http')
|
||||||
const path = require('path')
|
const path = require('path')
|
||||||
|
|
||||||
|
|
||||||
let {PythonShell} = require('python-shell')
|
let {PythonShell} = require('python-shell')
|
||||||
|
|
||||||
function showNotification () { new Notification({ title: 'NOTIFICATION_TITLE', body: 'event_text' }).show()}
|
function showNotification () { new Notification({ title: 'NOTIFICATION_TITLE', body: 'event_text' }).show()}
|
||||||
|
@ -50,12 +49,10 @@ function plot_results() {
|
||||||
labels: dates,
|
labels: dates,
|
||||||
datasets: [{
|
datasets: [{
|
||||||
label: 'Heating (J)',
|
label: 'Heating (J)',
|
||||||
//backgroundColor: 'rgb(255, 99, 132)',
|
|
||||||
borderColor: 'rgb(255, 99, 132)',
|
borderColor: 'rgb(255, 99, 132)',
|
||||||
data: heating
|
data: heating
|
||||||
},
|
},
|
||||||
{ label: 'Cooling (J)',
|
{ label: 'Cooling (J)',
|
||||||
//backgroundColor: 'rgb(132, 99, 255)',
|
|
||||||
borderColor: 'rgb(132, 99, 255)',
|
borderColor: 'rgb(132, 99, 255)',
|
||||||
data: cooling
|
data: cooling
|
||||||
}]
|
}]
|
||||||
|
|
|
@ -2,9 +2,11 @@
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
|
<meta http-equiv="Content-Security-Policy" content="script-src 'self';">
|
||||||
<link rel="stylesheet" type="text/css" href="./css/bootstrap.min.css">
|
<link rel="stylesheet" type="text/css" href="./css/bootstrap.min.css">
|
||||||
<link rel="stylesheet" type="text/css" href="./css/base.css">
|
<link rel="stylesheet" type="text/css" href="./css/base.css">
|
||||||
<link rel="icon" type="image/svg+xml" href="./img/favicon.svg">
|
<link rel="icon" type="image/svg+xml" href="./img/favicon.svg">
|
||||||
|
|
||||||
<title>Energy+ Workflow v1.0</title>
|
<title>Energy+ Workflow v1.0</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
2
main.js
2
main.js
|
@ -10,7 +10,7 @@ function createWindow () {
|
||||||
nodeIntegration: true,
|
nodeIntegration: true,
|
||||||
enableRemoteModule: true,
|
enableRemoteModule: true,
|
||||||
contextIsolation: false,
|
contextIsolation: false,
|
||||||
devTools: false,
|
devTools: true,
|
||||||
preload: path.join(__dirname, 'init.js')
|
preload: path.join(__dirname, 'init.js')
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -1,16 +1,21 @@
|
||||||
import sys
|
import sys
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
import csv
|
import csv
|
||||||
|
|
||||||
sys.path.append('../hub')
|
sys.path.append('../hub')
|
||||||
try:
|
sys.path.append('./')
|
||||||
|
|
||||||
|
from imports.customized_imports_factory import CustomizedImportsFactory
|
||||||
|
from imports.customized_imports.stochastic_schedules_importer import StochasticSchedulesImporter as ssi
|
||||||
from imports.geometry_factory import GeometryFactory
|
from imports.geometry_factory import GeometryFactory
|
||||||
from imports.construction_factory import ConstructionFactory
|
from imports.construction_factory import ConstructionFactory
|
||||||
from imports.usage_factory import UsageFactory
|
from imports.usage_factory import UsageFactory
|
||||||
from exports.exports_factory import ExportsFactory
|
from exports.exports_factory import ExportsFactory
|
||||||
from imports.customized_imports_factory import CustomizedImportsFactory
|
|
||||||
from imports.customized_imports.stochastic_schedules_importer import StochasticSchedulesImporter as ssi
|
|
||||||
|
|
||||||
|
try:
|
||||||
|
gml = ''
|
||||||
for argument_tuple in sys.argv[1:]:
|
for argument_tuple in sys.argv[1:]:
|
||||||
|
print(argument_tuple)
|
||||||
argument = argument_tuple.split(' ')
|
argument = argument_tuple.split(' ')
|
||||||
option = argument[0]
|
option = argument[0]
|
||||||
value = argument[1]
|
value = argument[1]
|
||||||
|
@ -22,9 +27,15 @@ try:
|
||||||
print(f'city created from {gml}')
|
print(f'city created from {gml}')
|
||||||
for building in city.buildings:
|
for building in city.buildings:
|
||||||
building.year_of_construction = 2006
|
building.year_of_construction = 2006
|
||||||
|
if building.function is None:
|
||||||
|
building.function = 'large office'
|
||||||
ConstructionFactory('nrel', city).enrich()
|
ConstructionFactory('nrel', city).enrich()
|
||||||
print('enrich constructions... done')
|
print('enrich constructions... done')
|
||||||
UsageFactory('comnet', city).enrich()
|
UsageFactory('comnet', city).enrich()
|
||||||
|
for building in city.buildings:
|
||||||
|
for internal_zone in building.internal_zones:
|
||||||
|
for usage_zone in internal_zone.usage_zones:
|
||||||
|
print(usage_zone.occupancy.occupancy_schedules)
|
||||||
print('enrich usage... done')
|
print('enrich usage... done')
|
||||||
in_path = (Path(__file__).parent.parent / 'data' / 'occupancyschedules_2019_point4.xlsx')
|
in_path = (Path(__file__).parent.parent / 'data' / 'occupancyschedules_2019_point4.xlsx')
|
||||||
CustomizedImportsFactory(ssi, city, in_path).enrich()
|
CustomizedImportsFactory(ssi, city, in_path).enrich()
|
||||||
|
@ -59,7 +70,9 @@ try:
|
||||||
|
|
||||||
print(f'info: {idf_file}, {csv_file}, {eso_file}, {area}, {volume}, {obj_file}')
|
print(f'info: {idf_file}, {csv_file}, {eso_file}, {area}, {volume}, {obj_file}')
|
||||||
print('[simulation end]')
|
print('[simulation end]')
|
||||||
|
|
||||||
except Exception as ex:
|
except Exception as ex:
|
||||||
|
print(ex)
|
||||||
print('error: ', ex)
|
print('error: ', ex)
|
||||||
print('[simulation abort]')
|
print('[simulation abort]')
|
||||||
sys.stdout.flush()
|
sys.stdout.flush()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user