A New Approach to the Allocation of Multidimensional Resources in Production Processes

: Modern technologies in the ﬁeld of automation, robotics and IT have signiﬁcantly changed the face of modern production systems. In particular, the use of AVG, PLC, mobile robots, RFID, IoT, etc. results in modern production processes being characterized by, among others, shortened production cycles and supply chains, reduced production costs, increased product quality and reliability, etc. Moreover, the application of these technologies requires a new deﬁnition and methods of using production resources. Most often these are resources that are characterized by many functionalities, the so-called multidimensional resources, which can be conﬁgured, remotely controlled, updated, etc., and their use in many cases enables the self-optimization and self-organization of the production system. The article presents the problem of allocation and control of multidimensional resources in production processes. The proprietary formal model of the problem is proposed, as well as how to use it in both proactive and reactive modes. A procedure for reducing the size of the modeled problem is also proposed, the use of which enables a two-fold reduction in the number of constraints and even a ﬁfty-fold reduction in the number of decision variables of the proposed model. This results in an almost hundredfold reduction in computation time for the considered data instances. An original hybrid approach is used to implement the model, which enables the integration of mathematical programming (MP) and programming in constrained logic (CLP). Model data and parameters have been saved as facts.


Introduction
The modern economy is characterized by high competitiveness of producers and distributors, global supply chains, fast capital flow, high degree of automation and robotization, etc. On the other hand, an individual approach to the customer and his/her needs is required. All this means that producers and distributors from high-wage countries are under constant pressure to adjust production to the changing and individual customer requirements while minimizing costs, especially labor costs.
The first problem they have to solve is the dichotomy between the scale and scope of production resulting from the diverse needs of customers. Due to the constant increase in labor costs, investments in new technologies and the need to shorten production cycles, it is difficult to be competitive in terms of price and assortment at the same time. This is due to the fact that the economy of scale is based on the production of a large number of products with little diversity, while the economy of scope focuses on providing customized products. Another emerging problem is a clear contradiction between planning and value orientation in production [1]. An answer to the above problems can be the emergence of self-optimization and self-organization production systems. Such systems offer the potential of enhancing flexibility, productivity and reliability of production. The abovementioned solutions, together with modern technologies such as cyber-physical systems,

Problem Description
The production systems consisting of various manufacturing cells/workstations (w) with any form of production organization (job-shop, flow-shop, open-shop, multi-project, etc.) [17,18] are considered. The single manufacturing cell/workstation [19] can process more than one task/job in parallel. The number of parallel tasks is specified by the SAw parameter. The production system processes a set of tasks/jobs that can be organized as orders or projects (p). The orders/projects implementation schedule is given, which includes the time of their implementation and the sequence of execution. The schedule does not include assignments of jobs/tasks of orders/projects to manufacturing cells/workstations. Additional resources (m) are needed to complete the orders/projects. In the discussed problem, these are the so-called multidimensional resources.
These resources are characterized by the fact that they can have many functionalities (f). Furthermore, these functionalities can be changed or supplemented, which enables the configuration and adjustment of a given resource. Examples of such resources are PLCs with dedicated software, tool magazines with specialized tools, as well as employees with their competencies, etc. On the other hand, similarly to classic resources, they are limited and have an assigned cost of their use, which may depend on the functionality used.
In the systems under consideration, we also take into account the unavailability of certain resources and/or their functionalities. The unavailability of resources is modeled by introducing the parameter (u) defining the so-called state of unavailability. For example, the state u1 = {m1, m3} specifies that the resources m1 and m3 are unavailable, u2 = {m5} that the resource m5 is unavailable, etc.
In the described manufacturing system, three levels can be logically distinguished: the level of additional multidimensional resources, the level of manufacturing cells/workstations and the level of orders/projects. This division is schematically shown in Figure 1. The most important questions that arise in the context of controlling, configuring and allocating multidimensional resources are: • Are there sufficient multidimensional resources to perform a given set of orders/projects according to a given schedule? (Q_1) The use of configurable multidimensional resources in the production system gives the possibility to increase the flexibility of the system under consideration, including through its self-organization and self-optimization. This, in turn, can improve the system's resistance to external factors, reduce production costs, shorten production cycles, etc.
The most important questions that arise in the context of controlling, configuring and allocating multidimensional resources are:

