The rule engine implements the production scheduling system

The production scheduling system is an important part of the MES system of the manufacturing enterprise. It corresponds to the short-term planning and arrangement of the production management system. Production goals, which provide guidance for the execution and control of production plans. In different problem environments, the optimization objectives of production scheduling are also different. There are many factors that affect production scheduling in manufacturing enterprises (such as equipment, workers' production skills, etc.), and these factors are complex, diverse, and flexible. In addition, in different environments, the number and priority of rules that affect production scheduling will change. In the past, the production scheduling system tightly coupled the business logic and the main code, and the business rules were hard-coded into the code in the form of:

IF ELSE-THEN

. The result was a linear and deterministic execution route. implementation of the agreement. When the business rules change, the only way is to modify the code. This form cannot adapt to the frequent changes of production rules of
manufacturing enterprises, resulting in a sharp increase in the development, upgrade and maintenance costs of the production scheduling system, and even the production scheduling system cannot adapt to the actual needs of the enterprise at all. Therefore, under the premise of ensuring the optimization of the target, the separation of business logic from the main program has become the primary problem to be solved by the production scheduling system. This paper focuses on the separation of the production rule logic from the production scheduling system through the rule engine technology, and overcomes the problem that the production scheduling system cannot adapt to the change of the production strategy of the enterprise due to the flexible change of the production rule.
At present, there are many open source and commercial rule engine products, among which the open source is represented by Drools, and the commercial ones include ILog, ViaualRules, etc. This article uses the commercial rule engine VisualRules to illustrate. To put it aside, open source products have the advantages of open source products, but as a high-end application, the rule engine still hopes to have commercial guarantees in after-sales service and technical support.
In manufacturing enterprises, production strategies are frequently changed and many business strategies affect the production scheduling system. The traditional production scheduling system tightly couples business logic with production scheduling logic, which makes the development and maintenance of high-level systems extremely difficult. Therefore, how to separate the business logic from the main program and shield the impact of business policy changes on the main program has become a key issue in the production scheduling system.
The core of the architecture design of the production scheduling system based on the rule engine is to realize the decoupling of business logic and application. Its implementation scheme can be divided into the following steps:
1. Generate business rules The business personnel collect, abstract, and summarize the business policies that affect production scheduling, and configure them into business rules according to the rule file format.
2. Business rule management Business personnel implement a series of management of rules such as storage, version, abandonment, and freezing through the rule management platform.
3. Execute the business rule application and start the rule engine (service and interface) to analyze and execute the edited and configured rules file and then return the results to the application.
Through the above steps, the entire production scheduling system can quickly adapt to frequent changes in enterprise business policies, isolate the impact of
policy changes on application programs, and at the same time dynamically communicate with the main program. The main program dynamically senses changes in business policies, and pushes the change results to execution and presentation.
In manufacturing enterprises, there are many business rules that restrict production scheduling. In different scenarios, business rules are combined in various forms, and the execution sequence of rules also restricts the scheduling results. There are also various forms of business rules. Diverse, how to configure the rules of the unified format flexibly and easily is the focus of our attention.
The rules of VisualRules are mainly composed of: conditions, actions, attributes, etc. A rule can contain multiple combined judgment conditions, and can also complete multiple different actions.
The rule representation form of VisualRules is as follows:




In the production scheduling system, all business rules can be abstracted into this format. The following takes the skill proficiency of workers as an example to illustrate the configuration method of business rules in the production scheduling system




As can be seen from the above figure, compared with the traditional production scheduling system, the production scheduling system based on the rule engine has the following advantages:
1. The business logic is separated from the main logic, and the modules are more loosely coupled. Maintenance and upgrade
2. Shield the change of business strategy, have stronger flexibility and use ability, and can effectively adapt to the change of strategy.
3. Effectively extend the life cycle of the application.
4. The development process is more discrete, and each process can be developed, tested and deployed by different developers.

The production scheduling system based on the rule engine realizes the separation of the main application program and the business logic, and shields the impact of the production strategy change on the system. It can effectively reduce the development, maintenance and upgrade costs of the production scheduling system, prolong the software life cycle, and reduce the cost of enterprise informatization.

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326720825&siteId=291194637