Dinamica EGO — version 8.12.0

Changes compared to version 8.11.2:

1. Elevation Graph (new type and functors)

A new data type ElevationGraph was introduced in the engine to represent the hierarchical relationship between patches corresponding to DEM isolines. A full set of functors, conversions, and UI support was implemented around it.

Data type

  • Elevation Graph Type — core data structure storing the elevation graph, including basic operations to construct, manipulate, and query it.

Functors

Conversions

Integration and scripting

  • Elevation graphs can now be used as execution-sequencing tokens (force execution order between functors).
  • A carrier functor was defined for the Elevation Graph Type.
  • The engine now reports whether a conversion between two data types is lossless or not, using an additional information field in the data converter factory.
  • The criteria used to detect when it is safe to remove a carrier functor from a script without changing its execution semantics were expanded.

UI support

  • A (temporary) icon was added to the class of functors related to elevation graphs in the functor library.

Test coverage

2. Spatial Index for 2D Points (new type and functors)

A new data type SpatialIndex2DPoint was introduced to represent an R-Tree spatial index for sets of 2-D points, implemented on top of boost::geometry.

Data type

  • Spatial Index 2D Point Type — wraps the Boost R-Tree with the standard Dinamica type interface; defines the basic operations to build and query the index.

Functors

Integration and scripting

UI support

  • A (temporary) icon was added to the class of functors related to spatial indexes in the functor library.

Test coverage

3. CalcNeighborhood improvements

  • Bug fix — the functor was missing some neighbourhood associations under certain circumstances.
  • Configurable window size — new options allow the number of lines and columns of the neighbourhood search window to be specified, making it possible to consider non-immediate neighbours.
  • Orthogonal-border option — a new flag restricts the neighbourhood relationship to pairs of features that share an orthogonal border only.
  • Reflexive relationsNeighborhood Table now supports reflexive self-relations; Calc Neighborhood always includes a reflexive entry for each neighbour to ensure completely isolated features are still represented in the result.
  • Progress reportingCalc Neighborhood now reports execution progress.
  • Performance optimisation — the functor was optimised to avoid inspecting every cell of the neighbourhood window unnecessarily.
  • Compatibility of Calc Spatial Lag with the legacy behaviour of Neighborhood Table was preserved.

4. Script writing and EGO script format

  • Deterministic output — when saving a script in EGO format, lines that share the same scheduler rank are now sorted by functor name, alias, banner, and functor ID as a tiebreaker, producing reproducible output.
  • Improved variable-name generation — the script writer no longer derives automatic variable names from functor IDs; it now generates shorter sequential names.
  • Functor rank as a property — the scheduling rank of a functor can now be retrieved as a functor property.
  • Configurable comment wrapping column — a new option controls the column at which long comments are broken into multiple lines when writing scripts in EGO script format. See Script generation options.
  • Java APIScript::addNicknameToLocalSubmodelFactory() was added to the Java binding, allowing a submodel in the local factory to be temporarily renamed via a custom nickname.

5. Functor scheduling and grouping

  • Deterministic rank ordering — the scheduler's tie-breaking order when two functors share the same rank is now more predictable; related test cases were updated.
  • Multiple group registration — functors can now be registered under more than one group simultaneously.
  • Legacy group handling — the functor library UI now correctly handles functors registered under legacy groups, preventing display issues for functors that predate the current group system.

6. Functor copy and paste