•
Are there sufficient multidimensional resources to perform a given set of orders/projects according to a given schedule? (Q_1) • What and how many multidimensional resources and with what functionalities are missing to perform a set of orders/projects according to a given schedule? (Q_2) • Is it possible to complete a set of orders/projects according to a given schedule when the specific multidimensional resource is unavailable? (Q_3) • Which projects should be implemented and how (with what resources) to maximize the profit? (Q_4) • How should a set of multidimensional resources be configured to perform a set of tasks according to a given schedule in the absence of any resource? (Q_5) Finding answers to the above questions is crucial in the context of the implementation of a given set of orders/projects in accordance with the imposed conditions.
As can be seen, individual questions are of different nature. On the one hand, these are general questions (Q_1, Q_3) and specific questions (Q_2, Q_4, Q_5). On the other hand, they are reactive (Q_1, Q_2, Q_4) or proactive (Q_5). Question Q_3 can be asked in both forms.
Obtaining proactivity is achieved thanks to the appropriate selection and configuration of a set of multidimensional resources, which allows for keeping the production schedule regardless of the lack of availability of the resource or its functionality.
Specifically with respect to question Q_5, such a configuration guarantees the execution of a set of orders/projects according to the schedule when some resources or functionalities are unavailable. In this way, a given schedule is resistant to resource unavailability.

Model of the Allocation and Control of Multidimensional Resources
Experienced production process planners can find answers to questions Q_1 . . . Q_5 manually. However, this applies to small-scale problems, requires a lot of time, and usually an acceptable solution is found in this way for Q_4. In order to automate the method of finding answers to the above questions and to ensure their repeatability, an original model of allocation and control of multidimensional resources has been proposed. The presented model consists of a set of constraints (some of which may be an objective function of the modeled problem) and a set of questions.
The set of indexes and parameters of the model are presented in Table 1. On the other hand, the list of the decision variables of the model and the calculated values is shown in Table 2. The proposed model includes 14 constraints (1) . . . (14), the description and interpretation of which is presented in Table 3.
Appl. Sci. 2022, 12, 6933 If in the state of unavailability u due to lack of functionality/property or unavailability of the cells/workstations, the task o cannot be completed, If in the state of unavailability u project p is performed, R u,p = 0, otherwise R u,p = 1

Cost_1
Cost of using resources to execute the schedule

Count_1
Number of changes in functionalities/properties needed The questions are modeled as subsets of the model constraints (Table 4). Depending on the question being considered, the model may take the form of BILP (Binary Integer Linear Programming) or CSP (Constrain Satisfaction Problem) [20]. Table 3. Description of the constraints.

Constraint Description
(1) The constraint guarantees that the resources with appropriate functionalities/properties are assigned to each task in any state of unavailability.
(2) The constraint guarantees that the resource concerned can only obtain the functionalities/properties that are permitted for them.
The constraint states that if the selected resource is assigned to a specific task, they must have the required functionalities/properties or can obtain them.
The constraint has defined the number of functionalities/properties changes required (5,6) Constraints link the decision variables Y u,m,o and X u,m,o,f The constraint guarantees that simultaneous tasks cannot use the same resources.
The constraint determines the cost of completing the tasks.
The constraint ensures that a given task is performed by only one cell/workstation. (11) The constraint ensures that the cells/workstations perform only the allowed number of tasks at the same time.
The project/order must be completed in full, i.e., all tasks.

