What is New in Dinamica EGO 8.3.0

(Changes compared to Dinamica EGO 8.0.0.)

The application has seen significant enhancements across several key areas, making it more powerful and user-friendly.

Submodel Expansion

The application introduces a new feature called submodel expansion, which is now the default behavior when running a model. This means that when a script is executed, submodels within the script are automatically expanded. However, this behavior can be disabled using command-line parameters or through the options panel. The submodel expansion feature is designed to be robust and handle various scenarios, including debugging and situations where multiple versions of the same submodel exist. The expansion process involves several steps: returning the group in which the submodel was expanded, managing port substitutions, allowing for cancellations, and transferring local submodels to the main script.

The submodel expansion process occurs within a `SkipAllOnError(false)` block, ensuring compatibility with executions performed without expansion. After the expansion, local submodels are removed from the script. The `SubmodelUtils::expandSubmodel()` function is central to this process, providing the group where the expansion occurs unless `DONT_EXPAND_SUBMODEL_AS_GROUP` is specified. Furthermore, submodels can be expanded as regular groups, and properties associated with the submodel are copied to the newly created group. Any exceptions that occur during the expansion are propagated to Java. The `ScriptRunner` now performs submodel expansion in its constructor.

A new property, `PARENT_FUNCTOR_ID_PROPERTY_NAME`, has been added to store the ID of the functor that represents the direct parent from which a functor was derived. A cache is used to store the definition of the functor corresponding to this property. The application also includes functionality to sanitize the occurrence of `PARENT_FUNCTOR_ID_PROPERTY_NAME`.

Distributed Computing

The application incorporates distributed computing capabilities through the Run Remotely functor, which enables scripts to be executed on remote agents. The distributed system includes a new `ConnectionInfo` type with an identifier field and a “Create Connection Info” functor. The system is designed to accept hostnames as network addresses. Upon login, it sends an identification JSON object. The system is capable of reporting errors, including those that originate from submodels, and identifies functors that are running remotely. The Run Remotely functor includes a fallback mechanism for network errors and utilizes a remoteid property to help with error propagation.

The Run Remotely functor sends egomlx scripts to agents, supporting the bundling of submodels, and includes submodels when copying scripts for remote execution. The ScriptRunner parses scripts on remote agents. The RunRemotely functor also supports external output connections. In the options dialog, there is now a “Remote Computing” tab, and distributed options have been moved to the “Execution” tab. The Run Remotely functor's ports for “coordinator identifier” and “network error behavior” are now part of advanced options, and its polling interval label has been adjusted for clarity. The application now has separate executables for the Agent and Coordinator, and both support cancellation. Agents operate on a separate thread and do not block on receive. Coordinator peer tables are sorted to list agents first. Agents can be configured for reconnection retries.

Script and Functor Handling

The application's handling of scripts and functors has been enhanced by including submodels in searches and utilizing a cache for equivalent functors. The `ScriptRunner` now includes parameters for submodel expansion and copy optimization and, as mentioned previously, it performs submodel expansion in its constructor. The application also ensures that content is preserved during copy operations, with properties being handled correctly. Furthermore, data transfers between ports are enhanced when copy optimization is turned off.

User Interface (UI) and User Experience (UX) Improvements

The application includes several UI and UX improvements:

  • The status bar has been redesigned to display more information about the application settings.
  • The Options window has been reorganized, with memory management settings moved to a dedicated “Execution” tab, and now it has the ability to open specific tabs programmatically.
  • Tooltips provide detailed explanations and automatically remove periods at the end of tooltips and descriptions.
  • Layout issues have been resolved to ensure a consistent look.
  • Keyboard shortcuts have been improved with standardization using the Alt key.
  • The history window has a fixed limit of 12 selections and prevents it from opening when another window is active.
  • Custom icons have been added to various functors.
  • Labels and components are now better aligned for improved readability.
  • The PreviousNextController tool is now always active and uses a stack-based structure for navigation, replacing the Bookmarks tool.
  • A red rectangle highlights the zoomed area in the Overview panel.
  • Lightweight windows are used for action bars and auxiliary panels.
  • The birdview now uses a circular border.
  • The hardcoded string “monospaced” has been removed as the font family.
  • Double-click functionality has been introduced to create functors from the FunctorLibrary.

Miscellaneous Improvements

  • Memory Management: Memory management has been improved, addressing a memory leak and enhancing tooltips related to memory management policies. There is also a dedicated tab for memory management settings in the Options window.
  • Code Modernization and Refactoring: The codebase has been modernized by replacing C strings with `std::string_view` and using range-based for loops. Code duplication has been reduced, and unnecessary includes and parameters have been removed. The application also has a simpler way of comparing version numbers. The definition of the functor ID mapping has been modernized.
  • Error Handling and Debugging: Error handling and reporting have been improved. Functor execution errors are now reported as runtime issues, and cancellation information is no longer reported as a runtime issue. There have been several compilation fixes, and a fix for an assertion failure in `prepareUpdate()` when a submodel's internal script is modified after copying its content. The application now features enhanced error copying to support scripts with expanded submodels. The script execution can now be canceled even during submodel expansion.
  • Script Loading and Saving: The application uses `setPropertyAsPath()` and avoids writing `SCRIPT_WORKDIR_PROPERTY_NAME` to script files. Script bundle utilities have been improved, and the output flag now writes the script after submodel expansion.
  • Command Line Interface: The application's command-line tools now include flags for submodel expansion (`-expand-submodels`) and disabling copy optimization (`-disable-copy-optimization`). These flags can be passed as part of aggregate parameters. There have also been fixes to issues with using aggregate parameters for `ScriptRunner` and initialization of the `ScriptRunner` parameter related to submodel expansion. Command line utilities are now shared by the Console and Agent.
  • Test Cases: Numerous test cases were added or updated to ensure functionality, including tests for submodel expansion, distributed computing, and error handling, and updated test running scripts.
  • Functor and Port updates: The application now has an option to allow `findFunctorsByAlias()` to search through submodels. There is a new version of `FunctorContainerUtils::iterate()` that accepts a list of functor IDs. The definition of the “Create Connection Info” functor has been updated, including port descriptions and validations. The “Run Remotely” functor has also had its port descriptions updated, and some ports were moved to advanced options. The application properly connects submodel inputs after submodel expansion. Expanded submodels can have the same semantics as submodels in relation to how log messages are emitted.
  • Other miscellaneous changes: The application ensures that data transferred between ports is copied when copy optimization is off. The application has improved the way it handles zip files, including adding support for in-memory zip files. There is also a new method, `addDataForcefully()`, to define data for a holder without risking the data being copied. The application also uses a constant instead of a hardcoded string.

(Summary generated using Google Notebook)