OpenSimula 0.3.1__tar.gz → 0.4.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.

Files changed (312) hide show
  1. {opensimula-0.3.1 → opensimula-0.4.0}/LICENSE +1 -1
  2. {opensimula-0.3.1 → opensimula-0.4.0/OpenSimula.egg-info}/PKG-INFO +17 -19
  3. opensimula-0.4.0/OpenSimula.egg-info/SOURCES.txt +58 -0
  4. opensimula-0.4.0/OpenSimula.egg-info/dependency_links.txt +1 -0
  5. opensimula-0.4.0/OpenSimula.egg-info/requires.txt +21 -0
  6. opensimula-0.4.0/OpenSimula.egg-info/top_level.txt +3 -0
  7. opensimula-0.4.0/PKG-INFO +59 -0
  8. {opensimula-0.3.1 → opensimula-0.4.0}/README.md +0 -1
  9. {opensimula-0.3.1 → opensimula-0.4.0}/pyproject.toml +7 -4
  10. opensimula-0.4.0/setup.cfg +4 -0
  11. {opensimula-0.3.1 → opensimula-0.4.0}/src/OpenSimula/Component.py +2 -2
  12. opensimula-0.4.0/src/OpenSimula/Iterative_process.py +43 -0
  13. {opensimula-0.3.1 → opensimula-0.4.0}/src/OpenSimula/Parameters.py +32 -21
  14. {opensimula-0.3.1 → opensimula-0.4.0}/src/OpenSimula/Project.py +19 -14
  15. {opensimula-0.3.1 → opensimula-0.4.0}/src/OpenSimula/__init__.py +2 -1
  16. {opensimula-0.3.1 → opensimula-0.4.0}/src/OpenSimula/components/Building.py +3 -10
  17. {opensimula-0.3.1 → opensimula-0.4.0}/src/OpenSimula/components/Exterior_surface.py +0 -20
  18. {opensimula-0.3.1 → opensimula-0.4.0}/src/OpenSimula/components/File_met.py +9 -4
  19. {opensimula-0.3.1 → opensimula-0.4.0}/src/OpenSimula/components/Glazing.py +2 -2
  20. {opensimula-0.3.1 → opensimula-0.4.0}/src/OpenSimula/components/HVAC_DX_equipment.py +76 -15
  21. opensimula-0.4.0/src/OpenSimula/components/HVAC_DX_system.py +392 -0
  22. {opensimula-0.3.1 → opensimula-0.4.0}/src/OpenSimula/components/HVAC_perfect_system.py +11 -6
  23. {opensimula-0.3.1 → opensimula-0.4.0}/src/OpenSimula/components/Opening.py +0 -21
  24. {opensimula-0.3.1 → opensimula-0.4.0}/src/OpenSimula/components/Space.py +42 -33
  25. {opensimula-0.3.1 → opensimula-0.4.0}/test/test_Calculator.py +2 -2
  26. {opensimula-0.3.1 → opensimula-0.4.0}/test/test_Case_600FF.py +4 -4
  27. {opensimula-0.3.1 → opensimula-0.4.0}/test/test_Case_610.py +4 -4
  28. {opensimula-0.3.1 → opensimula-0.4.0}/test/test_File_met.py +3 -3
  29. {opensimula-0.3.1 → opensimula-0.4.0}/test/test_HVAC_DX_Equipment.py +8 -8
  30. opensimula-0.3.1/debug.py → opensimula-0.4.0/test/test_HVAC_DX_system.py +58 -26
  31. opensimula-0.4.0/test/test_Iterative_process.py +13 -0
  32. opensimula-0.3.1/.gitignore +0 -128
  33. opensimula-0.3.1/Python_Libraries.txt +0 -32
  34. opensimula-0.3.1/docs/cinder/404.html +0 -13
  35. opensimula-0.3.1/docs/cinder/base.html +0 -139
  36. opensimula-0.3.1/docs/cinder/content.html +0 -9
  37. opensimula-0.3.1/docs/cinder/css/base.css +0 -289
  38. opensimula-0.3.1/docs/cinder/css/base.min.css +0 -1
  39. opensimula-0.3.1/docs/cinder/css/bootstrap-custom.css +0 -5309
  40. opensimula-0.3.1/docs/cinder/css/bootstrap-custom.min.css +0 -1
  41. opensimula-0.3.1/docs/cinder/css/cinder.css +0 -88
  42. opensimula-0.3.1/docs/cinder/css/cinder.min.css +0 -1
  43. opensimula-0.3.1/docs/cinder/css/highlight.css +0 -99
  44. opensimula-0.3.1/docs/cinder/css/highlight.min.css +0 -1
  45. opensimula-0.3.1/docs/cinder/fonts/fontawesome-webfont.eot +0 -0
  46. opensimula-0.3.1/docs/cinder/fonts/fontawesome-webfont.svg +0 -414
  47. opensimula-0.3.1/docs/cinder/fonts/fontawesome-webfont.ttf +0 -0
  48. opensimula-0.3.1/docs/cinder/fonts/fontawesome-webfont.woff +0 -0
  49. opensimula-0.3.1/docs/cinder/img/favicon.ico +0 -0
  50. opensimula-0.3.1/docs/cinder/img/grid1.png +0 -0
  51. opensimula-0.3.1/docs/cinder/img/grid10.png +0 -0
  52. opensimula-0.3.1/docs/cinder/img/grid11.png +0 -0
  53. opensimula-0.3.1/docs/cinder/img/grid12.png +0 -0
  54. opensimula-0.3.1/docs/cinder/img/grid13.png +0 -0
  55. opensimula-0.3.1/docs/cinder/img/grid14.png +0 -0
  56. opensimula-0.3.1/docs/cinder/img/grid15.png +0 -0
  57. opensimula-0.3.1/docs/cinder/img/grid16.png +0 -0
  58. opensimula-0.3.1/docs/cinder/img/grid17.png +0 -0
  59. opensimula-0.3.1/docs/cinder/img/grid18.png +0 -0
  60. opensimula-0.3.1/docs/cinder/img/grid19.png +0 -0
  61. opensimula-0.3.1/docs/cinder/img/grid2.png +0 -0
  62. opensimula-0.3.1/docs/cinder/img/grid20.png +0 -0
  63. opensimula-0.3.1/docs/cinder/img/grid3.png +0 -0
  64. opensimula-0.3.1/docs/cinder/img/grid4.png +0 -0
  65. opensimula-0.3.1/docs/cinder/img/grid5.png +0 -0
  66. opensimula-0.3.1/docs/cinder/img/grid6.png +0 -0
  67. opensimula-0.3.1/docs/cinder/img/grid7.png +0 -0
  68. opensimula-0.3.1/docs/cinder/img/grid8.png +0 -0
  69. opensimula-0.3.1/docs/cinder/img/grid9.png +0 -0
  70. opensimula-0.3.1/docs/cinder/js/base.js +0 -225
  71. opensimula-0.3.1/docs/cinder/js/bootstrap-3.0.3.min.js +0 -7
  72. opensimula-0.3.1/docs/cinder/keyboard-modal.html +0 -40
  73. opensimula-0.3.1/docs/cinder/main.html +0 -10
  74. opensimula-0.3.1/docs/cinder/mkdocs_theme.yml +0 -13
  75. opensimula-0.3.1/docs/cinder/nav-sub.html +0 -14
  76. opensimula-0.3.1/docs/cinder/nav.html +0 -109
  77. opensimula-0.3.1/docs/cinder/search-modal.html +0 -27
  78. opensimula-0.3.1/docs/cinder/toc.html +0 -13
  79. opensimula-0.3.1/docs/component_list/index.html +0 -253
  80. opensimula-0.3.1/docs/component_list_HVAC_systems/index.html +0 -400
  81. opensimula-0.3.1/docs/component_list_building/index.html +0 -640
  82. opensimula-0.3.1/docs/component_list_constructions/index.html +0 -366
  83. opensimula-0.3.1/docs/component_list_files/index.html +0 -312
  84. opensimula-0.3.1/docs/component_list_schedules/index.html +0 -304
  85. opensimula-0.3.1/docs/component_list_utils/index.html +0 -255
  86. opensimula-0.3.1/docs/css/base.css +0 -289
  87. opensimula-0.3.1/docs/css/base.min.css +0 -1
  88. opensimula-0.3.1/docs/css/bootstrap-custom.css +0 -5309
  89. opensimula-0.3.1/docs/css/bootstrap-custom.min.css +0 -1
  90. opensimula-0.3.1/docs/css/cinder.css +0 -88
  91. opensimula-0.3.1/docs/css/cinder.min.css +0 -1
  92. opensimula-0.3.1/docs/css/highlight.css +0 -99
  93. opensimula-0.3.1/docs/css/highlight.min.css +0 -1
  94. opensimula-0.3.1/docs/developer_guide/index.html +0 -236
  95. opensimula-0.3.1/docs/draws/Coordinate system.drawio +0 -460
  96. opensimula-0.3.1/docs/draws/HVAC_draws.drawio +0 -136
  97. opensimula-0.3.1/docs/draws/global_structure.drawio +0 -49
  98. opensimula-0.3.1/docs/draws/opensimula_logo.drawio +0 -19
  99. opensimula-0.3.1/docs/draws/opensimula_logo.drawio.svg +0 -4
  100. opensimula-0.3.1/docs/draws/paramaters.drawio +0 -45
  101. opensimula-0.3.1/docs/draws/variables.drawio +0 -45
  102. opensimula-0.3.1/docs/fonts/fontawesome-webfont.eot +0 -0
  103. opensimula-0.3.1/docs/fonts/fontawesome-webfont.svg +0 -414
  104. opensimula-0.3.1/docs/fonts/fontawesome-webfont.ttf +0 -0
  105. opensimula-0.3.1/docs/fonts/fontawesome-webfont.woff +0 -0
  106. opensimula-0.3.1/docs/getting_started/index.html +0 -362
  107. opensimula-0.3.1/docs/img/building_coordinate_system.png +0 -0
  108. opensimula-0.3.1/docs/img/component_editor.png +0 -0
  109. opensimula-0.3.1/docs/img/component_in_jupyter.png +0 -0
  110. opensimula-0.3.1/docs/img/control_type_temperature.png +0 -0
  111. opensimula-0.3.1/docs/img/day_schedule_linear.png +0 -0
  112. opensimula-0.3.1/docs/img/day_schedule_step.png +0 -0
  113. opensimula-0.3.1/docs/img/favicon.ico +0 -0
  114. opensimula-0.3.1/docs/img/github_logo.png +0 -0
  115. opensimula-0.3.1/docs/img/global_structure.png +0 -0
  116. opensimula-0.3.1/docs/img/grid1.png +0 -0
  117. opensimula-0.3.1/docs/img/grid10.png +0 -0
  118. opensimula-0.3.1/docs/img/grid11.png +0 -0
  119. opensimula-0.3.1/docs/img/grid12.png +0 -0
  120. opensimula-0.3.1/docs/img/grid13.png +0 -0
  121. opensimula-0.3.1/docs/img/grid14.png +0 -0
  122. opensimula-0.3.1/docs/img/grid15.png +0 -0
  123. opensimula-0.3.1/docs/img/grid16.png +0 -0
  124. opensimula-0.3.1/docs/img/grid17.png +0 -0
  125. opensimula-0.3.1/docs/img/grid18.png +0 -0
  126. opensimula-0.3.1/docs/img/grid19.png +0 -0
  127. opensimula-0.3.1/docs/img/grid2.png +0 -0
  128. opensimula-0.3.1/docs/img/grid20.png +0 -0
  129. opensimula-0.3.1/docs/img/grid3.png +0 -0
  130. opensimula-0.3.1/docs/img/grid4.png +0 -0
  131. opensimula-0.3.1/docs/img/grid5.png +0 -0
  132. opensimula-0.3.1/docs/img/grid6.png +0 -0
  133. opensimula-0.3.1/docs/img/grid7.png +0 -0
  134. opensimula-0.3.1/docs/img/grid8.png +0 -0
  135. opensimula-0.3.1/docs/img/grid9.png +0 -0
  136. opensimula-0.3.1/docs/img/icon_opensimula.ico +0 -0
  137. opensimula-0.3.1/docs/img/icon_opensimula.png +0 -0
  138. opensimula-0.3.1/docs/img/logo_opensimula.png +0 -0
  139. opensimula-0.3.1/docs/img/opening_definition.png +0 -0
  140. opensimula-0.3.1/docs/img/parameters.png +0 -0
  141. opensimula-0.3.1/docs/img/plot_example.png +0 -0
  142. opensimula-0.3.1/docs/img/polygon_surface_coordinate_system.png +0 -0
  143. opensimula-0.3.1/docs/img/project_editor.png +0 -0
  144. opensimula-0.3.1/docs/img/project_in_jupyter.png +0 -0
  145. opensimula-0.3.1/docs/img/rectangular_surface_coordinate_system.png +0 -0
  146. opensimula-0.3.1/docs/img/schedule_plot.png +0 -0
  147. opensimula-0.3.1/docs/img/shadows_example.png +0 -0
  148. opensimula-0.3.1/docs/img/show3D_shadows.png +0 -0
  149. opensimula-0.3.1/docs/img/simple glazing rho norm.png +0 -0
  150. opensimula-0.3.1/docs/img/simple glazing rho.png +0 -0
  151. opensimula-0.3.1/docs/img/simple glazing tau norm.png +0 -0
  152. opensimula-0.3.1/docs/img/simple glazing tau.png +0 -0
  153. opensimula-0.3.1/docs/img/variable_dataframe.png +0 -0
  154. opensimula-0.3.1/docs/img/variables.png +0 -0
  155. opensimula-0.3.1/docs/index.html +0 -281
  156. opensimula-0.3.1/docs/js/base.js +0 -225
  157. opensimula-0.3.1/docs/js/bootstrap-3.0.3.min.js +0 -7
  158. opensimula-0.3.1/docs/search/lunr.js +0 -3475
  159. opensimula-0.3.1/docs/search/main.js +0 -109
  160. opensimula-0.3.1/docs/search/search_index.json +0 -1
  161. opensimula-0.3.1/docs/search/worker.js +0 -133
  162. opensimula-0.3.1/docs/sitemap.xml +0 -3
  163. opensimula-0.3.1/docs/sitemap.xml.gz +0 -0
  164. opensimula-0.3.1/docs/user_guide/index.html +0 -517
  165. opensimula-0.3.1/ipynb/docs/day_schedule_images.ipynb +0 -60
  166. opensimula-0.3.1/ipynb/docs/getting_started.ipynb +0 -18592
  167. opensimula-0.3.1/ipynb/docs/getting_started.json +0 -68
  168. opensimula-0.3.1/ipynb/docs/user_guide.ipynb +0 -106487
  169. opensimula-0.3.1/ipynb/test/ASHRAE_140_CASE_960.ipynb +0 -108593
  170. opensimula-0.3.1/ipynb/test/ASHRAE_140_CASE_CE100.ipynb +0 -160282
  171. opensimula-0.3.1/ipynb/test/CE100A.TM2 +0 -8761
  172. opensimula-0.3.1/ipynb/test/WD100.tmy3 +0 -8762
  173. opensimula-0.3.1/ipynb/test/test_Constructions.ipynb +0 -304
  174. opensimula-0.3.1/ipynb/test/test_HVAC_DX_system.ipynb +0 -143800
  175. opensimula-0.3.1/ipynb/test/test_HVAC_DX_system_ASHRAE_140.ipynb +0 -89927
  176. opensimula-0.3.1/ipynb/test/test_HVAC_perfect_system.ipynb +0 -144549
  177. opensimula-0.3.1/ipynb/test/test_Test_components.ipynb +0 -1373
  178. opensimula-0.3.1/ipynb/test/test_calculator.ipynb +0 -36482
  179. opensimula-0.3.1/ipynb/test/test_psychrolib.ipynb +0 -122
  180. opensimula-0.3.1/makefile +0 -44
  181. opensimula-0.3.1/mkdocs/cinder/404.html +0 -13
  182. opensimula-0.3.1/mkdocs/cinder/base.html +0 -139
  183. opensimula-0.3.1/mkdocs/cinder/content.html +0 -9
  184. opensimula-0.3.1/mkdocs/cinder/css/base.css +0 -289
  185. opensimula-0.3.1/mkdocs/cinder/css/base.min.css +0 -1
  186. opensimula-0.3.1/mkdocs/cinder/css/bootstrap-custom.css +0 -5309
  187. opensimula-0.3.1/mkdocs/cinder/css/bootstrap-custom.min.css +0 -1
  188. opensimula-0.3.1/mkdocs/cinder/css/cinder.css +0 -88
  189. opensimula-0.3.1/mkdocs/cinder/css/cinder.min.css +0 -1
  190. opensimula-0.3.1/mkdocs/cinder/css/highlight.css +0 -99
  191. opensimula-0.3.1/mkdocs/cinder/css/highlight.min.css +0 -1
  192. opensimula-0.3.1/mkdocs/cinder/fonts/fontawesome-webfont.eot +0 -0
  193. opensimula-0.3.1/mkdocs/cinder/fonts/fontawesome-webfont.svg +0 -414
  194. opensimula-0.3.1/mkdocs/cinder/fonts/fontawesome-webfont.ttf +0 -0
  195. opensimula-0.3.1/mkdocs/cinder/fonts/fontawesome-webfont.woff +0 -0
  196. opensimula-0.3.1/mkdocs/cinder/img/favicon.ico +0 -0
  197. opensimula-0.3.1/mkdocs/cinder/img/grid1.png +0 -0
  198. opensimula-0.3.1/mkdocs/cinder/img/grid10.png +0 -0
  199. opensimula-0.3.1/mkdocs/cinder/img/grid11.png +0 -0
  200. opensimula-0.3.1/mkdocs/cinder/img/grid12.png +0 -0
  201. opensimula-0.3.1/mkdocs/cinder/img/grid13.png +0 -0
  202. opensimula-0.3.1/mkdocs/cinder/img/grid14.png +0 -0
  203. opensimula-0.3.1/mkdocs/cinder/img/grid15.png +0 -0
  204. opensimula-0.3.1/mkdocs/cinder/img/grid16.png +0 -0
  205. opensimula-0.3.1/mkdocs/cinder/img/grid17.png +0 -0
  206. opensimula-0.3.1/mkdocs/cinder/img/grid18.png +0 -0
  207. opensimula-0.3.1/mkdocs/cinder/img/grid19.png +0 -0
  208. opensimula-0.3.1/mkdocs/cinder/img/grid2.png +0 -0
  209. opensimula-0.3.1/mkdocs/cinder/img/grid20.png +0 -0
  210. opensimula-0.3.1/mkdocs/cinder/img/grid3.png +0 -0
  211. opensimula-0.3.1/mkdocs/cinder/img/grid4.png +0 -0
  212. opensimula-0.3.1/mkdocs/cinder/img/grid5.png +0 -0
  213. opensimula-0.3.1/mkdocs/cinder/img/grid6.png +0 -0
  214. opensimula-0.3.1/mkdocs/cinder/img/grid7.png +0 -0
  215. opensimula-0.3.1/mkdocs/cinder/img/grid8.png +0 -0
  216. opensimula-0.3.1/mkdocs/cinder/img/grid9.png +0 -0
  217. opensimula-0.3.1/mkdocs/cinder/js/base.js +0 -225
  218. opensimula-0.3.1/mkdocs/cinder/js/bootstrap-3.0.3.min.js +0 -7
  219. opensimula-0.3.1/mkdocs/cinder/keyboard-modal.html +0 -40
  220. opensimula-0.3.1/mkdocs/cinder/main.html +0 -10
  221. opensimula-0.3.1/mkdocs/cinder/mkdocs_theme.yml +0 -13
  222. opensimula-0.3.1/mkdocs/cinder/nav-sub.html +0 -14
  223. opensimula-0.3.1/mkdocs/cinder/nav.html +0 -109
  224. opensimula-0.3.1/mkdocs/cinder/search-modal.html +0 -27
  225. opensimula-0.3.1/mkdocs/cinder/toc.html +0 -13
  226. opensimula-0.3.1/mkdocs/component_list.md +0 -17
  227. opensimula-0.3.1/mkdocs/component_list_HVAC_systems.md +0 -178
  228. opensimula-0.3.1/mkdocs/component_list_building.md +0 -421
  229. opensimula-0.3.1/mkdocs/component_list_constructions.md +0 -146
  230. opensimula-0.3.1/mkdocs/component_list_files.md +0 -91
  231. opensimula-0.3.1/mkdocs/component_list_schedules.md +0 -81
  232. opensimula-0.3.1/mkdocs/component_list_utils.md +0 -31
  233. opensimula-0.3.1/mkdocs/developer_guide.md +0 -3
  234. opensimula-0.3.1/mkdocs/draws/Coordinate system.drawio +0 -460
  235. opensimula-0.3.1/mkdocs/draws/HVAC_draws.drawio +0 -136
  236. opensimula-0.3.1/mkdocs/draws/global_structure.drawio +0 -49
  237. opensimula-0.3.1/mkdocs/draws/opensimula_logo.drawio +0 -19
  238. opensimula-0.3.1/mkdocs/draws/opensimula_logo.drawio.svg +0 -4
  239. opensimula-0.3.1/mkdocs/draws/paramaters.drawio +0 -45
  240. opensimula-0.3.1/mkdocs/draws/variables.drawio +0 -45
  241. opensimula-0.3.1/mkdocs/getting_started.md +0 -157
  242. opensimula-0.3.1/mkdocs/img/building_coordinate_system.png +0 -0
  243. opensimula-0.3.1/mkdocs/img/component_editor.png +0 -0
  244. opensimula-0.3.1/mkdocs/img/component_in_jupyter.png +0 -0
  245. opensimula-0.3.1/mkdocs/img/control_type_temperature.png +0 -0
  246. opensimula-0.3.1/mkdocs/img/day_schedule_linear.png +0 -0
  247. opensimula-0.3.1/mkdocs/img/day_schedule_step.png +0 -0
  248. opensimula-0.3.1/mkdocs/img/favicon.ico +0 -0
  249. opensimula-0.3.1/mkdocs/img/github_logo.png +0 -0
  250. opensimula-0.3.1/mkdocs/img/global_structure.png +0 -0
  251. opensimula-0.3.1/mkdocs/img/icon_opensimula.ico +0 -0
  252. opensimula-0.3.1/mkdocs/img/icon_opensimula.png +0 -0
  253. opensimula-0.3.1/mkdocs/img/logo_opensimula.png +0 -0
  254. opensimula-0.3.1/mkdocs/img/opening_definition.png +0 -0
  255. opensimula-0.3.1/mkdocs/img/parameters.png +0 -0
  256. opensimula-0.3.1/mkdocs/img/plot_example.png +0 -0
  257. opensimula-0.3.1/mkdocs/img/polygon_surface_coordinate_system.png +0 -0
  258. opensimula-0.3.1/mkdocs/img/project_editor.png +0 -0
  259. opensimula-0.3.1/mkdocs/img/project_in_jupyter.png +0 -0
  260. opensimula-0.3.1/mkdocs/img/rectangular_surface_coordinate_system.png +0 -0
  261. opensimula-0.3.1/mkdocs/img/schedule_plot.png +0 -0
  262. opensimula-0.3.1/mkdocs/img/shadows_example.png +0 -0
  263. opensimula-0.3.1/mkdocs/img/show3D_shadows.png +0 -0
  264. opensimula-0.3.1/mkdocs/img/simple glazing rho norm.png +0 -0
  265. opensimula-0.3.1/mkdocs/img/simple glazing rho.png +0 -0
  266. opensimula-0.3.1/mkdocs/img/simple glazing tau norm.png +0 -0
  267. opensimula-0.3.1/mkdocs/img/simple glazing tau.png +0 -0
  268. opensimula-0.3.1/mkdocs/img/variable_dataframe.png +0 -0
  269. opensimula-0.3.1/mkdocs/img/variables.png +0 -0
  270. opensimula-0.3.1/mkdocs/index.md +0 -58
  271. opensimula-0.3.1/mkdocs/user_guide.md +0 -328
  272. opensimula-0.3.1/mkdocs.yml +0 -15
  273. opensimula-0.3.1/requirements.txt +0 -12
  274. opensimula-0.3.1/src/OpenSimula/components/HVAC_DX_system.py +0 -246
  275. opensimula-0.3.1/test/CE100A.TM2 +0 -8761
  276. opensimula-0.3.1/test/WD100.tmy3 +0 -8762
  277. opensimula-0.3.1/test/data_example.csv +0 -27
  278. opensimula-0.3.1/test/data_example.xlsx +0 -0
  279. opensimula-0.3.1/test/sevilla.met +0 -8762
  280. opensimula-0.3.1/test/test_project_1.json +0 -44
  281. opensimula-0.3.1/test/test_project_1_written.json +0 -1
  282. opensimula-0.3.1/test/test_project_2.json +0 -14
  283. opensimula-0.3.1/test/test_project_2_written.json +0 -1
  284. {opensimula-0.3.1 → opensimula-0.4.0}/docs/cinder/__init__.py +0 -0
  285. {opensimula-0.3.1 → opensimula-0.4.0}/mkdocs/cinder/__init__.py +0 -0
  286. {opensimula-0.3.1 → opensimula-0.4.0}/src/OpenSimula/Child.py +0 -0
  287. {opensimula-0.3.1 → opensimula-0.4.0}/src/OpenSimula/Parameter_container.py +0 -0
  288. {opensimula-0.3.1 → opensimula-0.4.0}/src/OpenSimula/Simulation.py +0 -0
  289. {opensimula-0.3.1 → opensimula-0.4.0}/src/OpenSimula/Variable.py +0 -0
  290. {opensimula-0.3.1 → opensimula-0.4.0}/src/OpenSimula/components/Calculator.py +0 -0
  291. {opensimula-0.3.1 → opensimula-0.4.0}/src/OpenSimula/components/Construction.py +0 -0
  292. {opensimula-0.3.1 → opensimula-0.4.0}/src/OpenSimula/components/Day_schedule.py +0 -0
  293. {opensimula-0.3.1 → opensimula-0.4.0}/src/OpenSimula/components/File_data.py +0 -0
  294. {opensimula-0.3.1 → opensimula-0.4.0}/src/OpenSimula/components/Frame.py +0 -0
  295. {opensimula-0.3.1 → opensimula-0.4.0}/src/OpenSimula/components/Interior_surface.py +0 -0
  296. {opensimula-0.3.1 → opensimula-0.4.0}/src/OpenSimula/components/Material.py +0 -0
  297. {opensimula-0.3.1 → opensimula-0.4.0}/src/OpenSimula/components/Opening_type.py +0 -0
  298. {opensimula-0.3.1 → opensimula-0.4.0}/src/OpenSimula/components/Real_surface.py +0 -0
  299. {opensimula-0.3.1 → opensimula-0.4.0}/src/OpenSimula/components/Shadow_surface.py +0 -0
  300. {opensimula-0.3.1 → opensimula-0.4.0}/src/OpenSimula/components/Space_type.py +0 -0
  301. {opensimula-0.3.1 → opensimula-0.4.0}/src/OpenSimula/components/Surface.py +0 -0
  302. {opensimula-0.3.1 → opensimula-0.4.0}/src/OpenSimula/components/Test_component.py +0 -0
  303. {opensimula-0.3.1 → opensimula-0.4.0}/src/OpenSimula/components/Underground_surface.py +0 -0
  304. {opensimula-0.3.1 → opensimula-0.4.0}/src/OpenSimula/components/Virtual_surface.py +0 -0
  305. {opensimula-0.3.1 → opensimula-0.4.0}/src/OpenSimula/components/Week_schedule.py +0 -0
  306. {opensimula-0.3.1 → opensimula-0.4.0}/src/OpenSimula/components/Year_schedule.py +0 -0
  307. {opensimula-0.3.1 → opensimula-0.4.0}/src/OpenSimula/components/__init__.py +0 -0
  308. {opensimula-0.3.1 → opensimula-0.4.0}/src/OpenSimula/components/utils/sun_shadows.py +0 -0
  309. {opensimula-0.3.1 → opensimula-0.4.0}/test/test_Construction.py +0 -0
  310. {opensimula-0.3.1 → opensimula-0.4.0}/test/test_File_data.py +0 -0
  311. {opensimula-0.3.1 → opensimula-0.4.0}/test/test_Project.py +0 -0
  312. {opensimula-0.3.1 → opensimula-0.4.0}/test/test_Schedules.py +0 -0
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2023 Juan F. Coronel
3
+ Copyright (c) 2025 Juan F. Coronel
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -1,37 +1,36 @@
1
- Metadata-Version: 2.4
1
+ Metadata-Version: 2.2
2
2
  Name: OpenSimula