Implementation
AMPL (A Modeling Language for Mathematical Programming) [21] was used to implement the model (Q_1 . . . Q_5, (1) . . . (14)) presented in Section 4. AMPL is a universal tool for modeling problems formulated with the help of mathematical programming. An important advantage of this tool is the ability to work with many solvers such as: BARON, CPLEX, GUROBI, ILOG, LINGO, SCIP, XPRESS, etc. [22], without having to use their modeling languages.
Thus, the problem implementation model in Appendix A can be solved with any of the solvers above. The Gurobi [23] solver was used during the computational experiments presented in Section 6. The data and parameters of the modeled problem were recorded by the facts, the relationship diagram of which is presented in Figure 2 and the description in Table 5. The proposed data representation enables easy integration of decision support models developed in the AMPL language with MRP II, ERP class systems, etc. because the facts are very easy to save in the SQL database. models developed in the AMPL language with MRP II, ERP class systems, etc. because the facts are very easy to save in the SQL database.
Due to its combinatorial nature as well as binary decision variables, the modeled problem is NP-Hard. Therefore, for problems of larger sizes, approximate methods should be used to solve them, e.g., using artificial intelligence techniques, dedicated heuristics, etc.  For such cases, the authors used an innovative approach that allows the size of the modeled problem to be reduced, which results in a reduction of the solution space and, consequently, shortens the computation time. A proprietary procedure has been proposed  Due to its combinatorial nature as well as binary decision variables, the modeled problem is NP-Hard. Therefore, for problems of larger sizes, approximate methods should be used to solve them, e.g., using artificial intelligence techniques, dedicated heuristics, etc.
For such cases, the authors used an innovative approach that allows the size of the modeled problem to be reduced, which results in a reduction of the solution space and, consequently, shortens the computation time. A proprietary procedure has been proposed to reduce the size of the problem based on facts ( Figure 3). The fact notation contains only non-zero values of individual parameters of the modeled problem, while solvers require matrix ones, which results in the formation of large-sized matrices containing many zeros/sparse matrices.
R PEER REVIEW 9 of 20 to reduce the size of the problem based on facts ( Figure 3). The fact notation contains only non-zero values of individual parameters of the modeled problem, while solvers require matrix ones, which results in the formation of large-sized matrices containing many zeros/sparse matrices. The proposed procedure (Figure 3), to a large extent, works as follows. Based on the value of the facts, it determines which coefficients/model parameters are equal to zero/are not present in the facts. On this basis and using the model structure, it sets the zero values of the decision variables present at these parameters. In this way, the number of decision variables is reduced and the structure of some constraints, etc., is simplified.
Step 1. For every constraint.
Step 2. For each fact that describes the problem.
Step 3. If the fact keys are a subset of the constraint attributes.
Step 4. If there is no fact for the attribute values.
Step 5. Remove this restriction.
Step 6. Go to the next restriction.
Step 8. For each variable in this constraint.
Step 9. If the attributes of the relationship are a subset of the variable's attributes.
Step 10. If there is no fact about the attribute values of the variable.
Step 11 Remove this variable from the constraint. Some kind of presolving the modeled problem is performed with this procedure. The procedure itself exhibits a polynomial computational complexity. After applying the procedure, a reduced model is obtained, which has the same nature as before its application. Therefore, it can be solved with any solver. Moreover, the proposed method gives exact solutions. The facts (Appendix B) were saved in a relational database, the diagram of which is presented in Figure 2. The key attributes of individual entities were preceded by the # sign. The description of individual database entities is presented in Table 5. Exactly one row of the selected table corresponds to this fact. This type of recording facilitates integration with MRP II (Manufacturing Resource Planning), ERP (Enterprise Resources Planning), etc. systems.

