This is an old revision of the document!
Dinamica EGO — Changes since v8.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
ElevationGraphType/ElevationGraphData— core data structure storing the elevation graph, including basic operations to construct, manipulate, and query it.
Functors
- CreateElevationGraph — creates an elevation graph from DEM information.
- GetElevationGraphInfo — retrieves basic information about the graph (number of nodes, edges, etc.).
- GetElevationGraphTopsAndBases — retrieves the list of all patches corresponding to tops and bases.
- FilterElevationGraph — removes (filters) nodes from the graph.
- FindElevationGraphBases — retrieves the nodes that are bases reachable from a given top node.
- FindElevationGraphPaths — retrieves all nodes reachable from a given top node.
- GetElevationGraphCommonPathsSummaries — retrieves information about common paths between nodes of two top nodes.
- SaveElevationGraph — saves the graph in JSON format (and DOT format for debugging).
Conversions
ElevationGraph→NeighborhoodTable— allows the graph to be used wherever neighborhood tables are expected.ElevationGraph→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
ElevationGraphtype.
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 (CreateElevationGraph, FilterElevationGraph, GetElevationGraphInfo, GetElevationGraphTopsAndBases, FindElevationGraphBases, FindElevationGraphPaths, SaveElevationGraph, both conversions, and GetElevationGraphCommonPathsSummaries).
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
SpatialIndex2DPointType/SpatialIndex2DPointData— wraps the Boost R-Tree with the standard Dinamica type interface; defines the basic operations to build and query the index.
Functors
- CreateSpatialIndexFor2DPoints — builds a spatial index from a set of 2-D points.
- FindNearest2DPointsFromSpatialIndex — queries the index using a set of probe points and returns the nearest neighbours.
Integration and scripting
- A carrier functor was defined for the
SpatialIndex2DPointtype. - The display name for
SpatialIndex2DPointwas 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 CreateSpatialIndexFor2DPoints and FindNearest2DPointsFromSpatialIndex.
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 —
NeighborhoodTablenow supports reflexive self-relations;CalcNeighborhoodalways includes a reflexive entry for each neighbour to ensure completely isolated features are still represented in the result. - Progress reporting —
CalcNeighborhoodnow reports execution progress. - Performance optimisation — the functor was optimised to avoid inspecting every cell of the neighbourhood window unnecessarily.
- Compatibility of
CalcSpatialLagwith the legacy behaviour ofNeighborhoodTablewas 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.
- 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 was introduced, available when additional development tools are active (Ctrl+Alt+F1).
- 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.
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.
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
- SetTableColumnName — 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.
- 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.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. 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.
- 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. - Documentation comments for non-obvious constructs were improved; typos were corrected.
- Code cleanup: removed unnecessary convoluted constructs and unused properties.
12. Dependency update
- Synthetica 3.6.0 — the Synthetica look-and-feel library was updated to version 3.6.0 in both
dinamica-nuianddinamica-nui-utils.