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
- Create Elevation Graph — creates an elevation graph from DEM information.
- Get Elevation Graph Info — retrieves basic information about the graph (number of nodes, edges, etc.).
- Get Elevation Graph Tops And Bases — retrieves the list of all patches corresponding to tops and bases.
- Filter Elevation Graph — removes (filters) nodes from the graph.
- Find Elevation Graph Bases — retrieves the nodes that are bases reachable from a given top node.
- Find Elevation Graph Paths — retrieves all nodes reachable from a given top node; a new option allows the search to also include parent nodes (nodes above a given node) when finding paths between tops and bases.
- Get Elevation Graph Common Paths Summaries — retrieves information about common paths between nodes of two top nodes.
- Save Elevation Graph — saves the graph in JSON format (and DOT format for debugging).
Conversions
- Elevation Graph Type → Neighborhood Table — allows the graph to be used wherever neighborhood tables are expected.
- Elevation Graph Type →
String(JSON) — serialises the graph to a human-readable JSON representation.
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
Test cases were added for all of the above functors and conversions (Create Elevation Graph, Filter Elevation Graph, Get Elevation Graph Info, Get Elevation Graph Tops And Bases, Find Elevation Graph Bases, Find Elevation Graph Paths, Save Elevation Graph, both conversions, and Get Elevation Graph Common Paths Summaries).
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
- Create Spatial Index For 2D Points — builds a spatial index from a set of 2-D points.
- Find Nearest 2D Points From Spatial Index — queries the index using a set of probe points and returns the nearest neighbours.
Integration and scripting
- A carrier functor was defined for the Spatial Index 2D Point Type.
- The display name for Spatial Index 2D Point Type was corrected.
UI support
- A (temporary) icon was added to the class of functors related to spatial indexes in the functor library.
Test coverage
Test cases were added for both Create Spatial Index For 2D Points and Find Nearest 2D Points From Spatial Index.
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 relations — Neighborhood 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 reporting — Calc 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 API —
Script::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 byScriptGraph, 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,PercentString,Name,FolderNullValue,TableValue,TableCellTypeIndexOrName,CellType,LogTag- The
IntegerValuefamily of types - The
Filenamefamily 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 issuesis:error— filter for error-level issuesis: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
- Set Table Column Name — a banner was defined to show the new column name; port editors are now presented in separate tabs.
- Add Table Column — the banner now includes information about the type of the column being added.
- Get Table Column — a banner was added to show the column index or name being retrieved.
- Extract Categorical Map Attributes / Get Table From Key — utility functions for generating banners were added, along with a banner that better illustrates the interaction between those two functors.
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_COMMUNICATIONwas added as a newLogSubsystemvalue. See Dinamica Console for the full list of log subsystem flags.LOG_DEBUG_SUBSYSTEMandLOG_DEBUG_2_SUBSYSTEMmacro usages were standardised across the codebase for the following subsystems:GENERAL,EXECUTION_BASICS,MAP_HANDLING,SYSTEM_COMMUNICATION, andFUNCTOR_EXECUTION.- Unused log-related definitions were removed.
UI
SYSTEM_COMMUNICATIONwas added to the LogSubsystem options panel, matching the new engine subsystem.
11. Calculate functor family — abbreviated syntax and deprecations
- Abbreviated syntax remapped — When reading and writing models, the abbreviated syntax constructs
#[],##[],%[], and$[]now always map to Calculate Map, Calculate Categorical Map, Calculate Lookup Table Values, and Calculate Value respectively — instead of mapping to their legacy*2counterparts as before. - New abbreviated syntax construct — the construct
%%[]now maps to Calculate Lookup Table Keys And Values. - Configurable abbreviated syntax output — A new option (Tools → Options | EGO Script | Use abbreviated syntax for Calculate family functors) lets you control whether functors in the
Calculatefamily are written using the abbreviated syntax when a script is saved. - Deprecated functors — The following functors are now deprecated and should no longer be used:
CalculateMap2,CalculateCategoricalMap2,CalculateLookupTable2, andCalculateValue2. Use Calculate Map, Calculate Categorical Map, Calculate Lookup Table Values, and Calculate Value instead.
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
safeDividewas 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
nullas 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
TableValuerepresenting a relative path to aFilenamewould 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 (Tools → Options | 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.