## 2 Materials and Methods
### Design Methodology
We assumed that the rules will be saved in the JSON format, the attributes of which are as follows:sourceType--the type of attribute, parameter, or characteristic that is verified in the rule;
* sourceName--the name of this attribute;
* value--the attribute value being checked;
* targetType--the type of target attribute, parameter, or characteristic affected by the value;
* targetName--the name of the target attribute;
* impact--affects the value of the target attribute. The general format of this rule is shown below:  
\"sourceType\":  
\"material | accessories | productParam | productCharacteristic | orderParam \",  
\"sourceName\":  
\"ex. materials.name\",  
\"value\":  
\"ex. wool\",  
\"targetType\":  
\"ex. productParam\",  
\"targetName\":  
\"ex. products.pickingTime\",  
\"impact\":  
\"excluded | negative | positive | very positive\"  
In the second area of our concept (cyber world), the two data sources from the ERP system implemented within a manufacturing enterprise are distinguished: data about stock levels, which are a source of information about current production capacity and are necessary to determine whether a specific product configuration can be produced in the time indicated and production capacity, and data about products and orders. The ERP system enables the export of collected data in the form of structured files, such as.csv,.xml, or.json. for this reason, the product characteristics and customer needs can be transferred to the proposed system database. Therefore, the database contains data about real products, imported from the existing ERP system, namely:  
\[R_{pp}=\{r_{pp1},...,r_{pp1}\},1\in\mathrm{N} \tag{5}\]  
which refers to the actual product parameters. such as \(r_{pp1}\)--actual weight, \(r_{pp2}\)--actual dimensions, \(r_{pp3}\)--final shape, etc. Moreover, the database includes data about order characteristics:  
\[R_{op}=\{r_{op1},...,r_{opm}\},\mathrm{m}\in\mathrm{N} \tag{6}\]  
the actual order parameters are \(r_{op1}\)--actual selling price, including profit, \(r_{op2}\)--actual date of completion, etc. The real product is also described by:  
\[P_{comp}=\{P_{comp1},...,P_{comt}\},t\in\mathrm{N} \tag{7}\]  
where \(p_{comt}\) is the product's components. When the production is small-lot or even individual, it is difficult to clearly indicate how the selection of individual components (\(P_{comp}\)) affects the final characteristics of the final products (\(R_{pc}\)), especially if they do not have discrete values, such as the level of adjustment of the pliability of the mattress to the needs of a person with restless sleep. It is, therefore, necessary for such product characteristics to be defined by experienced experts (area: real world, Figure 1). Based on the data collected in the database and the knowledge acquired, it is possible to build a knowledge base through the use of the following methods: Natural Language Processing, and rules and stored data from an ERP system. Next, in our approach, the new algorithm will be developed for the automatic completion of orders as an integral part of a cyber-physical system for manufacturing processes operating according to the mass-customisation strategy (so-called decision support for manufacturing processes operating according to the mass-customisation strategy--Figure 1).