Metis Smart Modeling - Rules
From Metis Documentation
(→Description) |
(→Creating a rule) |
||
Line 143: | Line 143: | ||
Rule types | Rule types | ||
+ | |||
+ | === Single selection === | ||
+ | The single selection rule tests an input and calculates the defined output based on a simple logical relation. The Input "object" can be of any type available, but the output one can only a position or a variable. If the input is set to be a variable, the its value may come directly from a field placed in a mask. The output quantity ("Q out") is determined by the input quantity ("Q in"). If they are both set to "1", then for every number of input there will be an output. On the other hand, if the "Q out" fields is set to 2, it means that for every input there will be 2 output. | ||
+ | |||
+ | {{Warning | ||
+ | | Beware that if the "Q in" field is left empty, the output will be equal to the input. The output value will always be equal to the input value, for any “Q in” value. | ||
+ | }} | ||
+ | |||
+ | A filter or limit to the execution of the rule can be set with the "Q from" and "Q to" fields by giving a scope in which the input/output relation should be executed. If the "Q from" field is left empty, this means that the rule is valid for input values greater or equal than 0. An d if the "Q to" field is also left empty, then it means that the rule is valid up to infinite input values. | ||
+ | |||
+ | {{Note | ||
+ | | Only the input value will be considered by the range filter. | ||
+ | }} | ||
+ | |||
+ | {| class="wikitable centre" width="90%" style="border-collapse: separate; border-spacing: 0; border-width: 1px; border-style: solid; border-color: grey;" | ||
+ | |- | ||
+ | ! scope=col style="border-style: solid; border-color: grey; border-width: 0 1px 1px 0" | Q in | ||
+ | ! scope=col style="border-style: solid; border-color: grey; border-width: 0 1px 1px 0" | Q out | ||
+ | ! scope=col style="border-style: solid; border-color: grey; border-width: 0 0 1px 0" | Remark | ||
+ | |- | ||
+ | | width="15%" style="border-style: solid; border-color: grey; border-width: 0 1px 1px 0" | | ||
+ | 1 | ||
+ | | width="15%" style="border-style: solid; border-color: grey; border-width: 0 1px 1px 0" | | ||
+ | 1 | ||
+ | | width="70%" style="border-style: solid; border-color: grey; border-width: 0 0 1px 0" | | ||
+ | Output will have the same quantity as Input. | ||
+ | |- | ||
+ | | width="15%" style="border-style: solid; border-color: grey; border-width: 0 1px 0 0" | | ||
+ | 5 | ||
+ | | width="15%" style="border-style: solid; border-color: grey; border-width: 0 1px 0 0" | | ||
+ | 1 | ||
+ | | width="70%" style="border-style: solid; border-color: grey; border-width: 0 0 0 0" | | ||
+ | 1 output will be added to each group of 5 units of input. | ||
+ | If Q in = 3, Q out = 1 | ||
+ | |||
+ | If Q in = 8, Q out = 2 | ||
+ | |||
+ | If Q in = 15, Q out = 3 | ||
+ | |||
+ | If the parameter ‘No Treatment of the rest' is activated, the result would be: | ||
+ | If Q in = 3, Q out = 0 | ||
+ | |||
+ | If Q in = 8, Q out = 1 | ||
+ | |||
+ | If Q in = 15, Q out = 3 | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | EXAMPLE OF USE BASED ON SCENARIO | ||
+ | |||
+ | === Table === | ||
+ | The goal is to determine an output quantity within several ranges of input values. | ||
+ | |||
+ | TABLE WITH SAMPLE VALUES | ||
+ | |||
+ | EXAMPLE OF USE BASED ON SCENARIO | ||
+ | |||
+ | === Optimal selection === | ||
+ | This very performing rule enables the automatic selection of the best alternative depending on the output quantity required and the related price. This rule is particularly appreciated in selecting products when one input corresponds to several possible output results. | ||
+ | |||
+ | Basically, the application will calculate all output as if they were "Single selection" rules and then compare all results based on the resulting price. With this result it will then chose the least expensive one as the output of the rule. | ||
+ | |||
+ | TABLE WITH SAMPLE VALUES | ||
+ | |||
+ | EXAMPLE OF USE BASED ON SCENARIO | ||
+ | |||
+ | === Maximal selection === | ||
+ | This type of rule can be used when several input values influence a specific output. Each line will be used as a single criterion and Metis will return the higher result possible. | ||
+ | |||
+ | It is particularly useful when the goal is to define a minimal number of one position in order to satisfy several criteria. | ||
+ | |||
+ | {{Note | ||
+ | | When the input quantity is not within the indicated range (Q from – Q to), the line will not be valid, thus not considered by the rule. | ||
+ | }} | ||
+ | |||
+ | TABLE WITH SAMPLE VALUES | ||
+ | |||
+ | EXAMPLE OF USE BASED ON SCENARIO | ||
+ | |||
+ | === Minimal selection === | ||
+ | This type of rule uses the same logic as the Maximal Rule, but the lowest value will be returned as an output result. | ||
+ | |||
+ | TABLE WITH SAMPLE VALUES | ||
+ | |||
+ | EXAMPLE OF USE BASED ON SCENARIO | ||
+ | |||
=== Formulas === | === Formulas === | ||
Mathematical formula | Mathematical formula | ||
Line 416: | Line 502: | ||
|} | |} | ||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
=== External === | === External === |