(255h) Generating Ontology-Based Process Models Automatically
The construction of the ontology is a bootstrap from a very limited set of meta terms, consecutively implementing a hierarchical set of objects that define a superstructure of the class of processes being captured by the ontology. The result is that we can present a new approach to multi -scale multi-disciplinary representation and generation of process models.
The ontology extends with adding additional classes, attributes and relations to capture the full complexity of multi-scale, multidisciplinary process models. The relations captures the behaviour of the process models and is described by equations. The basic ideas of a network representation of controlled physical-chemical-biological models using ontologies were described in .
Having defined the above- mentioned ontology, the process of building the models is initiated by selecting attributes defined in the ontology and combine the attributes to form a set of minimal models purely based on the information captured in the ontology. We refer to these minimal model as primary models. The primary models are then to be used as building blocks of an interactive graph editor that constructs a multi-network representation where each network define time and length scales.
The primary models are connected into a structure rendering the modelled plant's behaviour. This structure describes the topology of the model and is represented by a directed graph. The nodes of the directed graph represent capacities of states of the model while the arcs represent interactions affecting the state of a capacity. An example of such interactions for physical models is the transport of mass and energy. The output from the interactive graph editor is incidence matrices representing the topology of the different states of the model, a list of nodes and a list of arcs with descriptions of which building blocks that were selected to represent each node and arc. The modelling concepts behind the directed graph were described in .
The directed graph with the building blocks provides a structure to the model including the states or interactions of states for each building block. The ontology provides the relations between the states of the building blocks in the form of equations. An equation is a recipe how to produce a value of a variable based on other variables and mathematical operators. The variable and equation relationship is implemented as a tree of other variables and mathematical operators. The modelling tool traverses the variable/equation tree to determine, using some defined rules, which equations and variables that have to be included in the final model. This selection have to be manually assisted by the user in some cases, for example, if there exist alternative equations to calculate the same property. The automatically generated executable code is based on templates for operators to the make the equations into expressions written in the syntax of the targeted language. The sequence in which the equations are calculated is determined based on variable classes identified in the ontology. The variables are implemented as vectors and matrices with the dimensionality defined by the directed graph representing the topology. Initial conditions for the states of nodes and values of constants have to be provided by the user.
The resulting executable code can be included in a simulator environment that again can be used for design or optimisation purposes. The definition of networks allows for multi-scale modelling. Each of the networks will be calculated at its scales, and a separate communication network handles the communication between different networks. This network separation facilitates for distributed computing. The modelling tool is, at is current state, able to produce executable Python code for a dynamic simulator using a simulator template and the executable implementation of the equations.
This contribution will focus on how to combine the available information from the ontology, the directed graph and the operator templates to produce executable code automatically.
1. Heinz A. Preisig, Arne Tobias Elve, Ontology construction for multi-network models, Computer Aided Chemical Engineering, Elsevier, 2016, Volume 38, Pages 1087-1092, ISSN 1570-7946, ISBN 9780444634283, http://dx.doi.org/10.1016/B978-0-444-63428-3.50186-7
2. Arne Tobias Elve & Heinz A Preisig, (2017), Graph-based Mathematical Modelling - Concepts, in âFOCAPO/CPC 2017â