3
- Version: 0.3.1
3
+ Version: 0.4.0
4
4
  Summary: Component-based time simulation environment in Python
5
+ Author-email: "Juan F. Coronel" <jfc@us.es>
5
6
  Project-URL: Homepage, http://opensimula.org
6
7
  Project-URL: Repository, https://github.com/jfCoronel/OpenSimula
7
8
  Project-URL: Bug Tracker, https://github.com/jfCoronel/OpenSimula/issues
8
- Author-email: "Juan F. Coronel" <jfc@us.es>
9
- License-File: LICENSE
9
+ Classifier: Programming Language :: Python :: 3
10
10
  Classifier: License :: OSI Approved :: MIT License
11
11
  Classifier: Operating System :: OS Independent
12
- Classifier: Programming Language :: Python :: 3
13
12
  Requires-Python: >=3.8
14
- Requires-Dist: dash-ag-grid>=31.0.0
15
- Requires-Dist: dash-bootstrap-components>=1.0.0
16
- Requires-Dist: dash>=2.0.0
17
- Requires-Dist: ipywidgets>=8.1.2
13
+ Description-Content-Type: text/markdown
14
+ License-File: LICENSE
18
15
  Requires-Dist: numpy>1.25
19
16
  Requires-Dist: pandas>1.5
