The levels of derived numerical factors are calculated from the levels of other design factors. A variety of different operations are allowed in Synthace, when defining a derived factor, and this document outlines the different options.
Types of operations allowed
In Synthace, you can define arithmetic operations, as well as boolean evaluations. The different options available are outlined below.
Sum, subtraction, multiplication, and division can be defined by using the operators +
, -
, *
, and /
, respectively. The formulae can include factors, but also numbers, such as Factor X * 5
(Figure 1).
Figure 1. The levels of factors Liquid D
, Liquid E
, Liquid F
, and Liquid G
are set by the levels of Liquid C
and the custom factor Value
, by using the operators +
, -
, *
, and /
.
Exponentiation and logarithms (natural, base e
) are also possible, by using the operators **
and log
. To calculate a logarithm in base 10, use the log
operator in conjunction with division (Figure 2).
Figure 2. The levels of factors Liquid D
, Liquid E
, and Liquid F
are set by the levels of Liquid C
and the custom factor Value
, by using the operators **
, and log
. The base 10 logarithm can be calculated by dividing the natural logarithm of the value, with the natural logarithm of the number 10 (Liquid F
).
You can also calculate floor division (division rounded down to the nearest integer), and the remainder of a division, using //
and %
(modulus) operators (Figure 3).
Figure 3. The levels of factors Liquid D
, and Liquid E
are set by the levels of Liquid C
and the custom factor Value
, by using the operators //
and %
.
Boolean operations are also supported, and they yield true
(1
)or false
(0
) values. You can evaluate if two values are equal (==
), greater than (>
) or greater or equal (>=
) (Figure 4).
Figure 4. The levels of factors Liquid D
, Liquid E
, and Liquid F
are set by comparing the levels of Liquid C
and the custom factor Value
, by using the operators >
, >=
, ==
.
Boolean operations can be combined with arithmetic operations. Because the outputs are 0
and 1
, they can be combined to generate conditional expressions. This can be used to expand the capabilities of Mutual Exclusion (see here for more information on mutual exclusion factors).
In Figure 5, two custom factors are defined: Value
, with levels 2
and 5
, and Liquid Type
, with levels 1
and 2
. They can be used to derive how Liquids A, B, C, and D are set. In this case, Liquids A and B are always used together whenever Liquid Type
is set to 1
. The boolean statement Liquid Type == 1
is true
, so it equals 1
, and therefore the value of Liquid A
is 1 * Value
and the value of Liquid B
is 1 * Value * 10
, or 10 times higher. For runs where Liquid Type
is 2
, Liquids A and B are set to 0 (because the boolean expression is false), and Liquids C and D are used instead. This means that A and B are always used together, and never used when C and D are used, or in other words, each pair is mutually exclusive.
Figure 5. The levels of factors Liquid A
, Liquid B
, Liquid C
, and Liquid D
are defined by an expression that includes a boolean statement and arithmetic operators. These can be combined to create more complex cases, such as mutually excluding groups of liquids.
You can also use boolean statements to evaluate AND
and OR
cases. An AND
case can be evaluated using the *
or the &
operators (Figure 6), while the OR
case can be evaluated using the |
operator (Figure 7).
Figure 6. In this example, Liquid C
is only set when the levels of factors Liquid A
and Liquid B
are both set to 1
. In any other case, Liquid C
is set to 0
. This is an example of an AND
gate. Notice that the *
operator here can be replaced by &
.
Figure 7. In this example, Factor C
is set when either one or both levels of factors Liquid A
and Liquid B
are set to 1
, i.e., if Liquid A
is 1
, or if Liquid B
is 1
, or if both are 1
, Liquid C
will also be computed, in this case, it will be 1 * Value
(so either 2
or 5
). In any other case, Factor C
is set to 0
. This is an example of an OR
gate.
An exclusive OR
, or XOR
, is also possible using the operator ^
. A XOR
is a logical operation that is true if and only if its arguments differ (one is true, the other is false). In the example in figure 8, Liquid C
is only set when the values of Liquid A
and Liquid B
differ. If they are the same, the expression results in 0
, and therefore Liquid C
is not added to the mixture (Figure 8).
Figure 8. An example of the implementation of a XOR
expression, using the ^
operator.
There are a wide variety of uses for derived factors within Synthace. They can be used to implement an array of complex outcomes for your DOE.
To learn how to define a derived factor, click here.