Illustrative Example and Computational Experiments
In an illustrative example, a production system is given ( Figure 4) which consists of 5 cells/workstations (w = w01...w05). The individual cell/workstation can process from two to four tasks simultaneously (SAw) and has a specific unit production cost (CRw). There are 14 additional resources in the system (m = m01...m14), which can have up to 12 functionalities (f = f01...f12) and six projects/orders (p = p01...p06) consisting of 20 tasks (o = o01...o20) that should be completed in the system. There is also a projects/orders execution schedule that defines the time and order of execution of tasks from the orders ( Figure  5). The schedule does not define assignments of tasks or resources to cells/workstations. Individual projects are marked with different colors according to the principle as in Figure  5. The proposed procedure (Figure 3), to a large extent, works as follows. Based on the value of the facts, it determines which coefficients/model parameters are equal to zero/are not present in the facts. On this basis and using the model structure, it sets the zero values of the decision variables present at these parameters. In this way, the number of decision variables is reduced and the structure of some constraints, etc., is simplified.
Some kind of presolving the modeled problem is performed with this procedure. The procedure itself exhibits a polynomial computational complexity. After applying the procedure, a reduced model is obtained, which has the same nature as before its application. Therefore, it can be solved with any solver. Moreover, the proposed method gives exact solutions. The facts (Appendix B) were saved in a relational database, the diagram of which is presented in Figure 2. The key attributes of individual entities were preceded by the # sign. The description of individual database entities is presented in Table 5. Exactly one row of the selected table corresponds to this fact. This type of recording facilitates integration with MRP II (Manufacturing Resource Planning), ERP (Enterprise Resources Planning), etc. systems.

