Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
model_tips [2026/07/19 03:39]
hermann
model_tips [2026/07/26 14:18] (current)
hermann
Line 5: Line 5:
 ===== File Paths ===== ===== File Paths =====
  
-The Dinamica EGO interface shows absolute filepaths for easier reading, but they are relative indeed. So, to easily change the location of a model, keep the same path between the script file ([[EGO Script|ego]] or [[XML Script|xml]]) and your data directory. This will work as expected.+The Dinamica EGO interface shows absolute filepaths for easier reading, but they are relative indeed. So, to easily change the location of a model, keep the same path between the script file ([[ego_script|ego]] or [[xml_script|xml]]) and your data directory. This will work as expected.
  
 ===== Workdir ===== ===== Workdir =====
Line 33: Line 33:
   * No member of the loop is expected as an output port of a submodel.   * No member of the loop is expected as an output port of a submodel.
  
-Sometimes, however, it is convenient to force a loop that //could// run its steps simultaneously to run them sequentially instead. A simple way to do this is to place a ''​MuxValue 0 0''​ functor inside the loop.+Sometimes, however, it is convenient to force a loop that //could// run its steps simultaneously to run them sequentially instead. A simple way to do this is to place a ''​MuxValue 0 0''​ functor inside the loop. See [[basic_data_flow|Basic Data Flow]] for why these conditions hold — a loop's iterations are only independent,​ and therefore only parallelizable,​ when nothing connects one to the next.
  
 ===== Create String ===== ===== Create String =====
Line 46: Line 46:
 ===== Calculate Python Expression ===== ===== Calculate Python Expression =====
  
-Packages can be installed either by calling ''​dinamica.package(...)''​ from within the expression (runs during execution, so it can be called conditionally) or by listing them on the //​packages//​ input port (installed before the script runs). See [[calculate_python_expression#​installing_packages|Calculate Python Expression — Installing Packages]] for the full ''​dinamica.package()''​ syntaxexamples, and the Calculate Python Utilities reference.+Packages can be installed either by calling ''​dinamica.package(...)''​ from within the expression (runs during execution, so it can be called conditionally) or by listing them on the //​packages//​ input port (installed before the script runs). See [[calculate_python_expression#​utilities|Calculate Python Expression — Utilities]] for the full ''​dinamica.package()''​ syntax ​and examples.
  
 ===== Calculate R Expression ===== ===== Calculate R Expression =====
  
-Packages can be installed from **Calculate R Expression** using the ''​dinamicaPackage("​package name"​)''​ function (one function call per package). ''​dinamicaPackage("​package"​)''​ also acts as an ''​import''​ clause: when the package name is the same as the name of the module to be loaded via ''​import'',​ the package is installed and the module of the same name is loaded.+Packages can be installed from **Calculate R Expression** using the ''​dinamicaPackage("​package name"​)''​ function (one function call per package). ''​dinamicaPackage("​package"​)''​ also acts as an ''​import''​ clause: when the package name is the same as the name of the module to be loaded via ''​import'',​ the package is installed and the module of the same name is loaded. See [[calculate_r_expression#​installing_packages|Calculate R Expression — Installing Packages]] for more detail.
  
 ===== Wizards ===== ===== Wizards =====