Module Simantics/ReverseSynchronization

This module is undocumented. This is a list of its definitions.

Synchronizable :: Variable -> Variable -> String -> String -> Synchronizable
applyReverseSynchronizations :: [Synchronizable] -> <Proc,WriteGraph> ()

Applies a list of reverse synchronization operations into the active model's configuration.

Example:

applyReverseSynchronizations (findReverseSynchronizables [])

findReverseSynchronizables :: (Resource -> <ReadGraph> [Variable]) -> (Variable -> <ReadGraph> Maybe Variable) -> [[String]] -> <Proc,ReadGraph> [Synchronizable]

Resolves all component properties that can be reverse synchronized from the active model's currently active solver state into the active model's configuration. The @Synchronizable@s resolved can then be passed on to other functions in this module for printing and application.

Reverse synchronizability of a component and its properties is left up to argument functions. The moduleFinder function looks for all synchronizable components within the model specified as argument and the experimentPropertyFilter function filters the properties that are considered reverse-synchronizable.

The @folderPaths@ argument can be used to tell the system which subfolders of the model configuration to check for reverse-synchronizable properties. For example, to specify that you want all modules contained by the root folder @Folder@ to be examined, you should just specify @[["Folder"]]@. On the other hand if you want to check only specific subfolders/drawings, you can specify them like this: @[["Folder", "Subfolder","Drawing"], ["Folder", "Subfolder 2", "Another Drawing"]]@. To examine all modules in the model configuration, the empty list @[]@ can be specified.

Examples:

findReverseSynchronizables [] findReverseSynchronizables [["Folder"]] findReverseSynchronizables [["Folder", "Subfolder", "Drawing 1"], ["Folder", "Subfolder 2", "Another Drawing"]]

formatSynchronizables :: [Synchronizable] -> <ReadGraph> String

Formats the specified list of synchronizables into a String where each line of text represents a single synchronizable in the following tab-separated format that can be directly copy-pasted into e.g. Excel:

\t\t\t\t

Example:

print (formatSynchronizables (findReverseSynchronizables []))