Illustrative Example and Computational Experiments
In an illustrative example, a production system is given ( Figure 4) which consists of 5 cells/workstations (w = w01 . . . w05). The individual cell/workstation can process from two to four tasks simultaneously (SA w ) and has a specific unit production cost (CR w ). There are 14 additional resources in the system (m = m01 . . . m14), which can have up to 12 functionalities (f = f01 . . . f12) and six projects/orders (p = p01 . . . p06) consisting of 20 tasks (o = o01 . . . o20) that should be completed in the system. There is also a projects/orders execution schedule that defines the time and order of execution of tasks from the orders ( Figure 5). The schedule does not define assignments of tasks or resources to cells/workstations. Individual projects are marked with different colors according to the principle as in Figure 5.   All calculation examples were carried out using a computer with the following parameters: Intel(R) Core(TM) i5-4200 M processor, CPU @ 2.50 GHz, 800 GB RAM.
Computational experiments with the use of the proposed model (Section 4) were carried out in two stages. In the first stage, the answers to questions Q_1...Q_5 were searched for the illustrative example data instance (Appendix A). During the computational experiments, the AMPL model and the GUROBI solver were used.
The first answer was to question Q_1 (Are there sufficient additional resources to perform a given set of tasks according to a given schedule?), which was YES. The responding cost (Cost_1) of completing the tasks was 238,000. The corresponding system configuration (which means the allocation of multidimensional resources with specific features to the appropriate workstations) at a selected point in time (τ = 2) is presented in Figure 6, whereas the detailed implementation schedule with multidimensional resources and their features allocated to tasks is presented in Figure 7.
The answer to question Q_1 (What and how many additional resources and with    All calculation examples were carried out using a computer with the following pa rameters: Intel(R) Core(TM) i5-4200 M processor, CPU @ 2.50 GHz, 800 GB RAM.
Computational experiments with the use of the proposed model (Section 4) were car ried out in two stages. In the first stage, the answers to questions Q_1...Q_5 were searched for the illustrative example data instance (Appendix A). During the computational exper iments, the AMPL model and the GUROBI solver were used.
The first answer was to question Q_1 (Are there sufficient additional resources to perform a given set of tasks according to a given schedule?), which was YES. The respond ing cost (Cost_1) of completing the tasks was 238,000. The corresponding system config uration (which means the allocation of multidimensional resources with specific feature to the appropriate workstations) at a selected point in time (τ = 2) is presented in Figure 6 whereas the detailed implementation schedule with multidimensional resources and thei features allocated to tasks is presented in Figure 7.
The answer to question Q_1 (What and how many additional resources and with what qualities are missing to perform a set of tasks according to a given schedule?) wa 'not missing any resources or functionality', see Q_1. All calculation examples were carried out using a computer with the following parameters: Intel(R) Core(TM) i5-4200 M processor, CPU @ 2.50 GHz, 800 GB RAM.
Computational experiments with the use of the proposed model (Section 4) were carried out in two stages. In the first stage, the answers to questions Q_1 . . . Q_5 were searched for the illustrative example data instance (Appendix A). During the computational experiments, the AMPL model and the GUROBI solver were used.
The first answer was to question Q_1 (Are there sufficient additional resources to perform a given set of tasks according to a given schedule?), which was YES. The responding cost (Cost_1) of completing the tasks was 238,000. The corresponding system configuration (which means the allocation of multidimensional resources with specific features to the appropriate workstations) at a selected point in time (τ = 2) is presented in Figure 6, whereas the detailed implementation schedule with multidimensional resources and their features allocated to tasks is presented in Figure 7.
Meanwhile, the answer to question Q_3 (Is it possible to perform a set of tasks according to a given schedule when the specific additional resource is unavailable?) was considered for each resource. The answers are presented in Table 6.   Meanwhile, the answer to question Q_3 (Is it possible to perform a set of tasks according to a given schedule when the specific additional resource is unavailable?) was considered for each resource. The answers are presented in Table 6.    Figure 5).
The answer to question Q_1 (What and how many additional resources and with what qualities are missing to perform a set of tasks according to a given schedule?) was 'not missing any resources or functionality', see Q_1.
Meanwhile, the answer to question Q_3 (Is it possible to perform a set of tasks according to a given schedule when the specific additional resource is unavailable?) was considered for each resource. The answers are presented in Table 6. The answer to question Q_4 (What is the minimum cost of resource allocation to perform a set of tasks according to a given schedule?) is as follows: the cost (Cost_1) of completing the tasks was 244,520. The corresponding system configuration at a selected point in time (τ = 2) is presented in Figure 8, while the detailed implementation schedule with allocated multidimensional resources and features for tasks is presented in Figure 9.  The answer to question Q_4 (What is the minimum cost of resource allocation to perform a set of tasks according to a given schedule?) is as follows: the cost (Cost_1) of completing the tasks was 244,520. The corresponding system configuration at a selected point in time (τ = 2) is presented in Figure 8, while the detailed implementation schedule with allocated multidimensional resources and features for tasks is presented in Figure 9.
Whereas the answer to question Q_5 is the aggregation of all answers to question Q_3. Such a supplemented configuration with missing resource functionalities (Table 6) enables the implementation of a set of tasks according to the given schedule when any of the resources m1...m14 is unavailable.  Whereas the answer to question Q_5 is the aggregation of all answers to question Q_3. Such a supplemented configuration with missing resource functionalities (Table 6) enables the implementation of a set of tasks according to the given schedule when any of the resources m1 . . . m14 is unavailable.
The obtained results (i.e., answers to questions Q_1 . . . Q_5) allow: • finding the production system configuration at a given time, i.e., which tasks will be performed on which machines/workstations with the use of what resources (Figures 6-9); • defining the configuration of the resources themselves, i.e., what features/functions of the resource are used; • in the case of impossibility of implementation, it will be asked to indicate what resources and/or features are missing (Table 6); • proactively predict whether the set of tasks will be carried out in the absence of a resource/feature.
In the second stage of the experiments, the effectiveness of the applied methods of implementing the model was examined. The research was carried out for a larger number of instances of larger data. Individual data instances differed in the number of workstations, projects, tasks, etc. For the experiments, the variants of models with questions Q_4 and Q_5 were selected because they required the greatest computational outlays. Two implementation methods were used during the experiments. The first is analogous to the illustrative example with the use of the AMPL and Gurobi solvers. The second method involved the use of the presolving procedure. This procedure (Figure 3) makes it possible to reduce the size of the modeled problem without changing its nature. Appl. Sci. 2022, 12, x FOR PEER REVIEW 13 of 20 Figure 9. Project implementation schedule with the assignment of tasks and multidimensional resources to workstations for Q_4 (individual projects have different colors as shown in Figure 5).
The obtained results (i.e., answers to questions Q_1...Q_5) allow: • finding the production system configuration at a given time, i.e., which tasks will be performed on which machines/workstations with the use of what resources ( Figures  6-9); • defining the configuration of the resources themselves, i.e., what features/functions of the resource are used; • in the case of impossibility of implementation, it will be asked to indicate what resources and/or features are missing (Table 6); • proactively predict whether the set of tasks will be carried out in the absence of a resource/feature.
In the second stage of the experiments, the effectiveness of the applied methods of implementing the model was examined. The research was carried out for a larger number of instances of larger data. Individual data instances differed in the number of workstations, projects, tasks, etc. For the experiments, the variants of models with questions Q_4 and Q_5 were selected because they required the greatest computational outlays. Two implementation methods were used during the experiments. The first is analogous to the illustrative example with the use of the AMPL and Gurobi solvers. The second method 0 10 20 30 t =2 Figure 9. Project implementation schedule with the assignment of tasks and multidimensional resources to workstations for Q_4 (individual projects have different colors as shown in Figure 5).
The obtained results are presented in Table 7. The first five lines refer to question Q_4 and the remaining lines to Q_5. As it is easy to notice when analyzing the obtained results, the application of the presolving procedure during the implementation resulted in a significant reduction in the size of the modeled problems. Thus, depending on the data instance and question, the number of decision variables of the modeled problem was reduced by 30 to 50 times, while the number of constraints was reduced by about two times.
However, the most important practical effect of using this procedure was the reduction of computation time. It was surprisingly high and amounted to even several hundred times. Moreover, for some data instances, it was not possible to find a solution within the acceptable time (1200 s) in the implementation without the use of a procedure. After its application, finding the optimal solution took a few seconds. Another aspect of the use of the procedure is the possibility of solving practical problems of real/industrial/sizes using exact methods (any mathematical solvers).

