Release Notes Smart 1.3.0
Home
Release Notes Download Registration |
What's new in Smart 1.3.0 Compatibility Known issues Contact Earlier release notes (separate page) What's new in Smart 1.3.0July 20, 2022The most important changes are a redesign of runtime models, new file formats for many files used by Smart, and changes to the syntax of formulas. With the new design of runtime models (DLL) overall performance of simulations is improved. It also solves many issues related to tabulars. The new file formats were necessary to solve some issues with missing (meta-) data and customization of experiment definitions. FormulasSmart now allows for chained comparisons, like in Python: e.g.0 < x < 1 .(The old style 0 < x & x < 1 still works as well.)Comparison operators cannot be used on the result of other comparisons, anymore. This feature has hardly been used, and most cases can easily be rewritten using and ( & ) and or (| ).
For the remaining cases, a new operator # (xor; exclusive or) has been introduced.From the start of Smart, the meaning of -x^y has been counter-intuitive.
It used to be defined as (-x)^y , whereas -(x^y) is more intuitive.
This more intuitive meaning is in place from now on.When checking a model that was created with Smart 1.2.8 or earlier, the use of -x^y will be flagged as a potential error.
To solve the issue, unselect option Check syntax compatibility under Preferences,
check again, and then save the model.If the old meaning was intended, please supply the necessary parentheses. Runtime model and compilation processThe interface and internals of the runtime model (DLL) have been redesigned for better performance as well as more robust use by external programs.If you want to use the DLL from another tool, please contact us for further information. For normal use inside Smart, the most important effect is better speed of simulations, especially when the model makes heavy use of tabular inputs. We found a speedup of more than a factor 5 for some models. The compilation process from the user perspective has not changed. Existing models must be compiled again before simulations can be performed with this version of Smart. This version of Smart provides a new template directory for compilation. At the start of a simulation, Smart performs more checks on compatibility of the DLL. This prevents runtime errors when a wrong DLL version is used. The DLL also includes a new check to prevent insignificant step sizes during simulation. These would cause the simulation to hang. Compilation of large models is considerably faster too. In the rare case of underlying errors during compilation, the log file is retained for inspection – and probably reporting the error. TabularsThe internal mechanism for lookup of tabular values has been optimized.Also, tabulars are directly available for output in experiments now. Therefore, there is no need any more to store copies of tabular inputs in auxiliary variables. In the process, we have solved the issue that pseudoconstants depending on tabulars were not initialized correctly. When changing the file for tabular data in an experiment, Smart prompts for changing this filename in other tabulars as well. In previous versions of Smart, the DLL was responsible for reading tabulars from file. From now on, Smart reads the data from file prior to starting the simulation. When multiple tabulars are defined in the same input file, Smart reads them all at once. In the experiment definition window, units of tabulars are now shown correctly. Experiment outputDue to the new definition of runtime models, tabulars and special state variables are now available for output as well.Initial step sizeInitial step size for variable step integration algorithms can now be customized; see Expert Options in the Run options tab.The default for new experiments is the maximum step size – it used to be the geometric mean of minimum and maximum step size. For compatibility, existing experiments are interpreted as having geometric mean for their initial step size. Example models that used this default initial step size, are available in both forms. File formatsFormats of some files have changed. The primary files (.mdl for models, .exp for experiments)
are still fully compatible with earlier versions.
But most other files have been reorganized.As a consequence, the model history of earlier versions of Smart is not available in this version. Similarly, after opening a model created with an earlier version on Smart, the experiment history is empty. You can just open any experiment, and Smart will add it to the experiment history again. Any files that differ only in file-extension are not included in the .smd file anymore.
This makes it easier to copy or rename models outside Smart.When opening a new .smd file with a previous version of Smart,
it will not recognize all information and give a warning "This model was created with version 0.99 of Smart".If you have customized which files belong to a model, you need to edit the corresponding .smd file.If you have customized the .dxp ("default experiment") file for a model,
see next section for the new custom_exp files.Experiment context (meta_exp and custom_exp) replaces default experiment (dxp)The mechanism of customizing experiment definitions was flawed. The idea was that the user can manually edit settings in the.dxp file, but this file was regenerated upon compilation.Also, some information was not present or inconsistent in .dxp files.Therefore, we have redesigned this mechanism. The new experiment context file (extension .meta_exp )
contains all experiment context derived from the model and some default settings.
This file is regenerated when the model is saved or compiled.For manual customization, there is a new optional file (extension .custom_exp ) in the same format.
Both files are processed when opening a model (and after save or compile)
to define display names, categories, and default settings of experiments in the experiment definition window.
Obsolete entries in the custom context are ignored; the user is responsible for maintaining this file for changes in the model.Definition of categories and display names is typically done in the new custom_exp files. Descriptions from the model are included in the meta_exp file, but the user can overrule these in the custom_exp file. See example model Daisy World for an example of using categories. In the new format, descriptions of components are specified separately from other component properties. Therefore, descriptions can contain commas and are not truncated anymore – their presentation in the user interface might still be truncated, though. For applications that still need the old format, there is an option under Preferences to generate the .dxp file when compiling the model.Import/exportThere were still many small errors in the mechanisms of exporting and especially importing models to/from json and xml files.The import/export mechanism has been used extensively to convert all example models from old file formats to new file formats – and cleaning up some details in the process. Import/export is not flagged as "experimental" anymore. Models and experiments are now considered changed after importing. The formats used for import/export of models and experiments have slightly changed. Importing from an old export file will give errors. ArraysArrays are not flagged as "experimental" anymore.To perform experiments with a model that uses arrays, it is still necessary to expand the model first. Compilation without expansion is on our wish list. There are still some minor issues that can be improved. None of these interfere with the functionality of arrays, though. Future versions of Smart will include further development of arrays. GeneralBecause this version of Smart stores its settings in a different format than previous versions, running this version for the first time will start with default settings and an empty model history.Entries Calibration and Sensitivity analysis have been removed from the Tools menu. They have been "not yet implemented" for a long time. Calibration needs more specific control than Smart can possibly provide. The new DLL interface makes it easier to perform calibration with an external tool. We do have ideas for sensitivity analysis, but again some aspects go beyond the potential of Smart. The plan is to provide an external runner for performing many model runs. There exist powerful tools for preparation of samples and interpretation of results. Some preferences are not stored anymore. These are typically used for debugging purposes. We consider those preferences "session only" now. Preferences that are still stored over sessions are all preferences in tab General and template and compiler directory in tab Compilation. (For technical reasons, Smart still also stores the choice of syntax.) For Black Box models, the model window now contains model name, version and date/time. When clicking on the last visible row of a grid, the grid may scroll during the click, resulting in unexpected behaviour (like processing a double click on the wrong row). This is an issue of the underlying component, which we cannot repair. All grids have been resized so that this problem will not occur in their default size. The problem might still occur after resizing a grid. Model definitionThe index variable of a tabular can now be any model component (except functions), including other tabulars.Definition of auxiliary functions by reference to an external file has been removed. It has never been operational. An alternative solution for external function definitions will be implemented in a future version. Example modelsAll example models have been saved in the new file formats. For two example models, we have expanded the names of their folders.We have checked consistency of all model definitions, especially regarding scientific units, and revised the models where necessary. Also, we have corrected many small errors in descriptions. As always, the experiments accompanying example models have been saved after generating simulation outputs. Thus, you can inspect a table or graph directly after opening an experiment. There are two new example models. Model Feeding Pattern shows a way to avoid discontinuities for essentially discontinuous (tabular) inputs. Model Water Flow is the first example model that uses arrays. It comes in two versions, one containing the arrays, and the other one where the arrays are expanded. For model Daisy World, we have included a copy without .mdl file as an example of a Black Box model.
Apart from that, the Black Box version is exactly equal to the full version.Under the hoodWhile restructuring tabulars, and implementing the new DLL interface and new file formats, many small inconsistencies were discovered and repaired.We solved many stability issues and corrected unsafe code. CompatibilityThe format of.mdl files and .exp files has not changed.
Therefore, all existing models and experiment definitions can be used with this version of Smart.However, the format of .smd files and most derived files did change.
Existing models can still be opened through their .smd file, but Smart does not include the experiment history.
After opening existing experiments, they are added to the new experiment history.To run experiments with this version of Smart, you must compile the model first. If Smart tries to run an old runtime model, it will give an appropriate error message. Any customization in .dxp files is lost.
See the section about experiment context above.Known issuesThe number of condition-formula pairs in model components is still hard coded. (Its limit has been increased to 20 in a previous version of Smart.) The list of condition-formula pairs should grow and shrink like the lists of array families and array indexes. Unfortunately, this is not a trivial change.The order of existing variables in existing graphs is not changed when they are changed in the Define Output dialog. This has been a (previously undiscovered) issue in all versions of Smart. Special state kind "Delay" is still "not yet implemented". Prints of listings and graphs do not always scale properly. Unfortunately, these are issues of underlying components, out of our control. An early version of Smart supported customization of visibility of model components. This feature has not been maintained and is possibly broken. Please remove or rename any old .cst and .prv files that accompany your models.If you find any errors not included here, please inform us. ContactFor questions and suggestions regarding Smart, please contact Mark R. Kramer (mark dot kramer at wur dot nl) of the Information Technology chair group at Wageningen University. |