The copy/paste subsystem for functors was significantly reworked and several bugs were fixed.

  • Reconnect on paste — when pasting functors from the clipboard, they now automatically reconnect to their original counterparts in the script, restoring connections that existed before copying. A new Paste Disconnected action preserves the old behaviour for cases where reconnection is not desired.
  • Improved copy/paste architecture — the entire copy and import path was refactored and cleaned up to unify the execution path when importing (or not) local submodels as part of the copy process. The utility function getCopiedLocalSubmodelNames(), previously defined in the clipboard but used exclusively by ScriptGraph, was moved to its proper owner.
  • Fixed: paste in a different script — fixed an error that occurred when pasting a script fragment into a script different from the one where the fragment was copied (regression introduced by the reconnect-on-paste change).
  • Fixed: assertion on self-referential paste — fixed an assertion triggered when an instance of a local submodel was pasted into the definition of a local submodel that is part of itself. A previous incomplete fix was reverted and replaced by a more robust implementation as part of the copy/paste refactoring.
  • Fixed: wrong submodel copied across main scripts — fixed a bug where copying an instance of a local submodel between scripts controlled by two different main scripts could copy the wrong submodel when the submodel name was already in use in the target.
  • Fixed: regression affecting submodel selection — fixed a regression introduced by the copy/paste refactoring that could negate the previous fix for copying local submodels between scripts controlled by different main scripts when submodel names overlapped.
  • Fixed: submodel export properties retained after paste — fixed a bug where functors that export submodel inputs or outputs would keep the properties controlling that information even after being copied and pasted into a main script.

7. Submodel management

New submodel importer

An improved submodel importer is now used by default. The previous importer can be restored via the development options (see §14).

  • A verification step was added to confirm submodel import continuity, allowing the user to review the import plan and cancel before any changes are made.
  • Hash generation improvements — local submodel names are once again included when generating submodel hashes; non-local submodels are no longer considered part of the dependency chain when calculating hashes.
  • Dependency handling fixes — corrected errors that occurred when importing submodels with shared dependencies.
  • Resource cleanup — scripts created during the import analysis phase are now properly discarded.
  • The new importer cleanly separates import resolution and validation from the actual importing step.
  • Code cleanup — removed an unused parameter from resolveSubmodelImport(), fixed documentation and parameter names, and removed obsolete code related to importing dependent submodels during submodel creation and update operations.
  • Fixed: open/closed container state ignored on import — fixed a regression where importing submodels would ignore the open/closed state of a container.

Local submodel management

  • Pending changes on submodel removal — before removing the definition of a local submodel, the UI now ensures that all pending changes to that submodel (or submodels that depend on it) are either discarded or propagated first. This prevents errors that occurred when reverting a dependent submodel after its dependency had already been removed.
  • Group names in the Local Submodels tree — names of groups defined inside local submodels are now displayed in the Local Submodels tree in the Functor Library. The built-in group name “Submodels” is hidden to avoid unnecessary clutter.
  • Modified flag after submodel update — fixed a bug where the main script was not marked as modified after a local submodel with no direct dependency path to the main script was updated.

8. Search improvements

Explorer panel — search by port value

The Explorer search box can now find functors based on the value of their basic-type input ports. The supported port types are:

  • RealValue, BooleanValue, Percent
  • String, Name, Folder
  • NullValue, TableValue, TableCellType
  • IndexOrName, CellType, LogTag
  • The IntegerValue family of types
  • The Filename family of types

Search box menu flags

A new toggle was added to the search box menus in the Explorer panel, the Functor Library, and the Issue Panel to control whether additional metadata qualifiers (e.g. is:flag) are included in the search.

Issue Panel filters

New search qualifiers were added for the Issue Panel:

  • is:runtime — filter for runtime issues
  • is:error — filter for error-level issues
  • is:warning — filter for warning-level issues

A duplicate entry in the search menu was also removed.

Experimental functor filter

A new search qualifier is:experimental was added and can be used to search for experimental functors in the Explorer panel, the Issue Panel, and the Functor Library.


9. UI: visual display and banners

Functor icons and decoration

  • Experimental badge — experimental functors now receive a decoration badge to identify them as such, instead of being treated as a distinct functor class.
  • Type icon for multi-output functors — fixed a bug where a functor's icon would not be decorated with its type when the functor had more than one output port, even when all outputs shared the same type.
  • Loader functors — loader functors now always receive a type icon decoration, even when they have more than one output port of different types.

Banners

Other UI improvements

  • Java2D renderer — switched from the D3D to the OpenGL pipeline to eliminate visual rendering artifacts that occasionally appeared when a dialog was visible on top of the script editor.
  • Overview panel — changed the colour used to highlight the currently visible portion of the model script.
  • Execution Monitor messages — messages from the Execution Monitor are now treated as debug-level messages.
  • Submodel Store shortcut — removed the keyboard shortcut for the Submodel Store, which was conflicting with another action.
  • Dialog centering — utility functions that open dialogs now accept a parent component instead of a window, allowing more accurate centring.
  • Improved how functor and submodel information is displayed in functor factory dumps.

