A new class has been added that assists in reading and
parsing YAML configuration files. See the YamlConfig
API documentation for
more details.
The tablemap and tablelist functions have changed to allow expressions to be specified for the returned value, where previously only a column value was allowed. Result expressions allow complex models to be more easily built from these simple and flexible primitives. This change is backwards compatible so that previous models will continue to work without modification.
A new table lookup function has been added. The tablerange function is similar to the lookuprange function except that it operates on data tables.
See the tablerange documentation for more details.
Several functions have been added to provide type hints to the expression parser. This is required because some forms of result expressions may not reveal their data type until they are evaluated in each row, but the data type is required for semantic analysis when the expression is first being parsed. The new type hint functions are asboolean, asint, aslist, asnumber and asstring. Functions that require type hints are typically those that accept string values that are re-parsed to specify database columns or complex expression logic (e.g. column, eval, tablelist, tablemap, tablerange).
In most situations the expression compiler will be able to deduce the semantic type of a sub-expression and type hints are not required. In the rare cases where a type hint is needed but not specified, a clear and explicit error message will be given. See the documentation for these functions for more details about situations requiring type hints and how they should be applied.
A number of improvements were made to the Patchworks Query Language improvements in support of list data types. The language is now fully regular in how lists can be manipulated and how list functions may be nested.
These changes include full support for lists within database columns as retrieved from JDBC data sources, in situations where arrays are supported in the underlying data source.
A new function has been added to allow raw string literals where special characters (such as single quotes or regular expression escape characters) do not require special handling. See the q function for more details.
Changed the ScenarioDescription.deactivateAccount(regex) method so that it returns an array containing references to the Targets objects that were deactivated. This explicitly identifies the Targets that were deactivated by this command.
This release also adds a new method to easily reactivate the targets that were previously deactivated. The ScenarioDescription.activate(savedTargets) method will activate each of the Target objects in the array that is returned. Precisely deactivating and reactivating a set of targets is as easy as
savedTargets = deactivateTarget("^(patch|ratio).*"); // other processing steps... // and later on... activate(savedTargets);
Minor changes and fixes:
Fixed a problem while locating home directories that contain an embedded space character. Previously this would cause problems while saving the Patchworks ini file, resulting in current settings not being saved.
Fixed a problem with the Control.setTreatment() method where the treatment was being applied to the wrong block in some situations.