OpenSimula 0.4.0__tar.gz → 0.5.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of OpenSimula might be problematic. Click here for more details.
- opensimula-0.5.0/OpenSimula.egg-info/PKG-INFO +52 -0
- {opensimula-0.4.0 → opensimula-0.5.0}/OpenSimula.egg-info/SOURCES.txt +9 -7
- opensimula-0.5.0/OpenSimula.egg-info/requires.txt +14 -0
- opensimula-0.5.0/PKG-INFO +52 -0
- {opensimula-0.4.0 → opensimula-0.5.0}/README.md +2 -2
- opensimula-0.5.0/pyproject.toml +46 -0
- {opensimula-0.4.0 → opensimula-0.5.0}/src/OpenSimula/Component.py +21 -5
- {opensimula-0.4.0 → opensimula-0.5.0}/src/OpenSimula/Iterative_process.py +5 -1
- opensimula-0.5.0/src/OpenSimula/Message.py +19 -0
- {opensimula-0.4.0 → opensimula-0.5.0}/src/OpenSimula/Parameter_container.py +2 -4
- {opensimula-0.4.0 → opensimula-0.5.0}/src/OpenSimula/Parameters.py +71 -81
- {opensimula-0.4.0 → opensimula-0.5.0}/src/OpenSimula/Project.py +285 -124
- {opensimula-0.4.0 → opensimula-0.5.0}/src/OpenSimula/Simulation.py +12 -23
- {opensimula-0.4.0 → opensimula-0.5.0}/src/OpenSimula/__init__.py +1 -1
- opensimula-0.5.0/src/OpenSimula/components/Building.py +511 -0
- opensimula-0.5.0/src/OpenSimula/components/Building_surface.py +318 -0
- {opensimula-0.4.0 → opensimula-0.5.0}/src/OpenSimula/components/Calculator.py +5 -17
- {opensimula-0.4.0 → opensimula-0.5.0}/src/OpenSimula/components/Construction.py +3 -4
- {opensimula-0.4.0 → opensimula-0.5.0}/src/OpenSimula/components/Day_schedule.py +5 -6
- {opensimula-0.4.0 → opensimula-0.5.0}/src/OpenSimula/components/File_data.py +8 -10
- {opensimula-0.4.0 → opensimula-0.5.0}/src/OpenSimula/components/File_met.py +82 -11
- {opensimula-0.4.0 → opensimula-0.5.0}/src/OpenSimula/components/HVAC_DX_equipment.py +115 -92
- opensimula-0.5.0/src/OpenSimula/components/HVAC_DX_system.py +254 -0
- opensimula-0.5.0/src/OpenSimula/components/HVAC_MZW_system.py +554 -0
- opensimula-0.5.0/src/OpenSimula/components/HVAC_SZW_system.py +338 -0
- opensimula-0.5.0/src/OpenSimula/components/HVAC_coil_equipment.py +206 -0
- opensimula-0.5.0/src/OpenSimula/components/HVAC_fan_equipment.py +44 -0
- {opensimula-0.4.0 → opensimula-0.5.0}/src/OpenSimula/components/HVAC_perfect_system.py +61 -51
- opensimula-0.5.0/src/OpenSimula/components/Opening.py +409 -0
- {opensimula-0.4.0 → opensimula-0.5.0}/src/OpenSimula/components/Opening_type.py +7 -6
- opensimula-0.5.0/src/OpenSimula/components/Solar_surface.py +114 -0
- {opensimula-0.4.0 → opensimula-0.5.0}/src/OpenSimula/components/Space.py +93 -99
- {opensimula-0.4.0 → opensimula-0.5.0}/src/OpenSimula/components/Space_type.py +1 -11
- {opensimula-0.4.0 → opensimula-0.5.0}/src/OpenSimula/components/Surface.py +33 -35
- {opensimula-0.4.0 → opensimula-0.5.0}/src/OpenSimula/components/Test_component.py +0 -6
- {opensimula-0.4.0 → opensimula-0.5.0}/src/OpenSimula/components/Week_schedule.py +3 -4
- {opensimula-0.4.0 → opensimula-0.5.0}/src/OpenSimula/components/Year_schedule.py +7 -8
- {opensimula-0.4.0 → opensimula-0.5.0}/src/OpenSimula/components/__init__.py +10 -10
- opensimula-0.5.0/src/OpenSimula/visual_3D/Environment_3D.py +257 -0
- opensimula-0.5.0/src/OpenSimula/visual_3D/Polygon_3D.py +262 -0
- {opensimula-0.4.0 → opensimula-0.5.0}/test/test_Case_600FF.py +20 -27
- {opensimula-0.4.0 → opensimula-0.5.0}/test/test_Case_610.py +22 -25
- {opensimula-0.4.0 → opensimula-0.5.0}/test/test_HVAC_DX_Equipment.py +15 -17
- {opensimula-0.4.0 → opensimula-0.5.0}/test/test_HVAC_DX_system.py +54 -45
- {opensimula-0.4.0 → opensimula-0.5.0}/test/test_Iterative_process.py +1 -1
- opensimula-0.4.0/OpenSimula.egg-info/PKG-INFO +0 -59
- opensimula-0.4.0/OpenSimula.egg-info/requires.txt +0 -21
- opensimula-0.4.0/PKG-INFO +0 -59
- opensimula-0.4.0/pyproject.toml +0 -54
- opensimula-0.4.0/src/OpenSimula/components/Building.py +0 -688
- opensimula-0.4.0/src/OpenSimula/components/Exterior_surface.py +0 -143
- opensimula-0.4.0/src/OpenSimula/components/HVAC_DX_system.py +0 -392
- opensimula-0.4.0/src/OpenSimula/components/Interior_surface.py +0 -79
- opensimula-0.4.0/src/OpenSimula/components/Opening.py +0 -217
- opensimula-0.4.0/src/OpenSimula/components/Real_surface.py +0 -47
- opensimula-0.4.0/src/OpenSimula/components/Shadow_surface.py +0 -24
- opensimula-0.4.0/src/OpenSimula/components/Underground_surface.py +0 -76
- opensimula-0.4.0/src/OpenSimula/components/Virtual_surface.py +0 -33
- opensimula-0.4.0/src/OpenSimula/components/utils/sun_shadows.py +0 -402
- {opensimula-0.4.0 → opensimula-0.5.0}/LICENSE +0 -0
- {opensimula-0.4.0 → opensimula-0.5.0}/OpenSimula.egg-info/dependency_links.txt +0 -0
- {opensimula-0.4.0 → opensimula-0.5.0}/OpenSimula.egg-info/top_level.txt +0 -0
- {opensimula-0.4.0 → opensimula-0.5.0}/docs/cinder/__init__.py +0 -0
- {opensimula-0.4.0 → opensimula-0.5.0}/mkdocs/cinder/__init__.py +0 -0
- {opensimula-0.4.0 → opensimula-0.5.0}/setup.cfg +0 -0
- {opensimula-0.4.0 → opensimula-0.5.0}/src/OpenSimula/Child.py +0 -0
- {opensimula-0.4.0 → opensimula-0.5.0}/src/OpenSimula/Variable.py +0 -0
- {opensimula-0.4.0 → opensimula-0.5.0}/src/OpenSimula/components/Frame.py +0 -0
- {opensimula-0.4.0 → opensimula-0.5.0}/src/OpenSimula/components/Glazing.py +0 -0
- {opensimula-0.4.0 → opensimula-0.5.0}/src/OpenSimula/components/Material.py +0 -0
- {opensimula-0.4.0 → opensimula-0.5.0}/test/test_Calculator.py +0 -0
- {opensimula-0.4.0 → opensimula-0.5.0}/test/test_Construction.py +0 -0
- {opensimula-0.4.0 → opensimula-0.5.0}/test/test_File_data.py +0 -0
- {opensimula-0.4.0 → opensimula-0.5.0}/test/test_File_met.py +0 -0
- {opensimula-0.4.0 → opensimula-0.5.0}/test/test_Project.py +0 -0
- {opensimula-0.4.0 → opensimula-0.5.0}/test/test_Schedules.py +0 -0
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: OpenSimula
|
|
3
|
+
Version: 0.5.0
|
|
4
|
+
Summary: Component-based time simulation environment in Python
|
|
5
|
+
Author-email: "Juan F. Coronel" <jfc@us.es>
|
|
6
|
+
Classifier: Programming Language :: Python :: 3
|
|
7
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
8
|
+
Classifier: Operating System :: OS Independent
|
|
9
|
+
Requires-Python: >=3.12
|
|
10
|
+
Description-Content-Type: text/markdown
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Requires-Dist: dash>=3.2.0
|
|
13
|
+
Requires-Dist: dash-ag-grid>=32.3.2
|
|
14
|
+
Requires-Dist: dash-bootstrap-components>=2.0.4
|
|
15
|
+
Requires-Dist: nbformat>=5.10.4
|
|
16
|
+
Requires-Dist: numpy>=2.3.3
|
|
17
|
+
Requires-Dist: openpyxl>=3.1.5
|
|
18
|
+
Requires-Dist: pandas>=2.3.2
|
|
19
|
+
Requires-Dist: plotly>=6.3.0
|
|
20
|
+
Requires-Dist: psychrolib>=2.5.0
|
|
21
|
+
Requires-Dist: scipy>=1.16.2
|
|
22
|
+
Requires-Dist: shapely>=2.1.1
|
|
23
|
+
Requires-Dist: tqdm>=4.67.1
|
|
24
|
+
Requires-Dist: triangle>=20250106
|
|
25
|
+
Requires-Dist: vedo>=2025.5.4
|
|
26
|
+
Dynamic: license-file
|
|
27
|
+
|
|
28
|
+

