OpenSimula 0.8.6__tar.gz → 0.8.7__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.
Files changed (78) hide show
  1. opensimula-0.8.7/PKG-INFO +171 -0
  2. opensimula-0.8.7/README.md +149 -0
  3. {opensimula-0.8.6 → opensimula-0.8.7}/pyproject.toml +2 -2
  4. {opensimula-0.8.6 → opensimula-0.8.7}/src/opensimula/Project.py +13 -6
  5. opensimula-0.8.7/src/opensimula/editor/static/editor.js +8271 -0
  6. {opensimula-0.8.6 → opensimula-0.8.7}/src/opensimula/visual_3D/Environment_3D.py +84 -171
  7. {opensimula-0.8.6 → opensimula-0.8.7}/src/opensimula/visual_3D/Polygon_3D.py +0 -8
  8. opensimula-0.8.7/src/opensimula.egg-info/PKG-INFO +171 -0
  9. {opensimula-0.8.6 → opensimula-0.8.7}/src/opensimula.egg-info/requires.txt +1 -1
  10. {opensimula-0.8.6 → opensimula-0.8.7}/test/test_editor_widget.py +26 -6
  11. opensimula-0.8.6/PKG-INFO +0 -45
  12. opensimula-0.8.6/README.md +0 -23
  13. opensimula-0.8.6/src/opensimula/editor/static/editor.js +0 -1047
  14. opensimula-0.8.6/src/opensimula.egg-info/PKG-INFO +0 -45
  15. {opensimula-0.8.6 → opensimula-0.8.7}/LICENSE +0 -0
  16. {opensimula-0.8.6 → opensimula-0.8.7}/setup.cfg +0 -0
  17. {opensimula-0.8.6 → opensimula-0.8.7}/src/opensimula/Child.py +0 -0
  18. {opensimula-0.8.6 → opensimula-0.8.7}/src/opensimula/Component.py +0 -0
  19. {opensimula-0.8.6 → opensimula-0.8.7}/src/opensimula/Iterative_process.py +0 -0
  20. {opensimula-0.8.6 → opensimula-0.8.7}/src/opensimula/Message.py +0 -0
  21. {opensimula-0.8.6 → opensimula-0.8.7}/src/opensimula/Parameter_container.py +0 -0
  22. {opensimula-0.8.6 → opensimula-0.8.7}/src/opensimula/Parameters.py +0 -0
  23. {opensimula-0.8.6 → opensimula-0.8.7}/src/opensimula/Simulation.py +0 -0
  24. {opensimula-0.8.6 → opensimula-0.8.7}/src/opensimula/Variable.py +0 -0
  25. {opensimula-0.8.6 → opensimula-0.8.7}/src/opensimula/__init__.py +0 -0
  26. {opensimula-0.8.6 → opensimula-0.8.7}/src/opensimula/components/Building.py +0 -0
  27. {opensimula-0.8.6 → opensimula-0.8.7}/src/opensimula/components/Building_surface.py +0 -0
  28. {opensimula-0.8.6 → opensimula-0.8.7}/src/opensimula/components/Calculator.py +0 -0
  29. {opensimula-0.8.6 → opensimula-0.8.7}/src/opensimula/components/Chiller_heat_pump.py +0 -0
  30. {opensimula-0.8.6 → opensimula-0.8.7}/src/opensimula/components/Construction.py +0 -0
  31. {opensimula-0.8.6 → opensimula-0.8.7}/src/opensimula/components/DX_unit.py +0 -0
  32. {opensimula-0.8.6 → opensimula-0.8.7}/src/opensimula/components/Day_schedule.py +0 -0
  33. {opensimula-0.8.6 → opensimula-0.8.7}/src/opensimula/components/Fan.py +0 -0
  34. {opensimula-0.8.6 → opensimula-0.8.7}/src/opensimula/components/File_data.py +0 -0
  35. {opensimula-0.8.6 → opensimula-0.8.7}/src/opensimula/components/File_met.py +0 -0
  36. {opensimula-0.8.6 → opensimula-0.8.7}/src/opensimula/components/Frame.py +0 -0
  37. {opensimula-0.8.6 → opensimula-0.8.7}/src/opensimula/components/Glazing.py +0 -0
  38. {opensimula-0.8.6 → opensimula-0.8.7}/src/opensimula/components/HVAC_DX_system.py +0 -0
  39. {opensimula-0.8.6 → opensimula-0.8.7}/src/opensimula/components/HVAC_MZW_system.py +0 -0
  40. {opensimula-0.8.6 → opensimula-0.8.7}/src/opensimula/components/HVAC_SZW_system.py +0 -0
  41. {opensimula-0.8.6 → opensimula-0.8.7}/src/opensimula/components/HVAC_perfect_system.py +0 -0
  42. {opensimula-0.8.6 → opensimula-0.8.7}/src/opensimula/components/HVAC_water_system.py +0 -0
  43. {opensimula-0.8.6 → opensimula-0.8.7}/src/opensimula/components/Material.py +0 -0
  44. {opensimula-0.8.6 → opensimula-0.8.7}/src/opensimula/components/Opening.py +0 -0
  45. {opensimula-0.8.6 → opensimula-0.8.7}/src/opensimula/components/Opening_type.py +0 -0
  46. {opensimula-0.8.6 → opensimula-0.8.7}/src/opensimula/components/Pump.py +0 -0
  47. {opensimula-0.8.6 → opensimula-0.8.7}/src/opensimula/components/Solar_surface.py +0 -0
  48. {opensimula-0.8.6 → opensimula-0.8.7}/src/opensimula/components/Space.py +0 -0
  49. {opensimula-0.8.6 → opensimula-0.8.7}/src/opensimula/components/Space_type.py +0 -0
  50. {opensimula-0.8.6 → opensimula-0.8.7}/src/opensimula/components/Surface.py +0 -0
  51. {opensimula-0.8.6 → opensimula-0.8.7}/src/opensimula/components/Test_component.py +0 -0
  52. {opensimula-0.8.6 → opensimula-0.8.7}/src/opensimula/components/Water_coil.py +0 -0
  53. {opensimula-0.8.6 → opensimula-0.8.7}/src/opensimula/components/Week_schedule.py +0 -0
  54. {opensimula-0.8.6 → opensimula-0.8.7}/src/opensimula/components/Year_schedule.py +0 -0
  55. {opensimula-0.8.6 → opensimula-0.8.7}/src/opensimula/components/__init__.py +0 -0
  56. {opensimula-0.8.6 → opensimula-0.8.7}/src/opensimula/editor/__init__.py +0 -0
  57. {opensimula-0.8.6 → opensimula-0.8.7}/src/opensimula/editor/schema.py +0 -0
  58. {opensimula-0.8.6 → opensimula-0.8.7}/src/opensimula/editor/static/editor.css +0 -0
  59. {opensimula-0.8.6 → opensimula-0.8.7}/src/opensimula/editor/validation.py +0 -0
  60. {opensimula-0.8.6 → opensimula-0.8.7}/src/opensimula/editor/widget.py +0 -0
  61. {opensimula-0.8.6 → opensimula-0.8.7}/src/opensimula.egg-info/SOURCES.txt +0 -0
  62. {opensimula-0.8.6 → opensimula-0.8.7}/src/opensimula.egg-info/dependency_links.txt +0 -0
  63. {opensimula-0.8.6 → opensimula-0.8.7}/src/opensimula.egg-info/top_level.txt +0 -0
  64. {opensimula-0.8.6 → opensimula-0.8.7}/test/test_Calculator.py +0 -0
  65. {opensimula-0.8.6 → opensimula-0.8.7}/test/test_Case_600FF.py +0 -0
  66. {opensimula-0.8.6 → opensimula-0.8.7}/test/test_Case_610.py +0 -0
  67. {opensimula-0.8.6 → opensimula-0.8.7}/test/test_Construction.py +0 -0
  68. {opensimula-0.8.6 → opensimula-0.8.7}/test/test_File_data.py +0 -0
  69. {opensimula-0.8.6 → opensimula-0.8.7}/test/test_File_met.py +0 -0
  70. {opensimula-0.8.6 → opensimula-0.8.7}/test/test_HVAC_DX_Equipment.py +0 -0
  71. {opensimula-0.8.6 → opensimula-0.8.7}/test/test_HVAC_DX_system.py +0 -0
  72. {opensimula-0.8.6 → opensimula-0.8.7}/test/test_HVAC_FAN_COIL_water_system.py +0 -0
  73. {opensimula-0.8.6 → opensimula-0.8.7}/test/test_HVAC_water_system_process.py +0 -0
  74. {opensimula-0.8.6 → opensimula-0.8.7}/test/test_Iterative_process.py +0 -0
  75. {opensimula-0.8.6 → opensimula-0.8.7}/test/test_Project.py +0 -0
  76. {opensimula-0.8.6 → opensimula-0.8.7}/test/test_Schedules.py +0 -0
  77. {opensimula-0.8.6 → opensimula-0.8.7}/test/test_editor_schema.py +0 -0
  78. {opensimula-0.8.6 → opensimula-0.8.7}/test/test_underground_repeated_simulation.py +0 -0
