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
what_is_new_8_12_0 [2026/06/15 14:11]
admin
what_is_new_8_12_0 [2026/06/19 16:34] (current)
admin [11. Calculate functor family — abbreviated syntax and deprecations]
Line 1: Line 1:
 ====== Dinamica EGO — version 8.12.0 ​ ====== ====== Dinamica EGO — version 8.12.0 ​ ======
  
-Changed ​compared to version [[what_is_new_8_11_2|8.11.2]].+Changes ​compared to version [[what_is_new_8_11_2|8.11.2]]:
  
 ===== 1. Elevation Graph (new type and functors) ===== ===== 1. Elevation Graph (new type and functors) =====
Line 126: Line 126:
   * The new importer cleanly separates import **resolution and validation** from the actual importing step.   * 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.   * **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 ==== ==== 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.   * **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.   * **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.
Line 202: Line 202:
  
 ---- ----
 +===== 11. Calculate functor family — abbreviated syntax and deprecations =====
  
-===== 11. Bug fixes and minor improvements =====+  * **Abbreviated syntax remapped** — When reading and writing models, the abbreviated syntax constructs ''#​[]'',​ ''##​[]'',​ ''​%[]'',​ and ''​$[]''​ now always map to ''​CalculateMap'',​ ''​CalculateCategoricalMap'',​ ''​CalculateLookupTableValues'',​ and ''​CalculateValue''​ respectively — instead of mapping to their legacy ''​*2''​ counterparts as before. 
 +  * **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 ''​Calculate''​ family 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'',​ and ''​CalculateValue2''​. 
 + 
 +==== Example: traditional syntax ​==== 
 + 
 +<code java> 
 +// 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; 
 +}}; 
 +</​code>​ 
 + 
 +==== Example: equivalent abbreviated syntax ==== 
 + 
 +<code java> 
 +// 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; 
 +</​code>​ 
 + 
 +==== 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. 
 + 
 +---- 
 +===== 12. Bug fixes and minor improvements =====
  
   * **CalculatePythonExpression** — fixed a problem where packages whose install path contained a space could not be installed.   * **CalculatePythonExpression** — fixed a problem where packages whose install path contained a space could not be installed.
Line 213: Line 256:
   * **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.   * **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.   * **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.
   * Documentation comments for non-obvious constructs were improved; typos were corrected.   * Documentation comments for non-obvious constructs were improved; typos were corrected.
   * Code cleanup: removed unnecessary convoluted constructs and unused properties.   * Code cleanup: removed unnecessary convoluted constructs and unused properties.
  
 ---- ----
 +===== 13. Dependency update =====
  
-===== 12. 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''​.
- +
-  * **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''​. +