|
|
29
|
+
Component-based time simulation environment in Python
|
|
30
|
+
|
|
31
|
+
[Documentation page](https://jfcoronel.github.io/OpenSimula/)
|
|
32
|
+
|
|
33
|
+
## Main Developers
|
|
34
|
+
|
|
35
|
+
* [Juan F. Coronel](http://jfc.us.es), Universidad de Sevilla
|
|
36
|
+
|
|
37
|
+
## Package dependencies
|
|
38
|
+
- numpy
|
|
39
|
+
- pandas
|
|
40
|
+
- scipy
|
|
41
|
+
- shapely
|
|
42
|
+
- psychrolib
|
|
43
|
+
- plotly
|
|
44
|
+
- dash
|
|
45
|
+
- dash_bootstrap_components
|
|
46
|
+
- dash_ag_grid
|
|
47
|
+
- pyvista
|
|
48
|
+
- trame
|
|
49
|
+
- trame-vtk
|
|
50
|
+
- trame-vuetify
|
|
51
|
+
- ipywidgets
|
|
52
|
+
|
|
@@ -11,6 +11,7 @@ mkdocs/cinder/__init__.py
|
|
|
11
11
|
src/OpenSimula/Child.py
|
|
12
12
|
src/OpenSimula/Component.py
|
|
13
13
|
src/OpenSimula/Iterative_process.py
|
|
14
|
+
src/OpenSimula/Message.py
|
|
14
15
|
src/OpenSimula/Parameter_container.py
|
|
15
16
|
src/OpenSimula/Parameters.py
|
|
16
17
|
src/OpenSimula/Project.py
|
|
@@ -18,33 +19,34 @@ src/OpenSimula/Simulation.py
|
|
|
18
19
|
src/OpenSimula/Variable.py
|
|
19
20
|
src/OpenSimula/__init__.py
|
|
20
21
|
src/OpenSimula/components/Building.py
|
|
22
|
+
src/OpenSimula/components/Building_surface.py
|
|
21
23
|
src/OpenSimula/components/Calculator.py
|
|
22
24
|
src/OpenSimula/components/Construction.py
|
|
23
25
|
src/OpenSimula/components/Day_schedule.py
|
|
24
|
-
src/OpenSimula/components/Exterior_surface.py
|
|
25
26
|
src/OpenSimula/components/File_data.py
|
|
26
27
|
src/OpenSimula/components/File_met.py
|
|
27
28
|
src/OpenSimula/components/Frame.py
|
|
28
29
|
src/OpenSimula/components/Glazing.py
|
|
29
30
|
src/OpenSimula/components/HVAC_DX_equipment.py
|
|
30
31
|
src/OpenSimula/components/HVAC_DX_system.py
|
|
32
|
+
src/OpenSimula/components/HVAC_MZW_system.py
|
|
33
|
+
src/OpenSimula/components/HVAC_SZW_system.py
|
|
34
|
+
src/OpenSimula/components/HVAC_coil_equipment.py
|
|
35
|
+
src/OpenSimula/components/HVAC_fan_equipment.py
|
|
31
36
|
src/OpenSimula/components/HVAC_perfect_system.py
|
|
32
|
-
src/OpenSimula/components/Interior_surface.py
|
|
33
37
|
src/OpenSimula/components/Material.py
|
|
34
38
|
src/OpenSimula/components/Opening.py
|
|
35
39
|
src/OpenSimula/components/Opening_type.py
|
|
36
|
-
src/OpenSimula/components/
|
|
37
|
-
src/OpenSimula/components/Shadow_surface.py
|
|
40
|
+
src/OpenSimula/components/Solar_surface.py
|
|
38
41
|
src/OpenSimula/components/Space.py
|
|
39
42
|
src/OpenSimula/components/Space_type.py
|
|
40
43
|
src/OpenSimula/components/Surface.py
|
|
41
44
|
src/OpenSimula/components/Test_component.py
|
|
42
|
-
src/OpenSimula/components/Underground_surface.py
|
|
43
|
-
src/OpenSimula/components/Virtual_surface.py
|
|
44
45
|
src/OpenSimula/components/Week_schedule.py
|
|
45
46
|
src/OpenSimula/components/Year_schedule.py
|
|
46
47
|
src/OpenSimula/components/__init__.py
|
|
47
|
-
src/OpenSimula/
|
|
48
|
+
src/OpenSimula/visual_3D/Environment_3D.py
|
|
49
|
+
src/OpenSimula/visual_3D/Polygon_3D.py
|
|
48
50
|
test/test_Calculator.py
|
|
49
51
|
test/test_Case_600FF.py
|
|
50
52
|
test/test_Case_610.py
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
dash>=3.2.0
|
|
2
|
+
dash-ag-grid>=32.3.2
|
|
3
|
+
dash-bootstrap-components>=2.0.4
|
|
4
|
+
nbformat>=5.10.4
|
|
5
|
+
numpy>=2.3.3
|
|
6
|
+
openpyxl>=3.1.5
|
|
7
|
+
pandas>=2.3.2
|
|
8
|
+
plotly>=6.3.0
|
|
9
|
+
psychrolib>=2.5.0
|
|
10
|
+
scipy>=1.16.2
|
|
11
|
+
shapely>=2.1.1
|
|
12
|
+
tqdm>=4.67.1
|
|
13
|
+
triangle>=20250106
|
|
14
|
+
vedo>=2025.5.4
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: OpenSimula
|
|
3
|
+
Version: 0.5.0
|
|
4
|
+
Summary: Component-based time simulation environment in Python
|
|
5
|
+
Author-email: "Juan F. Coronel" <jfc@us.es>
|
|
6
|
+
Classifier: Programming Language :: Python :: 3
|
|
7
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
8
|
+
Classifier: Operating System :: OS Independent
|
|
9
|
+
Requires-Python: >=3.12
|
|
10
|
+
Description-Content-Type: text/markdown
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Requires-Dist: dash>=3.2.0
|
|
13
|
+
Requires-Dist: dash-ag-grid>=32.3.2
|
|
14
|
+
Requires-Dist: dash-bootstrap-components>=2.0.4
|
|
15
|
+
Requires-Dist: nbformat>=5.10.4
|
|
16
|
+
Requires-Dist: numpy>=2.3.3
|
|
17
|
+
Requires-Dist: openpyxl>=3.1.5
|
|
18
|
+
Requires-Dist: pandas>=2.3.2
|
|
19
|
+
Requires-Dist: plotly>=6.3.0
|
|
20
|
+
Requires-Dist: psychrolib>=2.5.0
|
|
21
|
+
Requires-Dist: scipy>=1.16.2
|
|
22
|
+
Requires-Dist: shapely>=2.1.1
|
|
23
|
+
Requires-Dist: tqdm>=4.67.1
|
|
24
|
+
Requires-Dist: triangle>=20250106
|
|
25
|
+
Requires-Dist: vedo>=2025.5.4
|
|
26
|
+
Dynamic: license-file
|
|
27
|
+
|
|
28
|
+

|
|
29
|
+
Component-based time simulation environment in Python
|
|
30
|
+
|
|
31
|
+
[Documentation page](https://jfcoronel.github.io/OpenSimula/)
|
|
32
|
+
|
|
33
|
+
## Main Developers
|
|
34
|
+
|
|
35
|
+
* [Juan F. Coronel](http://jfc.us.es), Universidad de Sevilla
|
|
36
|
+
|
|
37
|
+
## Package dependencies
|
|
38
|
+
- numpy
|
|
39
|
+
- pandas
|
|
40
|
+
- scipy
|
|
41
|
+
- shapely
|
|
42
|
+
- psychrolib
|
|
43
|
+
- plotly
|
|
44
|
+
- dash
|
|
45
|
+
- dash_bootstrap_components
|
|
46
|
+
- dash_ag_grid
|
|
47
|
+
- pyvista
|
|
48
|
+
- trame
|
|
49
|
+
- trame-vtk
|
|
50
|
+
- trame-vuetify
|
|
51
|
+
- ipywidgets
|
|
52
|
+
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-

|
|
2
2
|
Component-based time simulation environment in Python
|
|
3
3
|
|
|
4
|
-
[Documentation page](https://
|
|
4
|
+
[Documentation page](https://jfcoronel.github.io/OpenSimula/)
|
|
5
5
|
|
|
6
6
|
## Main Developers
|
|
7
7
|
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
# Minimum requirements for the build system to execute.
|
|
3
|
+
requires = ["setuptools>=61.2", "wheel"]
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "OpenSimula"
|
|
7
|
+
version = "0.5.0"
|
|
8
|
+
requires-python = ">=3.12"
|
|
9
|
+
authors = [
|
|
10
|
+
{ name="Juan F. Coronel", email="jfc@us.es" },
|
|
11
|
+
]
|
|
12
|
+
description = "Component-based time simulation environment in Python"
|
|
13
|
+
readme = "README.md"
|
|
14
|
+
classifiers = [
|
|
15
|
+
"Programming Language :: Python :: 3",
|
|
16
|
+
"License :: OSI Approved :: MIT License",
|
|
17
|
+
"Operating System :: OS Independent",
|
|
18
|
+
]
|
|
19
|
+
dependencies = [
|
|
20
|
+
"dash>=3.2.0",
|
|
21
|
+
"dash-ag-grid>=32.3.2",
|
|
22
|
+
"dash-bootstrap-components>=2.0.4",
|
|
23
|
+
"nbformat>=5.10.4",
|
|
24
|
+
"numpy>=2.3.3",
|
|
25
|
+
"openpyxl>=3.1.5",
|
|
26
|
+
"pandas>=2.3.2",
|
|
27
|
+
"plotly>=6.3.0",
|
|
28
|
+
"psychrolib>=2.5.0",
|
|
29
|
+
"scipy>=1.16.2",
|
|
30
|
+
"shapely>=2.1.1",
|
|
31
|
+
"tqdm>=4.67.1",
|
|
32
|
+
"triangle>=20250106",
|
|
33
|
+
"vedo>=2025.5.4",
|
|
34
|
+
]
|
|
35
|
+
|
|
36
|
+
[dependency-groups]
|
|
37
|
+
dev = [
|
|
38
|
+
"ipykernel>=6.30.1",
|
|
39
|
+
"mkdocs>=1.6.1",
|
|
40
|
+
"pytest>=8.4.2",
|
|
41
|
+
]
|
|
42
|
+
|
|
43
|
+
[tool.setuptools]
|
|
44
|
+
packages.find.include = ['src*','mkdocs*','docs*']
|
|
45
|
+
packages.find.exclude = ['test*','ipynb*','ASHRAE_140*','mets*','venv*']
|
|
46
|
+
include-package-data = false
|
|
@@ -18,9 +18,6 @@ class Component(Parameter_container):
|
|
|
18
18
|
def project(self):
|
|
19
19
|
return self._project_
|
|
20
20
|
|
|
21
|
-
def print(self, msg):
|
|
22
|
-
self._sim_.print(msg)
|
|
23
|
-
|
|
24
21
|
def add_variable(self, variable):
|
|
25
22
|
"""add new Variable"""
|
|
26
23
|
variable.parent = self
|
|
@@ -64,7 +61,7 @@ class Component(Parameter_container):
|
|
|
64
61
|
for col in pos_neg_columns:
|
|
65
62
|
data[col + "_pos"] = data[col].apply(lambda x: x if x > 0 else 0)
|
|
66
63
|
data[col + "_neg"] = data[col].apply(lambda x: x if x < 0 else 0)
|
|
67
|
-
if frequency
|
|
64
|
+
if frequency is not None:
|
|
68
65
|
if value == "mean":
|
|
69
66
|
data = data.resample(frequency, on='date').mean()
|
|
70
67
|
elif value == "sum":
|
|
@@ -73,7 +70,7 @@ class Component(Parameter_container):
|
|
|
73
70
|
data = data.resample(frequency, on='date').max()
|
|
74
71
|
elif value == "min":
|
|
75
72
|
data = data.resample(frequency, on='date').min()
|
|
76
|
-
if interval
|
|
73
|
+
if interval is not None:
|
|
77
74
|
data = data[(data['date'] > interval[0]) &
|
|
78
75
|
(data['date'] < interval[1])]
|
|
79
76
|
return data
|
|
@@ -142,7 +139,26 @@ class Component(Parameter_container):
|
|
|
142
139
|
|
|
143
140
|
return errors
|
|
144
141
|
|
|
142
|
+
def get_parameter_variable_dictionary(self,time_index):
|
|
143
|
+
# variables dictonary
|
|
144
|
+
var_dic = {}
|
|
145
|
+
for i in range(len(self._var_from_parameter_symbol)):
|
|
146
|
+
var_dic[self._var_from_parameter_symbol[i]] = self._var_from_parameter_variable[i].values[time_index]
|
|
147
|
+
return var_dic
|
|
148
|
+
|
|
145
149
|
def pre_simulation(self, n_time_steps, delta_t):
|
|
150
|
+
# Create variables from paramater "Parameter_variable" and "Parameter_variable_list"
|
|
151
|
+
self._var_from_parameter_symbol = []
|
|
152
|
+
self._var_from_parameter_variable = []
|
|
153
|
+
for param in self.parameter_dict().values():
|
|
154
|
+
if param.type == "Parameter_variable":
|
|
155
|
+
self._var_from_parameter_symbol.append(param.symbol)
|
|
156
|
+
self._var_from_parameter_variable.append(param.variable)
|
|
157
|
+
elif param.type == "Parameter_variable_list":
|
|
158
|
+
for i in range(len(param.variable)):
|
|
159
|
+
self._var_from_parameter_symbol.append(param.symbol[i])
|
|
160
|
+
self._var_from_parameter_variable.append(param.variable[i])
|
|
161
|
+
|
|
146
162
|
# Initilise all variables to 0
|
|
147
163
|
for key, var in self._variables_.items():
|
|
148
164
|
var.initialise(n_time_steps)
|
|
@@ -29,7 +29,7 @@ class Iterative_process:
|
|
|
29
29
|
else:
|
|
30
30
|
return False
|
|
31
31
|
|
|
32
|
-
def
|
|
32
|
+
def estimate_next_x(self, proposed_x):
|
|
33
33
|
x_next = (1 - self.lambda_i) * self.x[-1] + self.lambda_i * proposed_x
|
|
34
34
|
|
|
35
35
|
# Ajuste dinámico de lambda (reduce si hay oscilaciones)
|
|
@@ -41,3 +41,7 @@ class Iterative_process:
|
|
|
41
41
|
|
|
42
42
|
self.x.append(x_next)
|
|
43
43
|
return x_next
|
|
44
|
+
|
|
45
|
+
def set_next_x(self, next_x):
|
|
46
|
+
self.x.append(next_x)
|
|
47
|
+
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
class Message:
|
|
2
|
+
def __init__(self, text, level="ERROR"):
|
|
3
|
+
self._text_ = text
|
|
4
|
+
self._level_ = level # ERROR, WARNING, INFO, CONSOLE
|
|
5
|
+
|
|
6
|
+
@property
|
|
7
|
+
def text(self):
|
|
8
|
+
return self._text_
|
|
9
|
+
|
|
10
|
+
@property
|
|
11
|
+
def level(self):
|
|
12
|
+
return self._level_
|
|
13
|
+
|
|
14
|
+
def print(self):
|
|
15
|
+
if self.level == "CONSOLE":
|
|
16
|
+
print(self.text)
|
|
17
|
+
else:
|
|
18
|
+
print(self.level + ": " + self.text)
|
|
19
|
+
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import pandas as pd
|
|
2
2
|
from OpenSimula.Parameters import Parameter_string
|
|
3
|
-
|
|
3
|
+
from OpenSimula.Message import Message
|
|
4
4
|
|
|
5
5
|
class Parameter_container:
|
|
6
6
|
"""Class to manage a list of Paramaters
|
|
@@ -41,9 +41,7 @@ class Parameter_container:
|
|
|
41
41
|
if key in self._parameters_:
|
|
42
42
|
self.parameter(key).value = value
|
|
43
43
|
else:
|
|
44
|
-
self._sim_.
|
|
45
|
-
"Error: Component parameter " + key + " does not exist"
|
|
46
|
-
)
|
|
44
|
+
self._sim_.message(Message("Component parameter " + key + " does not exist","ERROR"))
|
|
47
45
|
|
|
48
46
|
def parameter_dataframe(self, string_format=False):
|
|
49
47
|
keys = []
|