@@ -0,0 +1,171 @@
1
+ Metadata-Version: 2.4
2
+ Name: opensimula
3
+ Version: 0.8.7
4
+ Summary: Component-based time simulation environment in Python
5
+ Author-email: "Juan F. Coronel" <jfc@us.es>
6
+ Requires-Python: >=3.12
7
+ Description-Content-Type: text/markdown
8
+ License-File: LICENSE
9
+ Requires-Dist: anywidget>=0.11.0
10
+ Requires-Dist: jsonschema>=4.26.0
11
+ Requires-Dist: matplotlib>=3.10.0
12
+ Requires-Dist: nbformat>=5.10.4
13
+ Requires-Dist: numpy>=2.3.3
14
+ Requires-Dist: openpyxl>=3.1.5
15
+ Requires-Dist: pandas>=2.3.2
16
+ Requires-Dist: plotly>=6.3.0
17
+ Requires-Dist: psychrolib>=2.5.0
18
+ Requires-Dist: scipy>=1.16.2
19
+ Requires-Dist: shapely>=2.1.1
20
+ Requires-Dist: tqdm>=4.67.1
21
+ Dynamic: license-file
22
+
23
+ ![Logo](https://jfcoronel.github.io/OpenSimula/img/logo_opensimula.png)
24
+
25
+ # OpenSimula
26
+
27
+ [![PyPI version](https://img.shields.io/pypi/v/opensimula)](https://pypi.org/project/opensimula/)
28
+ [![Python versions](https://img.shields.io/pypi/pyversions/opensimula)](https://pypi.org/project/opensimula/)
29
+ [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
30
+
31
+ **OpenSimula** is a component-based time simulation environment in Python, focused on the
32
+ thermal and energy simulation of buildings and their HVAC installations — though it can be
33
+ used to simulate any system whose state evolves over time. It implements the [ASHRAE
34
+ 140](https://www.ashrae.org/technical-resources/bookstore/method-of-test-for-the-evaluation-of-building-energy-analysis-computer-programs)
35
+ standard test suite to validate its building load and HVAC calculations.
36
+
37
+ [**Documentation**](https://jfcoronel.github.io/OpenSimula/) · [Getting started](https://jfcoronel.github.io/OpenSimula/getting_started/) · [User guide](https://jfcoronel.github.io/OpenSimula/user_guide/) · [Component list](https://jfcoronel.github.io/OpenSimula/component_list/)
38
+
39
+ ## What it does
40
+
41
+ A project is built from **components** — spaces, walls, windows, constructions, schedules,
42
+ HVAC equipment, weather files — wired together and simulated hour by hour (or at any other
43
+ time step). OpenSimula takes care of:
44
+
45
+ - **Building thermal simulation**: multi-space heat balance, constructions with thermal mass,
46
+ windows and solar gains, ground-coupled surfaces, internal gains and schedules.
47
+ - **HVAC systems**: from an ideal loads system (`HVAC_perfect_system`) to direct-expansion and
48
+ water-based single- and multi-zone systems, coils, fans, pumps, chillers and heat pumps.
49
+ - **Solar geometry and shadows**: direct and diffuse shadow calculations between the surfaces
50
+ of a project, with an interactive 3D [Plotly](https://plotly.com/python/) view — including
51
+ an animated view of shadows changing throughout the day.
52
+ - **Everything else a simulation needs**: psychrometrics (via
53
+ [PsychroLib](https://github.com/psychrometrics/psychrolib)), day/week/year schedules,
54
+ arbitrary math expressions as inputs, and reading weather data (TMY3, MET) or generic data
55
+ files (CSV, Excel).
56
+ - **Validation against ASHRAE 140**: the `ASHRAE_140/` folder in this repository reproduces
57
+ the standard's load, heating, cooling, air-side HVAC and weather test cases as runnable
58
+ notebooks, comparing OpenSimula's results against the reference values.
59
+
60
+ Projects can be defined as plain Python dictionaries, JSON or Excel files, and results come
61
+ back as component `Variable` time series or pandas `DataFrame`s, ready to plot or export.
62
+
63
+ ## Installation
64
+
65
+ ```bash
66
+ pip install opensimula
67
+ ```
68
+
69
+ Requires Python 3.12 or later.
70
+
71
+ ## Quick example
72
+
73
+ ```python
74
+ import opensimula as osm
75
+
76
+ project_dict = {
77
+ "name": "First example",
78
+ "time_step": 3600,
79
+ "n_time_steps": 24 * 7,
80
+ "initial_time": "01/01/2001 00:00:00",
81
+ "components": [
82
+ {
83
+ "type": "Day_schedule",
84
+ "name": "working_day",
85
+ "time_steps": [8 * 3600, 5 * 3600, 2 * 3600, 4 * 3600],
86
+ "values": [0, 100, 0, 80, 0],
87
+ "interpolation": "STEP",
88
+ },
89
+ {
90
+ "type": "Day_schedule",
91
+ "name": "holiday_day",
92
+ "time_steps": [],
93
+ "values": [0],
94
+ "interpolation": "STEP",
95
+ },
96
+ {
97
+ "type": "Week_schedule",
98
+ "name": "office_week",
99
+ "days_schedules": ["working_day"] * 5 + ["holiday_day"] * 2,
100
+ },
101
+ ],
102
+ }
103
+
104
+ sim = osm.Simulation()
105
+ pro = sim.new_project("First example")
106
+ pro.read_dict(project_dict)
107
+ pro.simulate()
108
+
109
+ sim.plot(pro.dates(), [pro.component("office_week").variable("values")])
110
+ ```
111
+
112
+ This is deliberately minimal — the [Getting started](https://jfcoronel.github.io/OpenSimula/getting_started/)
113
+ guide walks through a full building, and the `jupyter_test/` and `ASHRAE_140/` folders in
114
+ this repository contain complete, runnable building and HVAC examples.
115
+
116
+ ## Working in Jupyter
117
+
118
+ OpenSimula ships an interactive project editor as a [Jupyter
119
+ widget](https://jfcoronel.github.io/OpenSimula/user_guide/#project-editor) (`pro.editor()`),
120
+ built on [anywidget](https://anywidget.dev/) so it works the same in Jupyter, JupyterLab, VS
121
+ Code notebooks and Marimo. It shows every component's parameters as a form generated from
122
+ each component's own schema, together with an interactive 3D view of the building.
123
+
124
+ ![Project editor example](https://jfcoronel.github.io/OpenSimula/img/editor_3d.png)
125
+
126
+ ## Component types
127
+
128
+ Components are grouped by what they define:
129
+
130
+ - **Building**: `Building`, `Space_type`, `Space`, `Building_surface`, `Opening`, `Solar_surface`.
131
+ - **Constructions**: `Material`, `Construction`, `Glazing`, `Frame`, `Opening_type`.
132
+ - **HVAC (air side)**: `HVAC_perfect_system`, `DX_unit`, `HVAC_DX_system`, `Water_coil`, `Fan`, `HVAC_SZW_system`, `HVAC_MZW_system`.
133
+ - **HVAC (water side)**: `Pump`, `Chiller_heat_pump`, `HVAC_water_system`.
134
+ - **Schedules**: `Day_schedule`, `Week_schedule`, `Year_schedule`.
135
+ - **Files**: `File_met`, `File_data`.
136
+ - **Utilities**: `Calculator`.
137
+
138
+ See the [Component list](https://jfcoronel.github.io/OpenSimula/component_list/) for every
139
+ parameter and variable of each one.
140
+
141
+ ## Package dependencies
142
+
143
+ - numpy
144
+ - pandas
145
+ - scipy
146
+ - shapely
147
+ - psychrolib
148
+ - plotly
149
+ - matplotlib
150
+ - anywidget
151
+ - jsonschema
152
+ - nbformat
153
+ - openpyxl
154
+ - tqdm
155
+
156
+ These are installed automatically with `pip install opensimula`.
157
+
158
+ ## Documentation and support
159
+
160
+ Full documentation, including the getting started guide, user guide and component
161
+ reference, is at [jfcoronel.github.io/OpenSimula](https://jfcoronel.github.io/OpenSimula/).
162
+ Bugs and feature requests are tracked on
163
+ [GitHub Issues](https://github.com/jfCoronel/OpenSimula/issues).
164
+
165
+ ## Main Developers
166
+
167
+ * [Juan F. Coronel](http://jfc.us.es), Universidad de Sevilla
168
+
169
+ ## License
170
+
171
+ OpenSimula is released under the [MIT License](LICENSE).
@@ -0,0 +1,149 @@
1
+ ![Logo](https://jfcoronel.github.io/OpenSimula/img/logo_opensimula.png)
2
+
3
+ # OpenSimula
4
+
5
+ [![PyPI version](https://img.shields.io/pypi/v/opensimula)](https://pypi.org/project/opensimula/)
6
+ [![Python versions](https://img.shields.io/pypi/pyversions/opensimula)](https://pypi.org/project/opensimula/)
7
+ [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
8
+
9
+ **OpenSimula** is a component-based time simulation environment in Python, focused on the
10
+ thermal and energy simulation of buildings and their HVAC installations — though it can be
11
+ used to simulate any system whose state evolves over time. It implements the [ASHRAE
12
+ 140](https://www.ashrae.org/technical-resources/bookstore/method-of-test-for-the-evaluation-of-building-energy-analysis-computer-programs)
13
+ standard test suite to validate its building load and HVAC calculations.
14
+
15
+ [**Documentation**](https://jfcoronel.github.io/OpenSimula/) · [Getting started](https://jfcoronel.github.io/OpenSimula/getting_started/) · [User guide](https://jfcoronel.github.io/OpenSimula/user_guide/) · [Component list](https://jfcoronel.github.io/OpenSimula/component_list/)
16
+
17
+ ## What it does
18
+
19
+ A project is built from **components** — spaces, walls, windows, constructions, schedules,
20
+ HVAC equipment, weather files — wired together and simulated hour by hour (or at any other
21
+ time step). OpenSimula takes care of:
22
+
23
+ - **Building thermal simulation**: multi-space heat balance, constructions with thermal mass,
24
+ windows and solar gains, ground-coupled surfaces, internal gains and schedules.
25
+ - **HVAC systems**: from an ideal loads system (`HVAC_perfect_system`) to direct-expansion and
26
+ water-based single- and multi-zone systems, coils, fans, pumps, chillers and heat pumps.
27
+ - **Solar geometry and shadows**: direct and diffuse shadow calculations between the surfaces
28
+ of a project, with an interactive 3D [Plotly](https://plotly.com/python/) view — including
29
+ an animated view of shadows changing throughout the day.
30
+ - **Everything else a simulation needs**: psychrometrics (via
31
+ [PsychroLib](https://github.com/psychrometrics/psychrolib)), day/week/year schedules,
32
+ arbitrary math expressions as inputs, and reading weather data (TMY3, MET) or generic data
33
+ files (CSV, Excel).
34
+ - **Validation against ASHRAE 140**: the `ASHRAE_140/` folder in this repository reproduces
35
+ the standard's load, heating, cooling, air-side HVAC and weather test cases as runnable
36
+ notebooks, comparing OpenSimula's results against the reference values.
37
+
38
+ Projects can be defined as plain Python dictionaries, JSON or Excel files, and results come
39
+ back as component `Variable` time series or pandas `DataFrame`s, ready to plot or export.
40
+
41
+ ## Installation
42
+
43
+ ```bash
44
+ pip install opensimula
45
+ ```
46
+
47
+ Requires Python 3.12 or later.
48
+
49
+ ## Quick example
50
+
51
+ ```python
52
+ import opensimula as osm
53
+
54
+ project_dict = {
55
+ "name": "First example",
56
+ "time_step": 3600,
57
+ "n_time_steps": 24 * 7,
58
+ "initial_time": "01/01/2001 00:00:00",
59
+ "components": [
60
+ {
61
+ "type": "Day_schedule",
62
+ "name": "working_day",
63
+ "time_steps": [8 * 3600, 5 * 3600, 2 * 3600, 4 * 3600],
64
+ "values": [0, 100, 0, 80, 0],
65
+ "interpolation": "STEP",
66
+ },
67
+ {
68
+ "type": "Day_schedule",
69
+ "name": "holiday_day",
70
+ "time_steps": [],
71
+ "values": [0],
72
+ "interpolation": "STEP",
73
+ },
74
+ {
75
+ "type": "Week_schedule",
76
+ "name": "office_week",
77
+ "days_schedules": ["working_day"] * 5 + ["holiday_day"] * 2,
78
+ },
79
+ ],
80
+ }
81
+
82
+ sim = osm.Simulation()
83
+ pro = sim.new_project("First example")
84
+ pro.read_dict(project_dict)
85
+ pro.simulate()
86
+
87
+ sim.plot(pro.dates(), [pro.component("office_week").variable("values")])
88
+ ```
89
+
90
+ This is deliberately minimal — the [Getting started](https://jfcoronel.github.io/OpenSimula/getting_started/)
91
+ guide walks through a full building, and the `jupyter_test/` and `ASHRAE_140/` folders in
92
+ this repository contain complete, runnable building and HVAC examples.
93
+
94
+ ## Working in Jupyter
95
+
96
+ OpenSimula ships an interactive project editor as a [Jupyter
97
+ widget](https://jfcoronel.github.io/OpenSimula/user_guide/#project-editor) (`pro.editor()`),
98
+ built on [anywidget](https://anywidget.dev/) so it works the same in Jupyter, JupyterLab, VS
99
+ Code notebooks and Marimo. It shows every component's parameters as a form generated from
100
+ each component's own schema, together with an interactive 3D view of the building.
101
+
102
+ ![Project editor example](https://jfcoronel.github.io/OpenSimula/img/editor_3d.png)
103
+
104
+ ## Component types
105
+
106
+ Components are grouped by what they define:
107
+
108
+ - **Building**: `Building`, `Space_type`, `Space`, `Building_surface`, `Opening`, `Solar_surface`.
109
+ - **Constructions**: `Material`, `Construction`, `Glazing`, `Frame`, `Opening_type`.
110
+ - **HVAC (air side)**: `HVAC_perfect_system`, `DX_unit`, `HVAC_DX_system`, `Water_coil`, `Fan`, `HVAC_SZW_system`, `HVAC_MZW_system`.
111
+ - **HVAC (water side)**: `Pump`, `Chiller_heat_pump`, `HVAC_water_system`.
112
+ - **Schedules**: `Day_schedule`, `Week_schedule`, `Year_schedule`.
113
+ - **Files**: `File_met`, `File_data`.
114
+ - **Utilities**: `Calculator`.
115
+
116
+ See the [Component list](https://jfcoronel.github.io/OpenSimula/component_list/) for every
117
+ parameter and variable of each one.
118
+
119
+ ## Package dependencies
120
+
121
+ - numpy
122
+ - pandas
123
+ - scipy
124
+ - shapely
125
+ - psychrolib
126
+ - plotly
127
+ - matplotlib
128
+ - anywidget
129
+ - jsonschema
130
+ - nbformat
131
+ - openpyxl
132
+ - tqdm
133
+
134
+ These are installed automatically with `pip install opensimula`.
135
+
136
+ ## Documentation and support
137
+
138
+ Full documentation, including the getting started guide, user guide and component
139
+ reference, is at [jfcoronel.github.io/OpenSimula](https://jfcoronel.github.io/OpenSimula/).
140
+ Bugs and feature requests are tracked on
141
+ [GitHub Issues](https://github.com/jfCoronel/OpenSimula/issues).
142
+
143
+ ## Main Developers
144
+
145
+ * [Juan F. Coronel](http://jfc.us.es), Universidad de Sevilla
146
+
147
+ ## License
148
+
149
+ OpenSimula is released under the [MIT License](LICENSE).
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "opensimula"
3
- version = "0.8.6"
3
+ version = "0.8.7"
4
4
  requires-python = ">=3.12"
5
5
  authors = [
6
6
  { name="Juan F. Coronel", email="jfc@us.es" },
@@ -10,6 +10,7 @@ readme = "README.md"
10
10
  dependencies = [
11
11
  "anywidget>=0.11.0",
12
12
  "jsonschema>=4.26.0",
13
+ "matplotlib>=3.10.0",
13
14
  "nbformat>=5.10.4",
14
15
  "numpy>=2.3.3",
15
16
  "openpyxl>=3.1.5",
@@ -19,7 +20,6 @@ dependencies = [
19
20
  "scipy>=1.16.2",
20
21
  "shapely>=2.1.1",
21
22
  "tqdm>=4.67.1",
22
- "vedo>=2025.5.4",
23
23
  ]
24
24
 
25
25
  [dependency-groups]
@@ -677,23 +677,30 @@ class Project(Parameter_container):
677
677
  self.create_3D_environment(env_3D)
678
678
  return env_3D.geometry_dict()
679
679
 
680
- def show_3D(self, jupyter=False):
680
+ def show_3D(self):
681
681
  env_3D = Environment_3D()
682
682
  self.create_3D_environment(env_3D)
683
- return env_3D.show(polygons_type="initial", jupyter=jupyter)
683
+ env_3D.show(polygons_type="initial")
684
684
 
685
- def show_3D_shadows(self, date, jupyter=False):
685
+ def plotly_figure_3D(self):
686
+ """The Plotly figure of show_3D(), returned instead of shown, so it
687
+ can be composed, saved, or otherwise reused."""
688
+ env_3D = Environment_3D()
689
+ self.create_3D_environment(env_3D)
690
+ return env_3D.plotly_figure(polygons_type="initial")
691
+
692
+ def show_3D_shadows(self, date):
686
693
  env_3D = Environment_3D()
687
694
  self.create_3D_environment(env_3D)
688
695
  file_met = self.parameter("simulation_file_met").component
689
696
  cos = file_met.sun_cosines(date)
690
697
  if len(cos) == 3:
691
698
  env_3D.calculate_shadows(cos)
692
- env_3D.show(polygons_type="Building_shadows", jupyter=jupyter)
699
+ env_3D.show(polygons_type="Building_shadows")
693
700
  else:
694
701
  self._sim_.message(Message(date.strftime("%H:%M, %d/%m/%Y") + " is night", "WARNING"))
695
702
 
696
- def show_3D_shadows_animation(self, date, jupyter=False):
703
+ def show_3D_shadows_animation(self, date):
697
704
  env_3D = Environment_3D()
698
705
  self.create_3D_environment(env_3D)
699
706
  file_met = self.parameter("simulation_file_met").component
@@ -705,6 +712,6 @@ class Project(Parameter_container):
705
712
  if len(cos) == 3: # Day time
706
713
  texts.append(new_date.strftime("%H:%M, %d/%m/%Y"))
707
714
  cosines.append(cos)
708
- env_3D.show_animation(texts, cosines, polygons_type="Building_shadows", jupyter=jupyter)
715
+ env_3D.show_animation(texts, cosines, polygons_type="Building_shadows")
709
716
 
710
717