20
- Requires-Dist: plotly>=5.17.0
21
- Requires-Dist: psychrolib>=2.5.0
22
- Requires-Dist: py-expression-eval>=0.3.14
23
- Requires-Dist: pyvista>=0.43.5
24
17
  Requires-Dist: scipy>=1.1
25
18
  Requires-Dist: shapely>=2.0.3
19
+ Requires-Dist: psychrolib>=2.5.0
20
+ Requires-Dist: pyvista>=0.43.5
21
+ Requires-Dist: ipywidgets>=8.1.2
22
+ Requires-Dist: trame>=3.6.0
26
23
  Requires-Dist: trame-vtk>=2.8.5
27
24
  Requires-Dist: trame-vuetify>=2.4.3
28
- Requires-Dist: trame>=3.6.0
25
+ Requires-Dist: plotly>=5.17.0
29
26
  Requires-Dist: triangle>=20230923
30
- Provides-Extra: docs
31
- Requires-Dist: mkdocs>=1.5; extra == 'docs'
27
+ Requires-Dist: dash>=2.0.0
28
+ Requires-Dist: dash-bootstrap-components>=1.0.0
29
+ Requires-Dist: dash-ag-grid>=31.0.0
32
30
  Provides-Extra: testing
33
- Requires-Dist: pytest; extra == 'testing'
34
- Description-Content-Type: text/markdown
31
+ Requires-Dist: pytest; extra == "testing"
32
+ Provides-Extra: docs
33
+ Requires-Dist: mkdocs>=1.5; extra == "docs"
35
34
 