10. Logging

Engine

  • SYSTEM_COMMUNICATION was added as a new LogSubsystem value. See Dinamica Console for the full list of log subsystem flags.
  • LOG_DEBUG_SUBSYSTEM and LOG_DEBUG_2_SUBSYSTEM macro usages were standardised across the codebase for the following subsystems: GENERAL, EXECUTION_BASICS, MAP_HANDLING, SYSTEM_COMMUNICATION, and FUNCTOR_EXECUTION.
  • Unused log-related definitions were removed.

UI

  • SYSTEM_COMMUNICATION was added to the LogSubsystem options panel, matching the new engine subsystem.

11. Calculate functor family — abbreviated syntax and deprecations

Example: traditional syntax

// Restore the noisy cell/pixels marked for restoration. The value that will be
// assigned to the noisy pixels is derived from a window that grows with the
// current time step.
updatedRestoredImage := CalculateMap [
    if i1 = 2 then
        nbMedian(i2, v1, v1) ? i3
    else
        i3
] cellType nullValue .no .none {{
    NumberMap arePixelsOriginalOrNoisyWithCategories 1;
    NumberMap originalPixelsOnlyInRestoredImage 2;
    NumberMap currentRestoredImage 3;
    NumberValue lK 1;
}};

Example: equivalent abbreviated syntax

// Restore the noisy cell/pixels marked for restoration. The value that will be
// assigned to the noisy pixels is derived from a window that grows with the
// current time step.
updatedRestoredImage := # [
    if #arePixelsOriginalOrNoisyWithCategories = 2 then
        nbMedian(#originalPixelsOnlyInRestoredImage, $lK, $lK) ? #currentRestoredImage
    else
        #currentRestoredImage
] cellType nullValue .no .none;

Interoperability

The application treats both formats completely transparently. Any script written in the abbreviated syntax can be saved or edited, or converted back to the traditional syntax, at any time — without any loss of information. See Conversion between forms for details.


12. Bug fixes and minor improvements

  • CalculatePythonExpression — fixed a problem where packages whose install path contained a space could not be installed.
  • BundleScriptUtils::readFile — fixed a bug where a default parameter was not being passed correctly.
  • Enum-type ports — Enum ports can now be read from and written to an invalid (undefined) state when associated with a hollow functor that does not define the accepted set of constants; the Enum editor was updated accordingly.
  • safeDivide utility — a helper function safeDivide was added to make it easier to prevent division-by-zero errors.
  • TupleEditor memory leak — fixed a small memory leak where the tuple representation was not deleted when the editor was closed.
  • Table editor error on close — added a workaround for a rare error that could occur when a table editor was being closed.
  • Error button in filtered view — fixed an error triggered when clicking the error button in a functor's action bar while the functor was hidden by an active search filter.
  • Missing submodel workaround — added a workaround for failures when retrieving information about missing submodels, which could previously prevent the interface from opening a model script.
  • Parameter options null-check — fixed a small bug where parameter options were not allowed to be null as documented.
  • Table validation regression — fixed a regression in table validation that affected support for multiple table formats; test cases were added.
  • TableValue path expansion — fixed a bug where converting a TableValue representing a relative path to a Filename would expand the path prematurely.
  • Console script error reporting — console script execution now prints complete error information when the underlying cause provides an exception with additional details.
  • Documentation comments for non-obvious constructs were improved; typos were corrected.
  • Code cleanup: removed unnecessary convoluted constructs and unused properties.

13. Dependency update

Synthetica 3.6.0 — the Synthetica look-and-feel library was updated to version 3.6.0 in both dinamica-nui and dinamica-nui-utils.


14. Development options

A new Development tab was added to the Options dialog (ToolsOptions | Development) consolidating settings that were previously accessible only via keyboard shortcuts or not exposed at all. These options control internal behaviours intended for developers and advanced users, including:

  • Whether to use the new or the legacy submodel importer.
  • Whether to show extended tooltip information for functors and submodels.