Conclusions
The proposed model of the allocation and control of multidimensional resources can be the basis for supporting decisions in the production system in terms of selecting and controlling resources, optimizing production costs, accepting or rejecting a new project, etc. Additionally, it enables finding optimal/acceptable allocations of multidimensional resources to individual project/order tasks. Moreover, the model can be used to support both proactive and reactive decisions. Due to the model structure, which consists of constraints and the set of questions, the model is very easy to modify and extend by adding/reducing constraints and questions. Saving the data and parameters of the model in a relational database facilitates its integration with MRPII, ERP, etc. systems [24].
An important contribution is the implementation of the model using the AMPL solver. This makes it possible to solve the modeled problem using most of the solvers available on the market. However, a key element of the proposed implementation is the procedure for reducing the size of the modeled problem ( Figure 3). This procedure de facto enables presolving, as a result of which we obtain a significant reduction in the number of decision variables and model constraints ( Table 7). The proposed procedure does not change the nature of the model; therefore, after its application, we can still solve it using a mathematical programming/constraint programming solver, obtaining an exact solution in significantly less time (even a hundred times less).
In further research, we plan to: • Introduce new questions such as: Is it possible to implement a new project/order with a given schedule with the current multidimensional resources and cells/workstations? for other variants of production, logistics and distribution systems [25][26][27][28][29]. • Use the presented procedure in conjunction with metaheuristic methods such as genetic algorithms, bio-inspired algorithms [30] as well hybrid methods [31,32]; • Expand the proposed model with the functionality of creating an acceptable schedule in the event of impossible implementation with the resources at hand of a given schedule. Institutional Review Board Statement: Not applicable.

Informed Consent Statement: Not applicable.
Data Availability Statement: Not applicable.