36
35
  ![Logo](https://app.opensimula.org/img/logo_opensimula.png)
37
36
  Component-based time simulation environment in Python
@@ -46,7 +45,6 @@ Component-based time simulation environment in Python
46
45
  - numpy
47
46
  - pandas
48
47
  - scipy
49
- - py-expression-eval
50
48
  - shapely
51
49
  - psychrolib
52
50
  - plotly
@@ -0,0 +1,58 @@
1
+ LICENSE
2
+ README.md
3
+ pyproject.toml
4
+ OpenSimula.egg-info/PKG-INFO
5
+ OpenSimula.egg-info/SOURCES.txt
6
+ OpenSimula.egg-info/dependency_links.txt
7
+ OpenSimula.egg-info/requires.txt
8
+ OpenSimula.egg-info/top_level.txt
9
+ docs/cinder/__init__.py
10
+ mkdocs/cinder/__init__.py
11
+ src/OpenSimula/Child.py
12
+ src/OpenSimula/Component.py
13
+ src/OpenSimula/Iterative_process.py
14
+ src/OpenSimula/Parameter_container.py
15
+ src/OpenSimula/Parameters.py
16
+ src/OpenSimula/Project.py
17
+ src/OpenSimula/Simulation.py
18
+ src/OpenSimula/Variable.py
19
+ src/OpenSimula/__init__.py
20
+ src/OpenSimula/components/Building.py
21
+ src/OpenSimula/components/Calculator.py
22
+ src/OpenSimula/components/Construction.py
23
+ src/OpenSimula/components/Day_schedule.py
24
+ src/OpenSimula/components/Exterior_surface.py
25
+ src/OpenSimula/components/File_data.py
26
+ src/OpenSimula/components/File_met.py
27
+ src/OpenSimula/components/Frame.py
28
+ src/OpenSimula/components/Glazing.py
29
+ src/OpenSimula/components/HVAC_DX_equipment.py
30
+ src/OpenSimula/components/HVAC_DX_system.py
31
+ src/OpenSimula/components/HVAC_perfect_system.py
32
+ src/OpenSimula/components/Interior_surface.py
33
+ src/OpenSimula/components/Material.py
34
+ src/OpenSimula/components/Opening.py
35
+ src/OpenSimula/components/Opening_type.py
36
+ src/OpenSimula/components/Real_surface.py
37
+ src/OpenSimula/components/Shadow_surface.py
38
+ src/OpenSimula/components/Space.py
39
+ src/OpenSimula/components/Space_type.py
40
+ src/OpenSimula/components/Surface.py
41
+ src/OpenSimula/components/Test_component.py
42
+ src/OpenSimula/components/Underground_surface.py
43
+ src/OpenSimula/components/Virtual_surface.py
44
+ src/OpenSimula/components/Week_schedule.py
45
+ src/OpenSimula/components/Year_schedule.py
46
+ src/OpenSimula/components/__init__.py
47
+ src/OpenSimula/components/utils/sun_shadows.py
48
+ test/test_Calculator.py
49
+ test/test_Case_600FF.py
50
+ test/test_Case_610.py
51
+ test/test_Construction.py
52
+ test/test_File_data.py
53
+ test/test_File_met.py
54
+ test/test_HVAC_DX_Equipment.py
55
+ test/test_HVAC_DX_system.py
56
+ test/test_Iterative_process.py
57
+ test/test_Project.py
58
+ test/test_Schedules.py
@@ -0,0 +1,21 @@
1
+ numpy>1.25
2
+ pandas>1.5
3
+ scipy>=1.1
4
+ shapely>=2.0.3
5
+ psychrolib>=2.5.0
6
+ pyvista>=0.43.5
7
+ ipywidgets>=8.1.2
8
+ trame>=3.6.0
9
+ trame-vtk>=2.8.5
10
+ trame-vuetify>=2.4.3
11
+ plotly>=5.17.0
12
+ triangle>=20230923
13
+ dash>=2.0.0
14
+ dash-bootstrap-components>=1.0.0
15
+ dash-ag-grid>=31.0.0
16
+
17
+ [docs]
18
+ mkdocs>=1.5
19
+
20
+ [testing]
21
+ pytest
@@ -0,0 +1,3 @@
1
+ docs
2
+ mkdocs
3
+ src
@@ -0,0 +1,59 @@
1
+ Metadata-Version: 2.2
2
+ Name: OpenSimula
3
+ Version: 0.4.0
4
+ Summary: Component-based time simulation environment in Python
5
+ Author-email: "Juan F. Coronel" <jfc@us.es>
6
+ Project-URL: Homepage, http://opensimula.org
7
+ Project-URL: Repository, https://github.com/jfCoronel/OpenSimula
8
+ Project-URL: Bug Tracker, https://github.com/jfCoronel/OpenSimula/issues
9
+ Classifier: Programming Language :: Python :: 3
10
+ Classifier: License :: OSI Approved :: MIT License
11
+ Classifier: Operating System :: OS Independent
12
+ Requires-Python: >=3.8
13
+ Description-Content-Type: text/markdown
14
+ License-File: LICENSE
15
+ Requires-Dist: numpy>1.25
16
+ Requires-Dist: pandas>1.5
17
+ Requires-Dist: scipy>=1.1
18
+ Requires-Dist: shapely>=2.0.3
19
+ Requires-Dist: psychrolib>=2.5.0
20
+ Requires-Dist: pyvista>=0.43.5
21
+ Requires-Dist: ipywidgets>=8.1.2
22
+ Requires-Dist: trame>=3.6.0
23
+ Requires-Dist: trame-vtk>=2.8.5
24
+ Requires-Dist: trame-vuetify>=2.4.3
25
+ Requires-Dist: plotly>=5.17.0
26
+ Requires-Dist: triangle>=20230923
27
+ Requires-Dist: dash>=2.0.0
28
+ Requires-Dist: dash-bootstrap-components>=1.0.0
29
+ Requires-Dist: dash-ag-grid>=31.0.0
30
+ Provides-Extra: testing
31
+ Requires-Dist: pytest; extra == "testing"
32
+ Provides-Extra: docs
33
+ Requires-Dist: mkdocs>=1.5; extra == "docs"
34
+
35
+ ![Logo](https://app.opensimula.org/img/logo_opensimula.png)
36
+ Component-based time simulation environment in Python
37
+
38
+ [Documentation page](https://app.opensimula.org/)
39
+
40
+ ## Main Developers
41
+
42
+ * [Juan F. Coronel](http://jfc.us.es), Universidad de Sevilla
43
+
44
+ ## Package dependencies
45
+ - numpy
46
+ - pandas
47
+ - scipy
48
+ - shapely
49
+ - psychrolib
50
+ - plotly
51
+ - dash
52
+ - dash_bootstrap_components
53
+ - dash_ag_grid
54
+ - pyvista
55
+ - trame
56
+ - trame-vtk
57
+ - trame-vuetify
58
+ - ipywidgets
59
+
@@ -11,7 +11,6 @@ Component-based time simulation environment in Python
11
11
  - numpy
12
12
  - pandas
13
13
  - scipy
14
- - py-expression-eval
15
14
  - shapely
16
15
  - psychrolib
17
16
  - plotly
@@ -1,11 +1,10 @@
1
1
  [build-system]
2
2
  # Minimum requirements for the build system to execute.
3
- requires = ["hatchling"]
4
- build-backend = "hatchling.build"
3
+ requires = ["setuptools>=61.2", "wheel"]
5
4
 
6
5
  [project]
7
6
  name = "OpenSimula"
8
- version = "0.3.1"
7
+ version = "0.4.0"
9
8
  authors = [
10
9
  { name="Juan F. Coronel", email="jfc@us.es" },
11
10
  ]
@@ -21,7 +20,6 @@ dependencies = [
21
20
  "numpy>1.25",
22
21
  "pandas>1.5",
23
22
  "scipy>=1.1",
24
- "py-expression-eval>=0.3.14",
25
23
  "shapely>=2.0.3",
26
24
  "psychrolib>=2.5.0",
27
25
  "pyvista>=0.43.5",
@@ -49,3 +47,8 @@ docs = [
49
47
  "Repository" = "https://github.com/jfCoronel/OpenSimula"
50
48
  "Bug Tracker" = "https://github.com/jfCoronel/OpenSimula/issues"
51
49
 
50
+
51
+ [tool.setuptools]
52
+ packages.find.include = ['src*','mkdocs*','docs*']
53
+ packages.find.exclude = ['test*','ipynb*','ASHRAE_140*','mets*','venv*']
54
+ include-package-data = false
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -28,7 +28,7 @@ class Component(Parameter_container):
28
28
  self._variables_[variable.key] = variable
29
29
 
30
30
  def del_variable(self, variable):
31
- self._variables_.remove(variable)
31
+ self._variables_.pop(variable.key,None)
32
32
 
33
33
  def variable(self, key):
34
34
  return self._variables_[key]
@@ -164,7 +164,7 @@ class Component(Parameter_container):
164
164
  self.variable(
165
165
  value.symbol[i]).values[time_index] = value.variable[i].values[time_index]
166
166
 
167
- def iteration(self, time_index, date, daylight_saving):
167
+ def iteration(self, time_index, date, daylight_saving, n_iter):
168
168
  return True
169
169
 
170
170
  def post_iteration(self, time_index, date, daylight_saving, converged):
@@ -0,0 +1,43 @@
1
+ import math
2
+
3
+ class Iterative_process:
4
+ def __init__(self, x_0, tol = 1e-5, lambda_min=0.1, lambda_max=1.0, n_ini_relax=2,rel_vel = 0.9):
5
+ """
6
+ Iterative process using the fixed-point method with adaptive relaxation coefficient
7
+
8
+ Parameters:
9
+ x_0: Initial value
10
+ tol: convergence tolerance
11
+ lambda_min, lambda_max: relaxation coefficient range
12
+ n_ini_relax: Number of iterations in which adaptive relaxation is initiated, must be greater than 1
13
+ """
14
+ self.x = [x_0]
15
+ self.tol = tol
16
+ self.lambda_min = lambda_min
17
+ self.lambda_max = lambda_max
18
+ self.lambda_i = lambda_max
19
+ self.n_ini_relax = n_ini_relax
20
+ self.rel_vel = rel_vel
21
+
22
+
23
+ def converged(self):
24
+ if len(self.x) == 1:
25
+ return False
26
+ else:
27
+ if abs(self.x[-1]-self.x[-2]) < self.tol:
28
+ return True
29
+ else:
30
+ return False
31
+
32
+ def x_next(self, proposed_x):
33
+ x_next = (1 - self.lambda_i) * self.x[-1] + self.lambda_i * proposed_x
34
+
35
+ # Ajuste dinámico de lambda (reduce si hay oscilaciones)
36
+ if len(self.x)>self.n_ini_relax:
37
+ #if abs(x_next - self.x[-1]) > abs(self.x[-1]- self.x[-2]):
38
+ self.lambda_i = max(self.lambda_min, self.lambda_i * self.rel_vel) # Reducimos lambda
39
+ #else:
40
+ #self.lambda_i = min(self.lambda_max, self.lambda_i * 1/self.rel_vel) # Aumentamos lambda
41
+
42
+ self.x.append(x_next)
43
+ return x_next
@@ -1,5 +1,6 @@
1
1
  import sys
2
- from py_expression_eval import Parser
2
+ #from py_expression_eval import Parser
3
+ import math
3
4
  from OpenSimula.Child import Child
4
5
 
5
6
  # ___________________ Parameter _________________________
@@ -271,7 +272,7 @@ class Parameter_int_list(Parameter):
271
272
 
272
273
 
273
274
  class Parameter_float(Parameter_int):
274
- def __init__(self, key, value=0.0, unit="", min=0.0, max=float("inf")):
275
+ def __init__(self, key, value=0.0, unit="", min=float("-inf"), max=float("inf")):
275
276
  Parameter_int.__init__(self, key, float(
276
277
  value), unit, float(min), float(max))
277
278
 
@@ -297,7 +298,7 @@ class Parameter_float(Parameter_int):
297
298
 
298
299
 
299
300
  class Parameter_float_list(Parameter_int_list):
300
- def __init__(self, key, value=[0.0], unit="", min=0.0, max=float("inf")):
301
+ def __init__(self, key, value=[0.0], unit="", min=float("-inf"), max=float("inf")):
301
302
  Parameter_int_list.__init__(
302
303
  self, key, value, unit, float(min), float(max))
303
304
 
@@ -689,7 +690,7 @@ class Parameter_math_exp(Parameter):
689
690
  def __init__(self, key, value="0.0", unit=""):
690
691
  Parameter.__init__(self, key, value)
691
692
  self._unit_ = unit
692
- self._parser_ = Parser()
693
+ #self._parser_ = Parser()
693
694
 
694
695
  @property
695
696
  def unit(self):
@@ -703,22 +704,27 @@ class Parameter_math_exp(Parameter):
703
704
  def value(self, value):
704
705
  self._value_ = str(value)
705
706
 
706
- def check(self):
707
- try:
708
- self._parser_.parse(self.value)
709
- except Exception as error:
710
- return [self._get_error_header_()+f"{str(error)}"]
711
- return []
707
+ # def check(self):
708
+ # try:
709
+ # self._parser_.parse(self.value)
710
+ # except Exception as error:
711
+ # return [self._get_error_header_()+f"{str(error)}"]
712
+ # return []
712
713
 
713
714
  def evaluate(self, values_dic):
714
- return self._parser_.parse(self.value).evaluate(values_dic)
715
+ try:
716
+ val = eval(self.value,globals(),values_dic)
717
+ return val
718
+ except Exception as error:
719
+ self._sim_.print(self._get_error_header_()+str(error))
720
+ return 0
715
721
 
716
722
 
717
723
  class Parameter_math_exp_list(Parameter):
718
724
  def __init__(self, key, value=["0.0"], unit=""):
719
725
  Parameter.__init__(self, key, value)
720
726
  self._unit_ = unit
721
- self._parser_ = Parser()
727
+ #self._parser_ = Parser()
722
728
 
723
729
  @property
724
730
  def unit(self):
@@ -741,14 +747,19 @@ class Parameter_math_exp_list(Parameter):
741
747
  el = str(el)
742
748
  self._value_ = value
743
749
 
744
- def check(self):
745
- errors = []
746
- for n in self.value:
747
- try:
748
- self._parser_.parse(n)
749
- except Exception as error:
750
- errors.append(self._get_error_header_()+f"{str(error)}")
751
- return errors
750
+ # def check(self):
751
+ # errors = []
752
+ # for n in self.value:
753
+ # try:
754
+ # self._parser_.parse(n)
755
+ # except Exception as error:
756
+ # errors.append(self._get_error_header_()+f"{str(error)}")
757
+ # return errors
752
758
 
753
759
  def evaluate(self, i, values_dic):
754
- return self._parser_.parse(self.value[i]).evaluate(values_dic)
760
+ try:
761
+ val = eval(self.value[i],globals(),values_dic)
762
+ return val
763
+ except Exception as error:
764
+ self._sim_.print(self._get_error_header_()+str(error))
765
+ return 0
@@ -127,7 +127,7 @@ class Project(Parameter_container):
127
127
  else:
128
128
  msg = self._get_error_header_(
129
129
  ) + f'Component does not contain "type" parameter {component}'
130
- self._sim_print(msg)
130
+ self._sim_.print(msg)
131
131
  else:
132
132
  if key in self._parameters_:
133
133
  self.parameter(key).value = value
@@ -341,7 +341,7 @@ class Project(Parameter_container):
341
341
 
342
342
  return errors
343
343
 
344
- def simulate(self):
344
+ def simulate(self, show_percentage = 10):
345
345
  """Project Time Simulation"""
346
346
  n = self.parameter("n_time_steps").value
347
347
  date = dt.datetime.strptime(
@@ -360,17 +360,17 @@ class Project(Parameter_container):
360
360
  self._sim_df = pd.DataFrame({"dates":self.dates()})
361
361
  self._sim_df["n_iterations"] = 0
362
362
  self._sim_df["last_component"] = "None"
363
+ self._sim_df["converged"] = True
363
364
 
364
- self._sim_.print(
365
- f"Simulating {self.parameter('name').value}: ", add_new_line=False
366
- )
365
+ self._sim_.print(f"Simulating {self.parameter('name').value}: ...")
367
366
 
368
- show_percent = 10.0
367
+ show_percent = show_percentage
368
+ n_iter_acum = 0
369
369
  for i in range(n):
370
370
  if ((100.0*(i+1) / n) >= show_percent):
371
- self._sim_.print(str(int(show_percent)) +
372
- "% ", add_new_line=False)
373
- show_percent = show_percent + 10.0
371
+ self._sim_.print(f"{int(show_percent)}%: N_iter: {(n_iter_acum/(n*show_percentage/100)):.2f}")
372
+ show_percent = show_percent + show_percentage
373
+ n_iter_acum = 0
374
374
  daylight_saving = False
375
375
  if (self.parameter("daylight_saving").value):
376
376
  if (date > date_dls_start and date < date_dls_end):
@@ -380,14 +380,19 @@ class Project(Parameter_container):
380
380
  converge = False
381
381
  n_iter = 0
382
382
  while (not converge and n_iter < self.parameter("n_max_iteration").value):
383
- n_iter += 1
384
- if self._iteration_(i, date, daylight_saving):
383
+ if self._iteration_(i, date, daylight_saving,n_iter):
385
384
  converge = True
385
+ n_iter += 1
386
386
  self._sim_df.at[i, "n_iterations"] = n_iter
387
+ self._sim_df.at[i, "converged"] = converge
388
+ n_iter_acum += n_iter
387
389
  self._post_iteration_(i, date, daylight_saving, converge)
388
390
  date = date + dt.timedelta(0, delta_t)
389
391
 
390
- self._sim_.print(" End")
392
+ self._sim_.print("Simulation completed.")
393
+ n_not_converged = len(self._sim_df["converged"]) - self._sim_df["converged"].sum()
394
+ if n_not_converged > 0:
395
+ self._sim_.print(f"Warning: {n_not_converged} time steps did not converge.")
391
396
  self._post_simulation_()
392
397
 
393
398
  def _pre_simulation_(self, n_time_steps, delta_t):
@@ -402,10 +407,10 @@ class Project(Parameter_container):
402
407
  for comp in self._ordered_component_list_:
403
408
  comp.pre_iteration(time_index, date, dayligth_saving)
404
409
 
405
- def _iteration_(self, time_index, date, dayligth_saving):
410
+ def _iteration_(self, time_index, date, dayligth_saving, n_iter):
406
411
  converge = True
407
412
  for comp in self._ordered_component_list_:
408
- if not comp.iteration(time_index, date, dayligth_saving):
413
+ if not comp.iteration(time_index, date, dayligth_saving, n_iter):
409
414
  self._sim_df.at[time_index, "last_component"] = comp.parameter("name").value
410
415
  converge = False
411
416
  return converge
@@ -4,4 +4,5 @@ OpenSimula is a Python Package for perform time simulations
4
4
 
5
5
  """
6
6
  from OpenSimula.Simulation import Simulation
7
- VERSION = "0.3.1"
7
+ from OpenSimula.Iterative_process import Iterative_process
8
+ VERSION = "0.4.0"
@@ -594,16 +594,9 @@ class Building(Component):
594
594
  self.KZS_matrix, np.matmul(self.KS_inv_matrix, self.FS_vector)
595
595
  )
596
596
 
597
- def iteration(self, time_index, date, daylight_saving):
598
- super().iteration(time_index, date, daylight_saving)
599
- # if self._first_iteration: # Only in the 1st iteration
600
- # #self._calculate_Q_dir(time_index)
601
- # self._calculate_FS_vector(time_index)
602
- # self._calculate_FIN_WS_matrices(time_index)
603
- # self._update_space_K_F(time_index)
604
- # self._first_iteration = False
605
- # return False # Force iteration
606
- # else:
597
+ def iteration(self, time_index, date, daylight_saving, n_iter):
598
+ super().iteration(time_index, date, daylight_saving, n_iter)
599
+
607
600
  self._update_space_K_F(time_index)
608
601
  self._store_surfaces_values(time_index)
609
602
  return True
@@ -105,26 +105,6 @@ class Exterior_surface(Real_surface):
105
105
  T_rm = self.variable("T_rm").values[time_index]
106
106
  self.f_0 = self.area * (- p_0 - self.parameter("h_cv").value[0] * self._T_ext - h_rd * T_rm - q_sol)
107
107
 
108
- def iteration(self, time_index, date, daylight_saving):
109
- super().iteration(time_index, date, daylight_saving)
110
- # Calculate shadows only once
111
- # if not self._shadow_calculated:
112
- # direct_sunny_fracion = self.building().get_direct_sunny_fraction(self)
113
- # E_dir = self.variable(
114
- # "E_dir_sunny").values[time_index] * direct_sunny_fracion
115
- # self.variable("E_dir").values[time_index] = E_dir
116
- # self.variable(
117
- # "q_sol0").values[time_index] += self.radiant_property("alpha", "solar_diffuse", 0) * E_dir
118
- # q_sol = self.variable("q_sol0").values[time_index]
119
- # p_0 = self.variable("p_0").values[time_index]
120
- # h_rd = self.H_RD * self.radiant_property("alpha", "long_wave", 0)
121
- # T_rm = self.variable("T_rm").values[time_index]
122
- # self.f_0 = self.area * \
123
- # (- p_0 - self.parameter("h_cv").value[0]
124
- # * self._T_ext - h_rd * T_rm - q_sol)
125
- # self._shadow_calculated = True
126
- return True
127
-
128
108
  def post_iteration(self, time_index, date, daylight_saving, converged):
129
109
  super().post_iteration(time_index, date, daylight_saving, converged)
130
110
  self._calculate_T_s0(time_index)
@@ -155,6 +155,7 @@ class File_met(Component):
155
155
  self.temperature = data["DryBulb"].to_numpy()/10
156
156
  self.sol_diffuse = data["DHI"].to_numpy()
157
157
  self.sol_direct = data["GHI"].to_numpy() - self.sol_diffuse
158
+ self.sol_direct[self.sol_direct < 0] = 0 # Eliminate negative values if exist
158
159
  self.rel_humidity = data["RHum"].to_numpy()
159
160
 
160
161
  self.wind_speed = data["Wspd"].to_numpy()/10
@@ -238,17 +239,21 @@ class File_met(Component):
238
239
  variable).values[time_i] = array[i] * (1 - f) + array[j] * f
239
240
 
240
241
  def _get_solar_interpolation_tuple_(self, datetime, solar_hour):
241
- day = datetime.timetuple().tm_yday # Día del año
242
+ day = datetime.timetuple().tm_yday # Day of the year
243
+ if (solar_hour - datetime.hour > 10): # solar hour from previous day
244
+ day = day - 1
245
+ elif (solar_hour - datetime.hour < -10): # solar hour next day
246
+ day = day + 1
242
247
  # El primer valor es a las 00:30
243
248
  index = solar_hour + (day-1)*24
244
249
  if index < 0:
245
- index = index + 8760
250
+ index = 0
246
251
  elif index >= 8760:
247
- index = index - 8760
252
+ index = 8760
248
253
  i = math.floor(index)
249
254
  j = i + 1
250
255
  if j >= 8760:
251
- j = 0
256
+ j = 8760
252
257
  f = index - i
253
258
  return (i, j, f)
254
259
 
@@ -20,8 +20,8 @@ class Glazing(Component):
20
20
  self.add_parameter(Parameter_float(
21
21
  "U", 5.686, "W/m²K", min=0))
22
22
  self.add_parameter(Parameter_math_exp(
23
- "f_tau_nor", "1.3186 * cos_theta^3 - 3.5251 * cos_theta^2 + 3.2065 * cos_theta", "frac"))
24
- f_rho = "1.8562 * cos_theta^3 - 4.4739 * cos_theta^2 + 3.6177 * cos_theta"
23
+ "f_tau_nor", "1.3186 * cos_theta**3 - 3.5251 * cos_theta**2 + 3.2065 * cos_theta", "frac"))
24
+ f_rho = "1.8562 * cos_theta**3 - 4.4739 * cos_theta**2 + 3.6177 * cos_theta"
25
25
  self.add_parameter(Parameter_math_exp_list(
26
26
  "f_1_minus_rho_nor", [f_rho, f_rho], "frac"))
27
27