Metis Smart Modeling - Rules
From Metis Documentation
m (Text replace - "MSQ" to "Metis Smart Quotes") |
(→Formulas) |
||
Line 1: | Line 1: | ||
- | + | In the Metis Smart Suite, a Rule is a determinate method for performing a logical or mathematical operation and obtaining a certain result which is the building block of the modeling concept(configurator). It is based on a simple structure and logic which can be used in an endless number of cases and will suit most of the requirements for material and service configuration. | |
+ | |||
+ | |||
== What is a rule? == | == What is a rule? == | ||
+ | |||
[[Image:Model_Exec_3.png|thumb|upright=0.5|alt=Metis Smart Quote Rule Execution Description|Metis Smart Quote Rule Execution Description]] | [[Image:Model_Exec_3.png|thumb|upright=0.5|alt=Metis Smart Quote Rule Execution Description|Metis Smart Quote Rule Execution Description]] | ||
- | a | + | Based on the [[Metis_Smart_Modeling_-_Models|model]] execution scheme, rules fit inside of [[Metis_Smart_Modeling_-_Group_of_Rules|group of rules]] in Metis. They are the logical part of the execution process. As described in the [[Metis_Smart_Modeling_-_Models|model]] section, once a [[Metis_Smart_Modeling_-_Group_of_Rules|group of rules]] is executed, all [[Metis_Smart_Modeling_-_Variables|variables]] are instantiated and only after this the rules are executed. In opposition to groups of rules inside a [[Metis_Smart_Modeling_-_Models|model]], rules don't have a specific order in which they are executed. The execution of Rules is done in parallel. As pictured on the right, the execution of a rule first tests if the rule should be run by testing if the defined filter can be validated. If the test is OK then the process moves to the rule or formula itself. If and only if that steps produces an output the process then moves to the addition of add-ons. Those can be seen as dependencies of the result of the rule or formula. Throughout the execution, the values used in fields input are taken from the Group of rules in which the Rule is currently being executed. |
- | |||
- | + | [[File:MetisSmartModelingSCRulesDef2.PNG|center|706x860px]] | |
- | A rule | + | A rule is typically made out of three different parts which can work together : |
- | + | ||
- | + | ||
- | + | ||
- | + | 1. '''Description''' : Main information regarding the rule. | |
- | {| class="wikitable centre" width=" | + | |
+ | {| class="wikitable centre" width="100%" style="border-collapse: separate; border-spacing: 0; border-width: 1px; border-style: solid; border-color: transparent; background-color : transparent;" | ||
+ | | width="20%" style="vertical-align: top; background-color : transparent; border-style: solid; border-color: transparent; border-width: 0 1px 1px 0" | | ||
+ | ''Type'' | ||
+ | | width="80%" style="vertical-align: top; background-color : transparent; border-style: solid; border-color: transparent; border-width: 0 0 1px 0" | | ||
+ | Allows to define the type rule will take and modify the 'Formula' part of the rule. (mandatory) | ||
|- | |- | ||
- | + | | width="20%" style="vertical-align: top; background-color : transparent; border-style: solid; border-color: transparent; border-width: 0 1px 1px 0" | | |
- | + | ''ID'' | |
- | + | | width="80%" style="vertical-align: top; background-color : transparent; border-style: solid; border-color: transparent; border-width: 0 0 1px 0" | | |
+ | Once the rule has been saved, the ID field will automatically completed by Metis Smart Modeling. The generated identification code is unique worldwide and can be useful for searching for a rule or debugging it, if necessary. (mandatory, but generated automatically upon validation) | ||
|- | |- | ||
- | | width=" | + | | width="20%" style="vertical-align: top; background-color : transparent; border-style: solid; border-color: transparent; border-width: 0 1px 1px 0" | |
- | '' | + | ''Comment'' |
- | | width=" | + | | width="80%" style="vertical-align: top; background-color : transparent; border-style: solid; border-color: transparent; border-width: 0 0 1px 0" | |
- | + | When creating a new rule, the user must enter a comment, or short description, that will be displayed on reports and lists. (mandatory) | |
- | + | ||
- | + | ||
|- | |- | ||
- | | width=" | + | | width="20%" style="vertical-align: top; background-color : transparent; border-style: solid; border-color: transparent; border-width: 0 1px 1px 0" | |
- | '' | + | ''Description'' |
- | | width=" | + | | width="80%" style="vertical-align: top; background-color : transparent; border-style: solid; border-color: transparent; border-width: 0 0 1px 0" | |
- | + | A long description ca be given to all rules defined within Metis Smart Modeling. This helps explain what the Rule does. | |
- | + | ||
- | + | ||
|- | |- | ||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
| width="20%" style="vertical-align: top; background-color : transparent; border-style: solid; border-color: transparent; border-width: 0 1px 1px 0" | | | width="20%" style="vertical-align: top; background-color : transparent; border-style: solid; border-color: transparent; border-width: 0 1px 1px 0" | | ||
- | '' | + | ''Round output down'' |
| width="80%" style="vertical-align: top; background-color : transparent; border-style: solid; border-color: transparent; border-width: 0 0 1px 0" | | | width="80%" style="vertical-align: top; background-color : transparent; border-style: solid; border-color: transparent; border-width: 0 0 1px 0" | | ||
- | If this | + | If this check-box is ticked, any fractions of output resulting from a rule will not be taken into account. This means that the result will only be composed of whole units. This applies in particular when using a formula based rule. |
|- | |- | ||
| width="20%" style="vertical-align: top; background-color : transparent; border-style: solid; border-color: transparent; border-width: 0 1px 1px 0" | | | width="20%" style="vertical-align: top; background-color : transparent; border-style: solid; border-color: transparent; border-width: 0 1px 1px 0" | | ||
- | '' | + | ''Mandatory External Control (Offer)'' |
| width="80%" style="vertical-align: top; background-color : transparent; border-style: solid; border-color: transparent; border-width: 0 0 1px 0" | | | width="80%" style="vertical-align: top; background-color : transparent; border-style: solid; border-color: transparent; border-width: 0 0 1px 0" | | ||
- | + | Mandatory Controls, implied by the presence of a system name, are considered to be applied on the offer level. The influence in Metis Smart Quotes is that it will still be possible to view and print offer documents for the Metis Smart Quotes end user until an external configurator control can be performed. There is no icon to represent the Mandatory Control applied on the offer level. | |
|- | |- | ||
| width="20%" style="vertical-align: top; background-color : transparent; border-style: solid; border-color: transparent; border-width: 0 1px 1px 0" | | | width="20%" style="vertical-align: top; background-color : transparent; border-style: solid; border-color: transparent; border-width: 0 1px 1px 0" | | ||
- | '' | + | ''Mandatory External Control (Order)'' |
| width="80%" style="vertical-align: top; background-color : transparent; border-style: solid; border-color: transparent; border-width: 0 0 1px 0" | | | width="80%" style="vertical-align: top; background-color : transparent; border-style: solid; border-color: transparent; border-width: 0 0 1px 0" | | ||
- | + | Mandatory Controls, implied by the presence of a system name, are considered to be applied on the order level. The influence in Metis Smart Quotes is that the ordering process will be blocked for the Metis Smart Quotes end user until an external configurator control can be performed, but it will still be possible to view and print offer documents. There is no icon to represent the Mandatory Control applied on the order level. | |
|- | |- | ||
| width="20%" style="vertical-align: top; background-color : transparent; border-style: solid; border-color: transparent; border-width: 0 1px 0 0" | | | width="20%" style="vertical-align: top; background-color : transparent; border-style: solid; border-color: transparent; border-width: 0 1px 0 0" | | ||
- | '' | + | ''Mandatory Internal Control (Offer)'' |
| width="80%" style="vertical-align: top; background-color : transparent; border-style: solid; border-color: transparent; border-width: 0 0 0 0" | | | width="80%" style="vertical-align: top; background-color : transparent; border-style: solid; border-color: transparent; border-width: 0 0 0 0" | | ||
- | + | Mandatory Control intended for [[Metis_Smart_Modeling_-_Systems|systems]] which do not have system names. They require Metis Smart Quotes end users to perform a mandatory control of [[Metis_Smart_Modeling_-_Systems|system]] configuration. The mandatory controls of [[Metis_Smart_Modeling_-_Systems|systems]] will have to be performed manually by a specifically authorized user as opposed to being handled by an external configurator like Mandatory External Control. It will be applied on the offer level. It is basically the same as the Mandatory Internal Control (Order) with the added restriction that it will not be possible for the end user to view and print offer documents. | |
|- | |- | ||
- | | | + | | width="20%" style="vertical-align: top; background-color : transparent; border-style: solid; border-color: transparent; border-width: 0 1px 1px 0" | |
- | + | ''Mandatory Internal Control (Order)'' | |
- | + | | width="80%" style="vertical-align: top; background-color : transparent; border-style: solid; border-color: transparent; border-width: 0 0 1px 0" | | |
- | {| class="wikitable centre" width=" | + | Mandatory Controls intended for [[Metis_Smart_Modeling_-_Systems|systems]] which do not have system names. Similar to the above Mandatory Control, they also require Metis Smart Quotes end users to perform a mandatory control of the [[Metis_Smart_Modeling_-_Systems|system]] configuration. The mandatory controls of [[Metis_Smart_Modeling_-_Systems|systems]] will have to be performed manually by an specifically authorized user as opposed to being handled by an external configurator like Mandatory External Control. Will be applied on the order level, meaning that the ordering process will be blocked for the Metis Smart Quotes end user until a manual control can be performed. It will still be possible for the end user to view and print offer documents, however. |
+ | |- | ||
+ | | colspan="2" width="80%" style="vertical-align: top; background-color : white; border-style: solid; border-color: transparent; border-width: 0 0 0 0" | | ||
+ | {| class="wikitable centre" width="100%" 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" | | ! scope=col style="border-style: solid; border-color: grey; border-width: 0 1px 1px 0" | | ||
- | ! scope=col style="border-style: solid; border-color: grey; border-width: 0 1px 1px 0" | ''' | + | ! scope=col style="border-style: solid; border-color: grey; border-width: 0 1px 1px 0" | '''External Controls''' (ProductName) |
- | ! scope=col style="border-style: solid; border-color: grey; border-width: 0 0 1px 0" | ''' | + | ! scope=col style="border-style: solid; border-color: grey; border-width: 0 0 1px 0" | '''Internal Controls''' (no ProductName) |
|- | |- | ||
| width="20%" style="border-style: solid; border-color: grey; border-width: 0 1px 1px 0" | | | width="20%" style="border-style: solid; border-color: grey; border-width: 0 1px 1px 0" | | ||
Line 125: | Line 81: | ||
| width="40%" style="border-style: solid; border-color: grey; border-width: 0 0 0 0" | | | width="40%" style="border-style: solid; border-color: grey; border-width: 0 0 0 0" | | ||
Ordering process and Document Generation blocked until manual control has been competed. | Ordering process and Document Generation blocked until manual control has been competed. | ||
+ | |- | ||
+ | |} | ||
|- | |- | ||
|} | |} | ||
Line 130: | Line 88: | ||
{{Note | {{Note | ||
- | | Whether the | + | | Whether the Mandatory Internal Control has been set on the order level or offer level, there will be no difference in the display in QSBW. The same small yellow icon will be displayed for either one. |
}} | }} | ||
{{Note | {{Note | ||
- | | Only one type of | + | | Only one type of Mandatory Internal Control can be active on a rule at a time. |
}} | }} | ||
{{Note | {{Note | ||
- | | The | + | | The Mandatory External Control (Offer) and a Mandatory Internal Control can be active on the same rule at the same time. However, Mandatory Internal Controls will not have any influence on a [[Metis_Smart_Modeling_-_Systems|system]] which has a system name. [[Metis_Smart_Modeling_-_Systems|Systems]] which have a [[Metis_Smart_Modeling_-_Systems|system]] name will only take into account whether or not the White Flag (Offer) has been applied. Conversely, the White Flag (Offer) setting will have no influence on [[Metis_Smart_Modeling_-_Systems|systems]] which do not have a system name. |
}} | }} | ||
- | + | ||
- | Enabling the rule only under specific conditions | + | 2. '''Filter''' : Part of the rule which allow to configure the circumstances in which the rule is valid and should be executed by the application. Enabling the rule only under specific conditions |
- | The Variable Filter validates the rule according to variables, products, or groups of variables. | + | The Variable Filter validates the rule according to [[Metis_Smart_Modeling_-_Variables|variables]], products, or [[Metis_Smart_Modeling_-_Variables|groups of variables]]. |
To select a new variable, select a line and click to enter. Give the name, or part of the name of your parameter or a space to select all and click “ENTER.” | To select a new variable, select a line and click to enter. Give the name, or part of the name of your parameter or a space to select all and click “ENTER.” | ||
- | + | ||
- | Setting up the rule, | + | 3. '''Formula''' : It is the logical or mathematical part of a rule. Setting up the rule, please refer to the various formula types for detailed description of how to setup each of them. |
{{Note | {{Note | ||
- | | When specifying output, | + | | When specifying output, users only have the choice between “Product” and “Variable”, as it is not possible to set the value of a [[Metis_Smart_Modeling_-_Variables|group of variables]] or an [[Metis_Smart_Modeling_-_Attributes|attribute]]. |
}} | }} | ||
- | |||
- | |||
+ | 4. '''Add-On's'''' : Based on the result provided by the Formula part, a rule can be set-up to add implied positions or define new values in [[Metis_Smart_Modeling_-_Variables|variables]]. Additional results from the rule based on the result of the "formula" | ||
{{Note | {{Note | ||
- | | When specifying output, you will only have the choice between “Product” and “Variable”, as it is not possible to set the value of a group of variables or an [[ | + | | When specifying output, you will only have the choice between “Product” and “Variable”, as it is not possible to set the value of a [[Metis_Smart_Modeling_-_Variables|group of variables]] or an [[Metis_Smart_Modeling_-_Attributes|attribute]]. |
+ | }} | ||
+ | |||
+ | |||
+ | A rule may use the following items in its different parts : | ||
+ | |||
+ | {| 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" | Object | ||
+ | ! scope=col style="border-style: solid; border-color: grey; border-width: 0 1px 1px 0" | Icons | ||
+ | ! scope=col style="border-style: solid; border-color: grey; border-width: 0 0 1px 0" | Description | ||
+ | |- | ||
+ | | width="15%" style="border-style: solid; border-color: grey; border-width: 0 1px 1px 0" | | ||
+ | '''Positions''' | ||
+ | | width="5%" style="text-align:center; border-style: solid; border-color: grey; border-width: 0 1px 1px 0" | | ||
+ | [[File:MetisSmartModelingPositionIcon.png|link=]] | ||
+ | | width="80%" style="border-style: solid; border-color: grey; border-width: 0 0 1px 0" | | ||
+ | material and service '''Positions''' (input and output) can be used as a parameter (taking into account the quantity) or as output (setting the quantity through the execution of the formula) | ||
+ | |- | ||
+ | | width="15%" style="border-style: solid; border-color: grey; border-width: 0 1px 1px 0" | | ||
+ | '''[[Metis_Smart_Modeling_-_Attributes|Attributes]]''' | ||
+ | | width="5%" style="text-align:center; border-style: solid; border-color: grey; border-width: 0 1px 1px 0" | | ||
+ | () | ||
+ | | width="80%" style="border-style: solid; border-color: grey; border-width: 0 0 1px 0" | | ||
+ | (input only) [[Metis_Smart_Modeling_-_Attributes|attributes]] values added-up over the complete offer can be used as input for rules | ||
+ | |- | ||
+ | | width="15%" style="border-style: solid; border-color: grey; border-width: 0 1px 1px 0" | | ||
+ | '''[[Metis_Smart_Modeling_-_Variables|Variables]]''' | ||
+ | | width="5%" style="text-align:center; border-style: solid; border-color: grey; border-width: 0 1px 1px 0" | | ||
+ | [[File:MetisSmartModelingVariableIcon.png|link=]] | ||
+ | | width="80%" style="border-style: solid; border-color: grey; border-width: 0 0 1px 0" | | ||
+ | (input and output) can be used as a parameter in the filter and formula part of a rule (taking into account its value) or as an output in the formula or add-on part of a rule (the obtained value will be set to the variable) | ||
+ | |- | ||
+ | | width="15%" style="border-style: solid; border-color: grey; border-width: 0 1px 0 0" | | ||
+ | '''[[Metis_Smart_Modeling_-_Variables|Group of variables]]''' | ||
+ | | width="5%" style="text-align:center; border-style: solid; border-color: grey; border-width: 0 1px 0 0" | | ||
+ | [[File:MetisSmartModelingVariableGroupIcon.png|link=]] | ||
+ | | width="80%" style="border-style: solid; border-color: grey; border-width: 0 0 0 0" | | ||
+ | (input only) can be used as a parameter in the filter and formula part of a rule (taking into account the sum of all the positions and [[Metis_Smart_Modeling_-_Variables|variables]] it includes) | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | |||
+ | Because rules are essentially based on value given to [[Metis_Smart_Modeling_-_Variables|variables]] and /or positions, most of the numerical information which needs to be given when defining a rule is placed quantity fields: | ||
+ | |||
+ | |||
+ | {| 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" | Value | ||
+ | ! scope=col style="border-style: solid; border-color: grey; border-width: 0 0 1px 0" | Description | ||
+ | |- | ||
+ | | width="20%" style="border-style: solid; border-color: grey; border-width: 0 1px 1px 0" | | ||
+ | '''Q from''' | ||
+ | | width="80%" style="border-style: solid; border-color: grey; border-width: 0 0 1px 0" | | ||
+ | The value set in this field will define the lower limit for which the rule is valid and should be executed. For example, if the '''Q in''' value is 6 and that the "Q from" value is 5, then the rule will provide an output. The "Q from" value can also be considered as a base value for the [[Metis_Smart_Modeling_-_Systems|system]] in which the [[Metis_Smart_Modeling_-_Models|model]] is used. | ||
+ | |- | ||
+ | | width="20%" style="border-style: solid; border-color: grey; border-width: 0 1px 1px 0" | | ||
+ | '''Q to''' | ||
+ | | width="80%" style="border-style: solid; border-color: grey; border-width: 0 0 1px 0" | | ||
+ | The value set in this field will define the upper limit for which the rule is valid and should be executed. For example, if the '''Q in''' value is 6 and that the "Q to" value is 4, then the rule will not provide an output. | ||
+ | |- | ||
+ | | width="20%" style="border-style: solid; border-color: grey; border-width: 0 1px 1px 0" | | ||
+ | '''Q in''' | ||
+ | | width="80%" style="border-style: solid; border-color: grey; border-width: 0 0 1px 0" | | ||
+ | The value set in this field will define | ||
+ | |- | ||
+ | | width="20%" style="border-style: solid; border-color: grey; border-width: 0 1px 0 0" | | ||
+ | '''Q out''' | ||
+ | | width="80%" style="border-style: solid; border-color: grey; border-width: 0 0 0 0" | | ||
+ | The value set in this field will define | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | |||
+ | {{Warning | ||
+ | | [[Metis_Smart_Modeling_-_Attributes|Attributes]] do not hold any values in material [[Metis_Smart_Modeling_-_Models|models]], as in Rules their value is calculated based on a list of material and that this list is only available when the execution of the model is completed. | ||
}} | }} | ||
- | + | == Rule types == | |
Rules which can be configured in Metis are divided into 7 categories: | Rules which can be configured in Metis are divided into 7 categories: | ||
Line 193: | Line 225: | ||
[[File:MetisSmartModelingRuleOptimal.PNG|link=]] | [[File:MetisSmartModelingRuleOptimal.PNG|link=]] | ||
| width="80%" style="border-style: solid; border-color: grey; border-width: 0 0 1px 0" | | | width="80%" style="border-style: solid; border-color: grey; border-width: 0 0 1px 0" | | ||
- | [[#Optimal_Selection| | + | The goal of an [[#Optimal_Selection|optimal rule]] is to automatically select of the best alternative depending on the input quantity required and the related price. |
|- | |- | ||
| width="15%" style="border-style: solid; border-color: grey; border-width: 0 1px 1px 0" | | | width="15%" style="border-style: solid; border-color: grey; border-width: 0 1px 1px 0" | | ||
Line 200: | Line 232: | ||
[[File:MetisSmartModelingRuleMaximal.PNG|link=]] | [[File:MetisSmartModelingRuleMaximal.PNG|link=]] | ||
| width="80%" style="border-style: solid; border-color: grey; border-width: 0 0 1px 0" | | | width="80%" style="border-style: solid; border-color: grey; border-width: 0 0 1px 0" | | ||
- | [[#Maximal_Selection| | + | In [[#Maximal_Selection|this type]] of rule each line will be used as a single criterion and Metis will return the lowest result possible. |
|- | |- | ||
| width="15%" style="border-style: solid; border-color: grey; border-width: 0 1px 1px 0" | | | width="15%" style="border-style: solid; border-color: grey; border-width: 0 1px 1px 0" | | ||
Line 207: | Line 239: | ||
[[File:MetisSmartModelingRuleMinimal.PNG|link=]] | [[File:MetisSmartModelingRuleMinimal.PNG|link=]] | ||
| width="80%" style="border-style: solid; border-color: grey; border-width: 0 0 1px 0" | | | width="80%" style="border-style: solid; border-color: grey; border-width: 0 0 1px 0" | | ||
- | [[#Minimal_Selection| | + | In [[#Minimal_Selection|this type]] of rule each line will be used as a single criterion and Metis will return the lowest result possible. |
|- | |- | ||
| width="15%" style="border-style: solid; border-color: grey; border-width: 0 1px 1px 0" | | | width="15%" style="border-style: solid; border-color: grey; border-width: 0 1px 1px 0" | | ||
Line 226: | Line 258: | ||
- | { | + | {{Warning |
- | | | + | | Changing the type of an existing rule will not reset its content (filter, inputs, outputs and add-ons). Be careful when doing such changes and review all parts of the rule before saving it. Metis Smart Modeling will discard all changes which do not apply to the new type when validating then in the rule edition window. The change cannot be reverted. |
- | + | }} | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | The | + | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | 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 be a position or a variable. If the input is set to be a variable, its value may come directly from a field placed in a mask or a default value. The output quantity ( | + | === 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 be a position or a variable. If the input is set to be a variable, its value may come directly from a field placed in a [[Metis_Smart_Modeling_-_Masks|mask]] or a default value. 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. | ||
+ | |||
+ | |||
+ | [[File:MetisSmartModelingSCRuleSingle.PNG|center|700x600px]] | ||
{{Warning | {{Warning | ||
- | | Beware that if the | + | | 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. |
}} | }} | ||
+ | |||
+ | |||
+ | In certain case their could be a 'start' value for the output provided by the rule. For example a motherboard is generally already equipped with multiple USB ports, in this case lets say 4. Based on the result of the execution, the required number of ports could be 6. s the base of the 'system' being modeled already '''includes''' 4, the result of the rule should be 1. This value could then be used in another Group of rules to define an expansion card for the system. The '''Q included''' field allows to define the value that is already available in the model. | ||
{{Note | {{Note | ||
- | | If the | + | | If the '''Q from''' field is left empty, this means ‘from 0'. If the '''Q to''' field is left empty, this means “up to ∞” (or > 999'999'999). |
}} | }} | ||
- | |||
- | |||
- | |||
Line 274: | Line 288: | ||
| Only the input value will be considered by the range filter. | | Only the input value will be considered by the range filter. | ||
}} | }} | ||
+ | |||
+ | |||
+ | In the “Modeling” menu, make sure that the “Rules” sub-menu has been selected. | ||
+ | On the left, in the “Groups of rules” dropdown list, select “D-Basic Hardware.” | ||
+ | Click on add [[File:MetisSmartModelingPLUSButton.PNG|link=]]. A window opens where the new rule will be created. | ||
+ | In the “Type” field, select “Single” from the dropdown list. In the “comment” field, enter a name for the rule, for example, “Configure Memory.” | ||
+ | The goal of this example rule is to generate the number of memory modules required based on the desired quantity of memory provided in a [[Metis_Smart_Modeling_-_Masks|mask]]. | ||
+ | Click on the add button near the “input” field. A window opens where it is possible to select positions, [[Metis_Smart_Modeling_-_Variables|variables]], and [[Metis_Smart_Modeling_-_Attributes|attributes]]. Select “[[Metis_Smart_Modeling_-_Variables|variables]]”. | ||
+ | Select “$Memory” from the list and confirm. | ||
+ | Click on the add button near the “Output” field. The same window from before opens, but it is only possible to select positions or [[Metis_Smart_Modeling_-_Variables|variables]]. In this example a position is added. | ||
+ | In the description field, enter “ddr” and click on filter. | ||
+ | Select “DDR2 1GB” from the list and confirm. | ||
+ | In the field '''Q in''' enter the value “1.” | ||
+ | To test this new rule, click on the “test” button. | ||
+ | The test window opens. | ||
+ | In the “test value” field for “$Memory” enter “4.” | ||
+ | Click on the test button. The results appear below. | ||
+ | In this example the result value is also “4” because '''Q in''' and '''Q out''' were both set to “1.” | ||
+ | Close the test window. | ||
+ | Now click on confirm to save the rule. It now appears in the list of rules. | ||
+ | |||
{| class="wikitable centre" width="90%" style="border-collapse: separate; border-spacing: 0; border-width: 1px; border-style: solid; border-color: grey;" | {| 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 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 1px 1px 0" | '''Q out''' |
! scope=col style="border-style: solid; border-color: grey; border-width: 0 0 1px 0" | Remark | ! scope=col style="border-style: solid; border-color: grey; border-width: 0 0 1px 0" | Remark | ||
|- | |- | ||
Line 310: | Line 345: | ||
|} | |} | ||
- | |||
- | ==== Table Selection | + | {{Video |
- | The goal is to determine an output quantity within several ranges of input values. | + | | <mediaplayer width='400' height='300' image='http://www.xpert-technologies.ch/mediawikidev/images/c/c8/VID_Creating_a_single_rule.PNG'>File:Creating_a_single_rule_OK.mp4</mediaplayer> |
+ | | Definition of a single rule within Metis Smart Modeling. | ||
+ | }} | ||
+ | |||
+ | === Table Selection=== | ||
+ | |||
+ | The goal is to determine an output quantity within several ranges of input values. The rule allows to enter several '''Q from''' and '''Q to''' to determine those ranges. They each then induce a specific '''Q out''' which will be used as a quantity for the output. | ||
+ | |||
+ | |||
+ | [[File:MetisSmartModelingSCRuleTable.PNG|center|700x600px]] | ||
+ | |||
+ | |||
+ | In the “Modeling” menu, make sure to select the “rules” sub-menu. | ||
+ | To create a new rule, first select an existing [[Metis_Smart_Modeling_-_Group_of_Rules|group of rules]] from the drop down list. For example, “s-basic enhancements.” | ||
+ | Then click on the “Add” button [[File:MetisSmartModelingPLUSButton.PNG|link=]]. A window opens where the rule will be created. | ||
+ | In the “Type” field, select “table.” | ||
+ | In this particular example, a condition is first set to execute the rule only if a variable has a value greater than 0. | ||
+ | Then, an output quantity will depend upon an input value entered in a [[Metis_Smart_Modeling_-_Masks|mask]]. | ||
+ | In the “comment” field, enter “Define RAID Type.” | ||
+ | Additional comments can be entered in the box below the “comment” field if desired. | ||
+ | Click on the “add” button [[File:MetisSmartModelingPLUSButton.PNG|link=]] for the “filter” section. | ||
+ | A new window opens. It is possible to add positions, [[Metis_Smart_Modeling_-_Variables|variables]] or [[Metis_Smart_Modeling_-_Attributes|attributes]]. Select “[[Metis_Smart_Modeling_-_Variables|variables]]”. | ||
+ | In the [[Metis_Smart_Modeling_-_Variables|variables]] list, select “$HasRAID.” Then click on confirm. | ||
+ | The variable is now added to the filter variable table. | ||
+ | In the “filter [[Metis_Smart_Modeling_-_Variables|variables]]” section, change the “Condition” to “greater than.” | ||
+ | The main part of the rule is shown by the blue and red colored sections in the middle of the window, where the inputs and outputs can be entered. | ||
+ | The purpose of this rule is to determine which RAID configuration will be setup in the [[Metis_Smart_Modeling_-_Systems|system]] based on the selection done in a [[Metis_Smart_Modeling_-_Masks|mask]]. | ||
+ | |||
+ | To do so, click on the “add” button [[File:MetisSmartModelingPLUSButton.PNG|link=]] for the “Input” section. | ||
+ | The same window from before opens. Select “[[Metis_Smart_Modeling_-_Variables|variables]]” and select “$RAID_Type” from the list. | ||
+ | Click on confirm. The variable is added to the input field. | ||
+ | Click on the “add” button [[File:MetisSmartModelingPLUSButton.PNG|link=]] for the “output” section. | ||
+ | The same window from before opens. Select “[[Metis_Smart_Modeling_-_Variables|variables]].” | ||
+ | Select “$NB_HDD” from the list and confirm to continue. The variable is added to the output field. | ||
+ | The requirement for this rule is that for a RAID configuration with a value of 0 or 1, the number of disks must be 2, hence why '''Q out''' is set to 2. With a value anywhere from 2 to 10, the number of disks must be 3, hence '''Q out''' is set to "3". | ||
+ | Therefore, under the Q fields, in the first field, Set '''Q from''' to “0,” '''Q to''' to “1” and '''Q out''' to “2.” | ||
+ | In the second field, set '''Q from''' to “2,” '''Q to''' to “10,” and '''Q out''' to “3.” | ||
+ | Please note, that although it is not displayed the value “0” for '''Q from''' has indeed been saved. | ||
+ | The rule can now be tested. | ||
+ | Click on the “Test” button found at the top. A test window opens. | ||
+ | Enter “1” in the “Test value” column for both the “$HasRAID” and “$RAID_Type” fields. | ||
+ | Click on the “Test” button. | ||
+ | In the table below the “test” button, the results appear. | ||
+ | The result for the “$NB_HDD” variable is 2. | ||
+ | Now change the test value for “$Raid_Type” to “5” and click on test again. | ||
+ | Notice the result is now “3” for the “$NB_HDD” variable. | ||
+ | Close the test window and then confirm to save the new rule. | ||
+ | |||
{| class="wikitable centre" width="90%" style="border-collapse: separate; border-spacing: 0; border-width: 1px; border-style: solid; border-color: grey;" | {| 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 from | + | ! scope=col style="border-style: solid; border-color: grey; border-width: 0 1px 1px 0" | '''Q from''' |
- | ! scope=col style="border-style: solid; border-color: grey; border-width: 0 1px 1px 0" | Q to | + | ! scope=col style="border-style: solid; border-color: grey; border-width: 0 1px 1px 0" | '''Q to''' |
- | ! 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 1px 1px 0" | '''Q out''' |
! scope=col style="border-style: solid; border-color: grey; border-width: 0 0 1px 0" | Remark | ! scope=col style="border-style: solid; border-color: grey; border-width: 0 0 1px 0" | Remark | ||
|- | |- | ||
Line 342: | Line 423: | ||
|} | |} | ||
- | |||
- | === | + | {{Video |
- | + | | <mediaplayer width='400' height='300' image='http://www.xpert-technologies.ch/mediawikidev/images/6/66/VID_Creating_a_table_rule.PNG'>File:Creating_a_Table_Rule_OK.mp4</mediaplayer> | |
+ | | Definition of a table rule within Metis Smart Modeling. | ||
+ | }} | ||
- | This | + | |
- | + | === 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. | 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. | ||
+ | |||
+ | |||
+ | [[File:MetisSmartModelingSCRuleOptimal.PNG|center|700x600px]] | ||
+ | |||
+ | |||
+ | In the “Modeling” menu, make sure that the “Rules” sub-menu has been selected. | ||
+ | On the left, in the “Groups of rules” dropdown list, select “Server Software 2.” | ||
+ | Click on the "Add" button [[File:MetisSmartModelingPLUSButton.PNG|link=]]. A window opens where the new rule will be created. | ||
+ | In the “Type” field, select “Optimal” from the dropdown list. In the “comment” field, enter a name for the rule, for example “determine best license package.” | ||
+ | Click on the add button near the “input” field. A window opens where it is possible to select positions, [[Metis_Smart_Modeling_-_Variables|variables]], and [[Metis_Smart_Modeling_-_Attributes|attributes]]. Select “[[Metis_Smart_Modeling_-_Variables|variables]]”. | ||
+ | In the list below, select “$NB_Licences.” Click on confirm. | ||
+ | Click on the add button near the '''Q in''' field. The same window from before opens, but it is only possible to select positions or [[Metis_Smart_Modeling_-_Variables|variables]]. In this example a position is added. | ||
+ | In the description field, enter “cal” and then click on filter. | ||
+ | From the results, select the position “Windows Server 2008 CAL 1x” and then click on confirm. | ||
+ | Repeat the previous steps, but this time select “Windows Server 2008 CAL 5x” and click on confirm. | ||
+ | In '''Q in''' field for “Windows Server 2008 CAL 5x” set the value to “5.” | ||
+ | Click on the add button near '''Q in''' once again. | ||
+ | Repeat the previous steps and select the “Windows Server 2008 CAL 25x” position and click on confirm. | ||
+ | Enter “25” in the '''Q in''' field for “Windows Server 2008 CAL 25x” | ||
+ | The rule now states that based on the number of licenses, various solutions are possible. When executed, the rule looks up the prices of the various outputs to determine the cheapest and most suitable option. | ||
+ | To test this new rule, click on the “test” button. | ||
+ | The test window opens. Enter “10” in the “test value” cell and click on the “Test” button. | ||
+ | The results are shown below. Now enter “23” and click on “test.” | ||
+ | Close the test window. Click on confirm to save the rule. It now appears in the list of rules. | ||
+ | |||
+ | |||
{| class="wikitable centre" width="90%" style="border-collapse: separate; border-spacing: 0; border-width: 1px; border-style: solid; border-color: grey;" | {| 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 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 1px 1px 0" | '''Q out''' |
! scope=col style="border-style: solid; border-color: grey; border-width: 0 0 1px 0" | Remark | ! scope=col style="border-style: solid; border-color: grey; border-width: 0 0 1px 0" | Remark | ||
|- | |- | ||
Line 367: | Line 476: | ||
| width="70%" style="border-style: solid; border-color: grey; border-width: 0 0 1px 0" | | | width="70%" style="border-style: solid; border-color: grey; border-width: 0 0 1px 0" | | ||
If the number of analogue ports needed is 30, the best configuration for the customer is to have 1 module with 24 ports and 1 with 8 ports. | If the number of analogue ports needed is 30, the best configuration for the customer is to have 1 module with 24 ports and 1 with 8 ports. | ||
- | If the number of analogue ports needed is 35, | + | If the number of analogue ports needed is 35, Metis will control which configuration would be the best for the customer between 1 x 24 + 2 x 8 and 2 x 24. The least expensive solution will be preferred and set as output. |
|- | |- | ||
| width="15%" style="border-style: solid; border-color: grey; border-width: 0 1px 0 0" | | | width="15%" style="border-style: solid; border-color: grey; border-width: 0 1px 0 0" | | ||
Line 374: | Line 483: | ||
1 for each | 1 for each | ||
| width="70%" style="border-style: solid; border-color: grey; border-width: 0 0 0 0" | | | width="70%" style="border-style: solid; border-color: grey; border-width: 0 0 0 0" | | ||
- | If the number of licenses needed is 850, | + | If the number of licenses needed is 850, Metis will test the different possibilities and select the cheapest one: |
* 8 x 100 + 50 x 1 | * 8 x 100 + 50 x 1 | ||
* 9 x 100 | * 9 x 100 | ||
Line 381: | Line 490: | ||
|} | |} | ||
- | |||
- | + | {{Note | |
- | + | | As the optimal rule is a 'sequence' of single rules, the '''Q included''' field works as described above. | |
+ | }} | ||
- | |||
- | 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. | + | {{Video |
+ | | <mediaplayer width='400' height='300' image='http://www.xpert-technologies.ch/mediawikidev/images/0/0a/VID_Creating_an_optimal_rule.PNG'>File:Creating_an_optimal_rule_OK.mp4</mediaplayer> | ||
+ | | Definition of an optimal rule within Metis Smart Modeling. | ||
+ | }} | ||
+ | |||
+ | === 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 highest result possible. It is particularly useful when the goal is to define a minimal number of one position in order to satisfy several criteria. 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. | ||
+ | |||
+ | |||
+ | [[File:MetisSmartModelingSCRuleMaximal.PNG|center|700x600px]] | ||
+ | |||
+ | |||
+ | In the “Modeling” menu, make sure that the “Rules” sub-menu has been selected. | ||
+ | On the left, in the “Groups of rules” dropdown list, select “Server Software 1.” | ||
+ | Click on the "Add" button [[File:MetisSmartModelingPLUSButton.PNG|link=]]. A window opens where the new rule will be created. | ||
+ | In the “Type” field, select “Maximal” from the dropdown list. In the “comment” field, enter a name for the rule, for example “Determine number of MS licenses.” | ||
+ | Click on the "Add" button [[File:MetisSmartModelingPLUSButton.PNG|link=]] near the “input” field. A window opens where it is possible to select positions, [[Metis_Smart_Modeling_-_Variables|variables]], and [[Metis_Smart_Modeling_-_Attributes|attributes]]. | ||
+ | Select “[[Metis_Smart_Modeling_-_Variables|variables]]”. | ||
+ | Select “$NB_Users” from the list and confirm. | ||
+ | Repeat the previous steps, but this time select the variable “$NB_Mailboxes” from the list and click on confirm. | ||
+ | Click on the "Add" button [[File:MetisSmartModelingPLUSButton.PNG|link=]] near the “Output” field. | ||
+ | The same window from before opens, but it is only possible to select positions or [[Metis_Smart_Modeling_-_Variables|variables]]. | ||
+ | Select “[[Metis_Smart_Modeling_-_Variables|variables]]”. | ||
+ | Select “$NB_Licences” from the list and confirm. | ||
+ | To test this new rule, click on the “test” button. | ||
+ | The test window opens. | ||
+ | In the “test value” field for “$NB_Users” enter “25.” For “$NB_Mailboxes” enter “50.” | ||
+ | Click on the test button. The results appear below. | ||
+ | The purpose of the maximal rule is to output the maximum value found amongst several input values. This explains why the output value is “50” in this specific example. | ||
+ | Close the test window. | ||
+ | Click on confirm to save the rule. It now appears in the list of rules. | ||
+ | |||
{{Note | {{Note | ||
- | | If the | + | | If the '''Q from''' field is left empty, this means ‘from 0'. If the '''Q to''' field is left empty, this means “up to ∞” (or > 999'999'999). |
}} | }} | ||
- | + | {| 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 0 0" | | ||
+ | 25 and 50 | ||
+ | | width="15%" style="border-style: solid; border-color: grey; border-width: 0 1px 0 0" | | ||
+ | 50 | ||
+ | | width="70%" style="border-style: solid; border-color: grey; border-width: 0 0 0 0" | | ||
+ | In this case the result is equal to the highest test value given. | ||
+ | |- | ||
+ | |} | ||
- | + | {{Video | |
+ | | <mediaplayer width='400' height='300' image='http://www.xpert-technologies.ch/mediawikidev/images/3/3d/VID_Creating_a_maximal_rule.PNG'>File:Creating_a_maximal_rule_OK.mp4</mediaplayer> | ||
+ | | Definition of a maximal rule within Metis Smart Modeling. | ||
+ | }} | ||
+ | |||
+ | |||
+ | |||
+ | === 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. | This type of rule uses the same logic as the Maximal Rule, but the lowest value will be returned as an output result. | ||
{{Note | {{Note | ||
- | | If the | + | | If the '''Q from''' field is left empty, this means ‘from 0'. If the '''Q to''' field is left empty, this means “up to ∞” (or > 999'999'999). |
}} | }} | ||
- | + | In the “Modeling” menu, make sure that the “Rules” sub-menu has been selected. | |
+ | On the left, in the “Groups of rules” drop-down list, select “Server Software 1.” | ||
+ | Click on the "Add" button [[File:MetisSmartModelingPLUSButton.PNG|link=]]. A window opens where the new rule will be created. | ||
+ | In the “Type” field, select “Maximal” from the drop-down list. In the “comment” field, enter a name for the rule, for example “Determine number of MS licenses.” | ||
+ | Click on the "Add" button [[File:MetisSmartModelingPLUSButton.PNG|link=]] near the “input” field. A window opens where it is possible to select positions, [[Metis_Smart_Modeling_-_Variables|variables]], and [[Metis_Smart_Modeling_-_Attributes|attributes]]. | ||
+ | Select “[[Metis_Smart_Modeling_-_Variables|variables]]”. | ||
+ | Select “$NB_Users” from the list and confirm. | ||
+ | Repeat the previous steps, but this time select the [[Metis_Smart_Modeling_-_Variables|variable]] “$NB_Mailboxes” from the list and click on confirm. | ||
+ | Click on the "Add" button [[File:MetisSmartModelingPLUSButton.PNG|link=]] near the “Output” field. | ||
+ | The same window from before opens, but it is only possible to select positions or [[Metis_Smart_Modeling_-_Variables|variables]]. | ||
+ | Select “[[Metis_Smart_Modeling_-_Variables|variables]]”. | ||
+ | Select “$NB_Licences” from the list and confirm. | ||
+ | To test this new rule, click on the “test” button. | ||
+ | The test window opens. | ||
+ | In the “test value” field for “$NB_Users” enter “25.” For “$NB_Mailboxes” enter “50.” | ||
+ | Click on the test button. The results appear below. | ||
+ | The purpose of the maximal rule is to output the maximum value found amongst several input values. This explains why the output value is “50” in this specific example. | ||
+ | Close the test window. | ||
+ | Click on confirm to save the rule. It now appears in the list of rules. | ||
- | |||
- | |||
- | |||
- | In some cases, the previous rules categories are not sufficient for a suitable result. The formula rules may be very helpful in calculating services associated to certain equipment. | + | {| 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 0 0" | | ||
+ | 25 and 50 | ||
+ | | width="15%" style="border-style: solid; border-color: grey; border-width: 0 1px 0 0" | | ||
+ | 25 | ||
+ | | width="70%" style="border-style: solid; border-color: grey; border-width: 0 0 0 0" | | ||
+ | In this case the result is equal to the lowest test value given. | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | |||
+ | See Maximal Rule for example of how to use this type of rule. | ||
+ | |||
+ | |||
+ | |||
+ | === Formulas === | ||
+ | |||
+ | In some cases, the previous rules categories are not sufficient for a suitable result. The mathematical formula rules may be very helpful in calculating services associated to certain equipment. | ||
+ | |||
+ | |||
+ | [[File:MetisSmartModelingSCRuleFormula.PNG|center|700x600px]] | ||
+ | |||
+ | |||
+ | In the “Modeling” menu, make sure that the “Rules” sub-menu has been selected. | ||
+ | On the left, in the “Groups of rules” dropdown list, select “Shipping.” | ||
+ | Click on the "Add" button [[File:MetisSmartModelingPLUSButton.PNG|link=]]. A window opens where the new rule will be created. | ||
+ | In the “Type” field, select “Formula” from the dropdown list. In the “comment” field, enter “Shipping.” | ||
+ | Click on the "Add" button [[File:MetisSmartModelingPLUSButton.PNG|link=]] near the “input” field. A window opens where it is possible to select positions, [[Metis_Smart_Modeling_-_Variables|variables]], and [[Metis_Smart_Modeling_-_Attributes|attributes]]. Select “[[Metis_Smart_Modeling_-_Attributes|Attributes]].” | ||
+ | Select “weight” and click on confirm. | ||
+ | Click on the "Add" button [[File:MetisSmartModelingPLUSButton.PNG|link=]] again. Select “[[Metis_Smart_Modeling_-_Variables|variables]]”. Search for the [[Metis_Smart_Modeling_-_Variables|variable]] “$Shipping_Type.” Select it and click on confirm. | ||
+ | Click on the add button near the “Output” field. Search for the “shipping and handling” position. Select it and click on confirm. | ||
+ | In the “Quantity =” field, enter the following formula “(Var1*Var2)/2" | ||
+ | To test this new rule, click on the “test” button. | ||
+ | The test window opens. | ||
+ | In the “test value” field for “weight” enter “12.” For “$Shipping_type” enter “3.” | ||
+ | Click on the test button. The results appear below. The formula is applied. | ||
+ | Note: The result of the formula is rounded if the result is not a whole number. | ||
+ | Close the test window. | ||
+ | Click on confirm to save the rule. It now appears in the list of rules. | ||
+ | |||
+ | |||
+ | |||
+ | {| 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 0 0" | | ||
+ | 13 and 2 | ||
+ | | width="15%" style="border-style: solid; border-color: grey; border-width: 0 1px 0 0" | | ||
+ | 18 | ||
+ | | width="70%" style="border-style: solid; border-color: grey; border-width: 0 0 0 0" | | ||
+ | Based on the formula used in the example below : | ||
+ | |||
+ | ''(Var1*Var2)/2'' | ||
+ | |||
+ | The result with those input values is 18. | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | |||
+ | {{Video | ||
+ | | <mediaplayer width='400' height='300' image='http://www.xpert-technologies.ch/mediawikidev/images/1/14/VID_Creating_a_formula_based_rule.PNG'>File:Creating_a_formula_based_rule_OK.mp4</mediaplayer> | ||
+ | | Definition of a formula based rule within Metis Smart Modeling. | ||
+ | }} | ||
+ | |||
The main mathematical functions that may be used in rules are described in the table below: | The main mathematical functions that may be used in rules are described in the table below: | ||
Line 457: | Line 702: | ||
0.5 and 0.99: the number is rounded to 1. For example, 3.7 is rounded to 4 (no decimal). | 0.5 and 0.99: the number is rounded to 1. For example, 3.7 is rounded to 4 (no decimal). | ||
+ | |- | ||
+ | | width="20%" style="border-style: solid; border-color: grey; border-width: 0 1px 1px 0" | | ||
+ | '''RoundUp''' | ||
+ | | width="30%" style="border-style: solid; border-color: grey; border-width: 0 1px 1px 0" | | ||
+ | Calculates the upward rounded value of a numeric value according to the specified number of decimal. | ||
+ | | width="50%" style="border-style: solid; border-color: grey; border-width: 0 0 1px 0" | | ||
+ | <Result> = Roundup(<Numeric Value> [,<Number of Decimals>]) | ||
+ | |||
+ | '''Parameter Details''' | ||
+ | |||
+ | <Result>: Integer or real rounded value of the specified numeric value. | ||
+ | <Numeric Value>: Real or currency numeric value to round. We recommend that you use the currency type in order to get reliable results. | ||
+ | |||
+ | '''Numeric Value''' | ||
+ | If <Numeric Value> is included between: | ||
+ | |||
+ | 0 and 0.99: the number is rounded up to 1. For example, 3.7 is rounded to 4 (no decimal). | ||
+ | |- | ||
+ | | width="20%" style="border-style: solid; border-color: grey; border-width: 0 1px 1px 0" | | ||
+ | '''RoundDown''' | ||
+ | | width="30%" style="border-style: solid; border-color: grey; border-width: 0 1px 1px 0" | | ||
+ | Calculates the downward rounded value of a numeric value according to the specified number of decimal. | ||
+ | | width="50%" style="border-style: solid; border-color: grey; border-width: 0 0 1px 0" | | ||
+ | <Result> = Rounddown(<Numeric Value> [,<Number of Decimals>]) | ||
+ | |||
+ | '''Parameter Details''' | ||
+ | |||
+ | <Result>: Integer or real rounded value of the specified numeric value. | ||
+ | <Numeric Value>: Real or currency numeric value to round. We recommend that you use the currency type in order to get reliable results. | ||
+ | |||
+ | '''Numeric Value''' | ||
+ | If <Numeric Value> is included between: | ||
+ | |||
+ | 0 et 0.49: the number is rounded to 0. For example, 3.2 is rounded to 3 (no decimal). | ||
|- | |- | ||
| width="20%" style="border-style: solid; border-color: grey; border-width: 0 1px 1px 0" | | | width="20%" style="border-style: solid; border-color: grey; border-width: 0 1px 1px 0" | | ||
Line 690: | Line 969: | ||
<Angle>: Integer or real angle (in degrees) to use. | <Angle>: Integer or real angle (in degrees) to use. | ||
|- | |- | ||
- | | width="20%" style="border-style: solid; border-color: grey; border-width: 0 1px | + | | width="20%" style="border-style: solid; border-color: grey; border-width: 0 1px 0 0" | |
'''Tangent''' | '''Tangent''' | ||
- | | width="30%" style="border-style: solid; border-color: grey; border-width: 0 1px | + | | width="30%" style="border-style: solid; border-color: grey; border-width: 0 1px 0 0" | |
Calculates the angle tangent | Calculates the angle tangent | ||
- | | width="50%" style="border-style: solid; border-color: grey; border-width: 0 0 | + | | width="50%" style="border-style: solid; border-color: grey; border-width: 0 0 0 0" | |
<Result> = Tangent(<Angle>) | <Result> = Tangent(<Angle>) | ||
Line 702: | Line 981: | ||
<Angle>: Integer or real angle (in degrees) to use. An error occurs if this parameter is set to 90°, -90°, 270° or -270°. | <Angle>: Integer or real angle (in degrees) to use. An error occurs if this parameter is set to 90°, -90°, 270° or -270°. | ||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
|- | |- | ||
|} | |} | ||
- | + | === External Selection=== | |
+ | |||
For very complex rules, an external file might be used to implement them in Metis Smart Modeling. The purpose of this rule type is to allow the development of algorithms which may not be handled in Metis. The file linked to such rule should a compiled program which can be started by providing at least one parameter and which returns '''only one''' value. This file can be searched through the External File Name button on the right. In order for a new file to be displayed in that list it has to be "imported" through the ... . | For very complex rules, an external file might be used to implement them in Metis Smart Modeling. The purpose of this rule type is to allow the development of algorithms which may not be handled in Metis. The file linked to such rule should a compiled program which can be started by providing at least one parameter and which returns '''only one''' value. This file can be searched through the External File Name button on the right. In order for a new file to be displayed in that list it has to be "imported" through the ... . | ||
- | |||
- | === | + | In the “Modeling” menu, make sure that the “Rules” sub-menu has been selected. |
+ | On the left, in the “Groups of rules” dropdown list, select “D-Basic Hardware.” | ||
+ | Click on the "Add" button [[File:MetisSmartModelingPLUSButton.PNG|link=]]. A window opens where the new rule will be created. | ||
+ | In the “Type” field, select “External” from the dropdown list. In the “comment” field, enter a name for the rule. For example, “Total Service Time.” | ||
+ | The goal of this example rule is to provide two inputs to an external program. The program will then sum up the value of the inputs and provide the output to a [[Metis_Smart_Modeling_-_Variables|variable]]. | ||
+ | Click on the "Add" button [[File:MetisSmartModelingPLUSButton.PNG|link=]] near the “input” field. A window opens where it is possible to select positions, [[Metis_Smart_Modeling_-_Variables|variables]], and [[Metis_Smart_Modeling_-_Attributes|attributes]]. Select “[[Metis_Smart_Modeling_-_Attributes|Attributes]]”. | ||
+ | Select “Installation time” from the list and confirm. | ||
+ | Repeat the same steps, but this time select “Project management” from the list. | ||
+ | Note: It is very important that the order in which the parameters are listed in the table is the same as within the external program. | ||
+ | Click on the "Add" button [[File:MetisSmartModelingPLUSButton.PNG|link=]] near the “Output” field. The same window from before opens, but it is only possible to select positions or [[Metis_Smart_Modeling_-_Variables|variables]]. In this example a position is added. Select “[[Metis_Smart_Modeling_-_Variables|variables]]”. | ||
+ | Search for the [[Metis_Smart_Modeling_-_Variables|variable]] “$Service.” Select it and then confirm. | ||
+ | In the “Input” section, click on the icon next to the “External File Name” field. | ||
+ | A window opens. Click on the "Add" button [[File:MetisSmartModelingPLUSButton.PNG|link=]]. The “select a file…” window opens. | ||
+ | For this example the file “ADD.exe” is added. Make sure that the “Add.exe” file is selected and then click on confirm to continue. | ||
+ | To test this new rule, click on the “test” button.The test window opens. | ||
+ | In the “test value” field for “Installation Time” enter “12.” For “Project Management,” enter “4.” | ||
+ | Click on the test button. The results appear below. The external program has summed up both input values. | ||
+ | Close the test window. Click on confirm to save the rule. It now appears in the list of rules. | ||
- | All rules which have been created in Metis Smart Modeling can be tested in various ways, either on their own or as part of the group they belong. This section of the manual will focus on testing a rule by itself, for more information about other tests please refer to | + | |
+ | |||
+ | {| 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 0 0" | | ||
+ | 12 and 4 | ||
+ | | width="15%" style="border-style: solid; border-color: grey; border-width: 0 1px 0 0" | | ||
+ | 16 | ||
+ | | width="70%" style="border-style: solid; border-color: grey; border-width: 0 0 0 0" | | ||
+ | Based on the external program used in the example below, which simply adds up to numbers : | ||
+ | |||
+ | ''Var1+Var2'' | ||
+ | |||
+ | The result with those input values is 16. | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | |||
+ | {{Video | ||
+ | | <mediaplayer width='400' height='300' image='http://www.xpert-technologies.ch/mediawikidev/images/e/ec/VID_CreatingExternalRule.PNG'>File:Creating_an_External_Rule_OK.mp4</mediaplayer> | ||
+ | | Definition of an external rule within Metis Smart Modeling. | ||
+ | }} | ||
+ | |||
+ | |||
+ | {{Note | ||
+ | | The external application which is executed when running an external rule can be written in any programming language as long as it is configured to accept one or more input [[Metis_Smart_Modeling_-_Variables|variables]] and only one output. Common consideration for executing the application are not supported by Xpert Technologies SA. | ||
+ | }} | ||
+ | |||
+ | == Testing rules == | ||
+ | |||
+ | All rules which have been created in Metis Smart Modeling can be tested in various ways, either on their own or as part of the group they belong. This section of the manual will focus on testing a rule by itself, for more information about other tests please refer to [[Description_of_the_Sub-Menu_Check_Rules|Checking Rules]]. | ||
INPUT VALUES (Filter and input) | INPUT VALUES (Filter and input) | ||
Line 728: | Line 1,051: | ||
- | + | {{Note | |
+ | | The "program" which is used for an external rule should be executable on its own, meaning that the related execution environment or libraries should be accessible on the machine where Metis Smart Suite in installed. | ||
+ | }} | ||
+ | {{Video | ||
+ | | <mediaplayer width='400' height='300' image='http://www.xpert-technologies.ch/mediawikidev/images/8/84/VID_Testing_rules_and_Group_of_rules.PNG'>File:Testing rules and groups of rules OK.mp4</mediaplayer> | ||
+ | | Testing rules and [[Metis_Smart_Modeling_-_Group_of_Rules|group of rules]]. | ||
+ | }} | ||
Line 741: | Line 1,070: | ||
| Because some products may not be available for specific variants, the testing window allows to set a preferred "Variant" for the current test. Thus the result will take into account the selection. | | Because some products may not be available for specific variants, the testing window allows to set a preferred "Variant" for the current test. Thus the result will take into account the selection. | ||
}} | }} | ||
+ | |||
+ | |||
== Structuring rules together == | == Structuring rules together == | ||
- | |||
- | + | One simple example to described the importance of planning in advance the structure of the rules within a group or the groups themselves is in the scope of the configuration of a computer is the calculation of the memory modules required. One way to accommodate this situation is to let the user input the requested amount of memory he would like to have configured in his machine. | |
- | + | The first rule will determine the number of 1 GB modules required to suit his needs. For example the input is 4 GB and the result is 4 modules of 1 GB each. The situation would be more complicated if the user had chosen 8 GB and that the machine could only hold 4 modules in total. This means that the [[Metis_Smart_Modeling_-_Models|model]] requires a second rule to check the number of 1 GB module against the number of slots available. In the example of a input equal to 8, the resulting number of modules is 8. The second rule could then take this value and modify the result to 2 GB modules thus making it possible to be installed on the machine. | |
- | + | Because in this situation the second needs to have the result of the first one available in order to use it has an input it is necessary that second be placed in another [[Metis_Smart_Modeling_-_Group_of_Rules|group of rules]] which should be executed after the one containing the first rule. | |
- | |||
{{Note | {{Note | ||
- | | On the main rule screen, listing all rules within a single group, they can be sorted. This functionality is only a visual help for the user. Based on the execution scheme of models, sorting rule within a group doesn't have any effect on the result of the group. If rule need to be executed a sequential order, then they should be placed in sequential groups. | + | | On the main rule screen, listing all rules within a single group, they can be sorted. This functionality is only a visual help for the user. Based on the execution scheme of [[Metis_Smart_Modeling_-_Models|models]], sorting rule within a group doesn't have any effect on the result of the group. If rule need to be executed a sequential order, then they should be placed in sequential groups. |
}} | }} | ||
+ | |||
+ | |||
+ | |||
+ | == Advanced rules search == | ||
+ | |||
+ | From the main rules screen in Metis Smart Modeling, the Advanced Search button brings up a window allowing to refine the search for rules. | ||
+ | |||
+ | |||
+ | [[File:MetisSmartModelingSCRuleAdvSearch.PNG|center|850x860px]] | ||
+ | |||
+ | |||
+ | * '''ID''' : Search for a rule directly by entering its identification number. | ||
+ | |||
+ | * '''Comment''' : Search for a rule by entering the "Comment" (name) of a rule. | ||
+ | |||
+ | * '''Mandatory Control''' : Refine to search to rule which enforce mandatory controls. | ||
+ | |||
+ | * '''Contain Item''' : By using the ADD button [[File:MetisSmartModelingAddButton.PNG|link=]] search for rules which contain a specific position, variable or [[Metis_Smart_Modeling_-_Attributes|attribute]]. Using the '''Used as''' options it is possible to refine how this object is used in the rule looked for. Either as a filter, an add-on value or as input or output values. In the case of objects being used in the rule itself, the application allows to specify exactly where it is used in the rule. | ||
+ | ** ''Rule Input or Output'' : Object used either as an input or an output of a rule. | ||
+ | ** ''Rule Input only'' : Object used only as an input of a rule. | ||
+ | ** ''Rule Output only'' : Object used only as an output of a rule. | ||
+ | ** ''Not used as Input or Output'' : Object used neither as an input nor an output of a rule. | ||
+ | |||
+ | By clicking on the "search" button, the search is executed and the results (if any) is displayed in the table on the right of the window. Double-clicking on a listed rule will open it and allow for modifications and testing. | ||
+ | |||
+ | |||
+ | {{Note | ||
+ | | The comment field doesn't enforce capitalization. | ||
+ | }} | ||
+ | |||
+ | |||
== Modifying a rule == | == Modifying a rule == | ||
- | + | ||
+ | In the “Modeling” menu, make sure that the “Rules” sub-menu has been selected. On the left, in the “Groups of rules” drop-down list, select the appropriate group where the rule to be edited is stored. Select the rule and click on the EDIT button [[File:MetisSmartModelingEditButton.PNG|link=]], the rule definition window opens up and modifications can be applied. Validation is required in order to save all changes made to the rule. Please refer to the individual rule type description for additional information on configuring a valid rule. | ||
+ | |||
+ | |||
+ | {{Note | ||
+ | | If modifications are applied to a rule which is used in several groups, keep in mind that changes will be have an influence on all groups or [[Metis_Smart_Modeling_-_Models|models]] in which this rule is used. It may be relevant to make a copy of the rule in order to test the modifications. | ||
+ | }} | ||
+ | |||
+ | |||
+ | === Duplicating a rule === | ||
+ | |||
+ | In the “Modeling” menu, make sure that the “Rules” sub-menu has been selected. On the left, in the “Groups of rules” drop-down list, select the appropriate group where the rule to be duplicated is stored. Select the rule and click on the DUPLICATE button [[File:MetisSmartModelingDuplicateButton.PNG|link=]], the rule is immediately copied and placed in the selected [[Metis_Smart_Modeling_-_Group_of_Rules|group of rules]]. It is an exact copy, or duplicate, of the original one. It can then be edited to fit all requirements or moved to another group. | ||
+ | |||
+ | |||
+ | {{Note | ||
+ | | A duplicated rule is an entirely new rule. All modifications applied to the original or the duplicate will not be reciprocated to the other one. | ||
+ | }} | ||
+ | |||
+ | |||
+ | |||
+ | === Moving a rule to another group of rules=== | ||
+ | |||
+ | In the “Modeling” menu, make sure that the “Rules” sub-menu has been selected. On the left, in the “Groups of rules” drop-down list, select the appropriate group where the rule to be moved is stored. Select the rule and click on the MOVE button [[File:MetisSmartModelingMoveButton.PNG|link=]], a new window opens where the target [[Metis_Smart_Modeling_-_Group_of_Rules|group of rule]] can be selected from the complete list of groups available in Metis Smart Modeling. Once the [[Metis_Smart_Modeling_-_Group_of_Rules|group of rules]] selected, validation is required in order to save all changes made to the rule. | ||
+ | |||
+ | |||
+ | [[File:MetisSmartModelingSCRulesMove.PNG|center|300x500px|link=]] | ||
+ | |||
+ | |||
+ | {{Note | ||
+ | | Moving a rule doesn't create a copy of it, neither an additional link. It really moves it from one [[Metis_Smart_Modeling_-_Group_of_Rules|group of rules]] to another. | ||
+ | }} | ||
+ | |||
+ | |||
+ | |||
+ | === Linking a rule with another group of rules=== | ||
+ | |||
+ | In the “Modeling” menu, make sure that the “Rules” sub-menu has been selected. On the left, in the “Groups of rules” drop-down list, select the appropriate group where the rule to be linked to other group(s) of rule is located. Select the rule and click on the LINK button [[File:MetisSmartModelingLinkButton.PNG|link=]], a window opens up where a target [[Metis_Smart_Modeling_-_Group_of_Rules|group of rules]] can be selected from a drop-down list to set the [[Metis_Smart_Modeling_-_Group_of_Rules|group of rules]] where the selected rule should be applied. Once selected, validation is required in order to save all changes made to the rule. | ||
+ | |||
+ | |||
+ | {{Note | ||
+ | | Linking a rule to more than one [[Metis_Smart_Modeling_-_Group_of_Rules|group of rules]], doesn't copy the rule inside that group. It is still identified through one ID. | ||
+ | }} | ||
+ | |||
+ | |||
+ | {{Note | ||
+ | | Changes applied to one occurrence of a rule linked in several groups will have an impact on all those groups. | ||
+ | }} | ||
+ | |||
+ | |||
+ | To check in which groups of rules a rule is used (linked), select the rule for which a verification should be done and click on the "Currently used by" button [[File:MetisSmartModelingCurrentlyUsedByButton.PNG|link=]]. A window will open displaying all groups of rules, [[Metis_Smart_Modeling_-_Models|models]] and [[Metis_Smart_Modeling_-_Systems|systems]] to which the selected rule is linked. Please refer here for more information. | ||
+ | |||
+ | |||
== Deleting a rule == | == Deleting a rule == | ||
- | + | ||
+ | In the “Modeling” menu, make sure that the “Rules” sub-menu has been selected. On the left, in the “Groups of rules” drop-down list, select the appropriate group where the rule to be edited is stored. Select the rule and click on the DELETE button [[File:MetisSmartModelingDeleteButton.PNG|link=]]. This opens a small window requesting to confirm the deletion of the selected rule. Once confirmed it will be definitively deleted from the selected [[Metis_Smart_Modeling_-_Group_of_Rules|group of rules]]. | ||
+ | |||
+ | |||
+ | {{Note | ||
+ | | When the same rule is used in more then one [[Metis_Smart_Modeling_-_Group_of_Rules|group of rules]], Metis Smart Modeling will open a window showing a list of all groups in which the rule is linked. It is then possible to either delete the rule form all groups or select the group form which it should be deleted. | ||
+ | |||
+ | |||
+ | [[File:MetisSmartModelingSCRulesDel.PNG|center|300x500px|link=]] | ||
+ | |||
+ | }} | ||
+ | |||
+ | |||
+ | {{Warning | ||
+ | | Extra care should be taken when deleting a rule which produces an output which will afterwards be used as an input for another rule in a [[Metis_Smart_Modeling_-_Group_of_Rules|group of rules]] following the current one. This will result in wrong results at the end of the execution scheme. | ||
+ | }} |