A system description for PC calculation follows the following rules:
– A model is a set of constraints, separated by $ symbol. The last constraint must have an additional $.
<constraints>
$
$
Each constraint is made up of, in each line:
– a name, without space characters,
– zero or more unknown variables, separated by [ENTER], and the $ symbol
– zero or more known or measured variables, separated by [ENTER], and the $ symbol
– a set of one or more interpretations (equations or valid causal assignments for the variables in the constraint),
being the first variable the one that is computed assuming the remaining variables are known. One variable per line;
each equation separated by $
BNF syntax:
<model> :: =
<constraint>*[ENTER] $ [ENTER]
<constraint> ::= <name> [ENTER] <unknown> $ <known> $ <interpretation>+$
<name> ::= [a-Z|A-Z|_|0-9]+
<unknown> ::= <name>*[ENTER]
<known> ::= <name>*[ENTER]
<interpretation> ::= {<known>|<unknow>[ENTER]}+$ [ENTER]
The classical DX polybox system, made up of the following constraints:
Constraints:
(m1 A C x)
(m2 B D y)
(m3 C E z)
(a1 x y F)
(a2 y z G)
Relating x, y, z that are unknown discrete variables, and A, B, C, D, E, F, G that are known discrete variables.
For each constraint, we can have one or more assignments:
(a1 x y F) might has equation (a1 F x y) as the causal assignment F := x + y;
Or the equation (a1 x F y) as the causal assignment x := F – y;
Summarizing, the polybox system has the input model polybox.txt
To compute systems with dynamic we follow the same procedure. Only difference come from differential constraints.
They must relate only the state variable, h for instance, and its derivative, d_h for instance.
The constraint (diff1 h d_h) has two interpretations:
– (diff1_1 h d_h), to represent integral causality: h (t) := integral(h, d_h)
– (diff1_2 d_h h) , to represent derivative causality:d_ h (t) := derivative(h)
As an example, the example of one tank, with Qi a mesarued input flow, whose level LT is measured, and that is connected at the bottom
To a valve Vo, which is controlled with a PID controller with action commad, Uc, that produces an output flow Qo has the following input model tankSD.txt
A more precise description can be found here