CN117313188B - M language-based production system discrete event simulation optimization method and system - Google Patents

M language-based production system discrete event simulation optimization method and system Download PDF

Info

Publication number
CN117313188B
CN117313188B CN202311303276.2A CN202311303276A CN117313188B CN 117313188 B CN117313188 B CN 117313188B CN 202311303276 A CN202311303276 A CN 202311303276A CN 117313188 B CN117313188 B CN 117313188B
Authority
CN
China
Prior art keywords
instruction
execution
execution engine
instructions
language code
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202311303276.2A
Other languages
Chinese (zh)
Other versions
CN117313188A (en
Inventor
朱少盛
刘军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Saihand Technology Co ltd
Original Assignee
Shenzhen Saihand Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Saihand Technology Co ltd filed Critical Shenzhen Saihand Technology Co ltd
Priority to CN202311303276.2A priority Critical patent/CN117313188B/en
Publication of CN117313188A publication Critical patent/CN117313188A/en
Application granted granted Critical
Publication of CN117313188B publication Critical patent/CN117313188B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/10Geometric CAD
    • G06F30/12Geometric CAD characterised by design entry means specially adapted for CAD, e.g. graphical user interfaces [GUI] specially adapted for CAD
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/20Design optimisation, verification or simulation
    • G06F30/27Design optimisation, verification or simulation using machine learning, e.g. artificial intelligence, neural networks, support vector machines [SVM] or training a model
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/34Graphical or visual programming
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2119/00Details relating to the type or aim of the analysis or the optimisation
    • G06F2119/18Manufacturability analysis or optimisation for manufacturability

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Geometry (AREA)
  • Evolutionary Computation (AREA)
  • Computer Hardware Design (AREA)
  • Computational Mathematics (AREA)
  • Pure & Applied Mathematics (AREA)
  • Mathematical Optimization (AREA)
  • Mathematical Analysis (AREA)
  • Human Computer Interaction (AREA)
  • Artificial Intelligence (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Medical Informatics (AREA)
  • Architecture (AREA)
  • Computer Security & Cryptography (AREA)
  • Devices For Executing Special Programs (AREA)

Abstract

The invention provides a discrete event simulation optimization method and a system of a production system based on M language, wherein the method comprises the following steps: the terminal receives triggering operation on a plurality of space templates, generates a control layer corresponding to a production element in a layer generation canvas on a UI design interface, and determines layer relation information and interaction rules among the plurality of control layers; generating a target file for generating a UI interface; calling a modeling interface in the UI interface, generating a corresponding M language code by the operation instruction, converting the M language code into an executable instruction, and transmitting the executable instruction to an execution engine; after receiving the instruction, the execution engine analyzes and compiles the instruction and transmits the instruction to an instruction factory; the execution engine executes the instructions in the instruction queue, and simulates various operations and events in the production system according to the order of the instructions; the system comprises: the system comprises an interface generation module, a code conversion module and an instruction execution module. The invention can better understand and manage the production system and improve the production efficiency.

Description

M language-based production system discrete event simulation optimization method and system
Technical Field
The invention relates to the technical field of computer simulation, in particular to a discrete event simulation optimization method and system for a production system based on M language.
Background
Production process optimization refers to optimizing product design and process by analyzing the relationship between key indexes such as product quality, cost, energy consumption, efficiency, yield and the like and process and equipment parameters. In the production and manufacture, elements such as a process, equipment, personnel and the like are very critical, and the quality and efficiency of a product are related, and the production and manufacture costs are related. Along with the continuous progress of artificial intelligence technology, more and more production manufacturing processes are combined with artificial intelligence, so that the quality and efficiency of products are improved, the labor cost is reduced, and further optimization and upgrading of production and manufacturing are realized. However, the current production and manufacturing platforms have different standards, and the used operating systems are different, so that unified standard use cannot be achieved, and the development of related technologies is restricted.
First, application number: CN202211195374.4 discloses a supply chain model optimization method applied to production and manufacture, which solves the technical problems that the prior art cannot establish a supply chain model suitable for all users from a global angle, resulting in high supply chain optimization cost and affecting service efficiency; building a supply chain model from the viewpoint of a manufacturing enterprise, building the supply chain model based on raw materials, a plurality of suppliers and supply relations among the suppliers, and traversing a target supply chain by combining with customized requirements; not only can the modeling difficulty be reduced, but also the perfection degree of a target supply chain can be improved; when traversing the supply chain model according to the customized demand, aiming at the condition that a plurality of primary suppliers exist in the same original material, carrying out quality screening on the primary suppliers through a supply evaluation coefficient, and then combining a plurality of suppliers subjected to quality screening into an original supply chain, wherein the quality of each supplier at the screening position is ensured to be over-related, and the quality of each original supply chain is further ensured; but only relates to the aspect of production supply, has limited application range and cannot realize the omnibearing optimization of the production process.
Second prior art, application number: CN201710900909.6 discloses a method and device for optimizing production and manufacturing process of multi-agent based on QPSO, comprising the following steps: constructing a multi-Agent production and manufacturing process optimization platform, wherein the multi-Agent production and manufacturing process optimization platform comprises an upper-layer total control Agent and four lower-layer target agents; the four target agents are respectively: oxygen OxyAgent, heavy oil GasAgent, machine MACHINEKWAGENT and air pressure STREAMAGENT; real-time data acquired in the production and manufacturing process are input to a master control Agent, the master control Agent controls four target agents, time and resource constraint are taken as constraint conditions, and a quantum behavior particle swarm algorithm is adopted to carry out optimization solution on the manufacturing process. Although a quantitative mode is provided for the optimization of the production and manufacturing process, the method is more reasonable than the prior adjustment mode according to experience, has high accuracy and is beneficial to optimizing the resource allocation; but cannot realize unified use of different platforms, and limits the application range of the system.
Third, application number: CN201810793796.9 discloses a smart production manufacturing management method, comprising the following steps: the first step: description and modeling of the production process flow, wherein modeling comprises a mathematical model described by an STN chart and modeled by an event sequence, and mathematical model parameters modeled by an event sequence; and a second step of: model optimization solution, and displaying a production optimization scheduling scheme by using a GANNT diagram mode according to the result; and a third step of: simulating a production process; fourth step: and dynamically monitoring and managing the production process. The disclosed intelligent manufacturing management method converts the original manual and paper-managed manufacturing industry into automated, paperless digital manufacturing management. Under the condition that the production quality and quantity of products can be ensured, input-output errors in the production process are reduced to the greatest extent, the saturated utilization of human resources is ensured, and the management of enterprises is optimized; however, the device has simple functions, so that the production and manufacture management efficiency is low, and the production and manufacture process cannot be optimized.
The existing first, second and third technologies have low optimization efficiency and low intelligent degree in the existing production and manufacture; the control platform standards are different, the used operating systems are different, unified standard use cannot be achieved, and development problems of related technologies are restrained, so that the invention provides the M-language-based production system discrete event simulation optimization method and system, simulation and optimization of the production system are realized through collaborative work of modules such as modeling and design interaction UI, M-language generation, processing and forwarding, M-language analysis and compiling, instruction factories, execution engines and the like, the enterprise can be helped to optimize the production process, the production efficiency is improved, the cost is reduced, decision support is provided, and the understanding and control capability of the production system are enhanced.
Disclosure of Invention
In order to solve the technical problems, the invention provides a discrete event simulation optimization method of a production system based on M language, which comprises the following steps:
The terminal receives triggering operation on a plurality of space templates, generates a control layer corresponding to a production element in a layer generation canvas on a UI design interface, and determines layer relation information and interaction rules among the plurality of control layers; generating a target file comprising a preset structured data relationship based on attribute information, layer relation information and interaction rules corresponding to the control layer, wherein the target file is used for generating a UI interface; the production elements comprise equipment, procedures, resources and workflow;
Calling a modeling interface in the UI, inputting operation content in the modeling interface by a user, generating a corresponding M language code by an operation instruction, converting the M language code into an executable instruction, and transmitting the executable instruction to an execution engine; after receiving the instruction, the execution engine analyzes and compiles the instruction; the analyzed and compiled instruction sequence is transmitted to an instruction factory, and the instruction factory instantiates corresponding instruction objects according to the types of the instructions and adds the corresponding instruction objects to an execution queue;
The execution engine executes the instructions in the instruction queue, and simulates various operations and events in the production system according to the order of the instructions, including the running of equipment, the scheduling of resources and the execution of procedures; and the execution engine updates the state of the production system according to the execution result of the instruction and records various performance indexes.
Optionally, the process of generating the UI interface by the target file includes the following steps:
Designing graphics, buttons and input frames according to the target file, establishing the relation between the graphics, buttons and input frames and layer relation information and interaction rules, and arranging the graphics, buttons and input frames in a network layout mode;
Obtaining the position and the size of the content of each network layout in the UI interface, selecting a blank area as an area of the modeling interface, setting an operation panel, wherein the operation panel is used for setting modeling parameters, adjusting model attributes and other operations, placing the panel at one side or the bottom of the modeling interface, and simultaneously setting a shortcut key to realize the switching between the UI interface and the modeling interface;
when switching to the UI interface, selecting a data set used by the modeling interface and monitoring a model training set to predict a process function.
Optionally, the process of transcoding M language into executable instructions comprises the steps of:
Receiving operation content input by a user in a modeling interface, responding to an analysis instruction of the operation slave content, analyzing according to a format set input rule of the operation content, and extracting key target information of the operation content, wherein the target information comprises an operation type and a corresponding parameter value;
Generating a corresponding M language code template according to the content of the target information, wherein the M language code template comprises M language instruction set parameters required by operating the content; filling instructions of the operation content into placeholder positions in corresponding M language code templates according to the parameter values, and generating complete M language codes;
The program sequence of the M language code variable is edited, the program sequence of the global variable edited by referring to the M language code variable is selected from a plurality of programs sequence according to the format of the execution code of the programmable logic controller, the program sequence is an object endowed with the execution code of the programmable logic controller, the generated M language code is converted into an executable instruction of the programmable logic controller through a compiler, and an execution engine in the programmable logic controller is responsible for executing the instruction.
Optionally, the process of generating the complete M language code includes the steps of:
Obtaining the variable names of placeholders in the M language code template, then analyzing the parameter values, and obtaining specific operation contents required to be filled in the M language code template to obtain the variable names corresponding to the specific operation contents;
According to the instruction of the operation content, analyzing according to the format and the rule of the instruction of the operation content, analyzing the filled value, and filling the analyzed variable name into the corresponding placeholder position in the M language code template; replacing the parsed value to a placeholder position in the M language code template according to the selected placeholder variable name;
generating a final M language code: and outputting the template filled with the placeholders as a final M language code.
Optionally, the process of transferring the parsed and compiled instruction sequence to the instruction factory includes the steps of:
After receiving the instruction, the execution engine firstly analyzes the instruction, the analysis process comprises identifying the type and the parameter of the instruction, and decomposing and analyzing the instruction and the parameter to obtain the related information of the instruction; after the analysis is completed, the execution engine transmits the instruction sequence obtained by the analysis to an instruction factory, and the instruction factory instantiates a corresponding instruction object according to the type of the instruction; the instruction object is the implementation of a specific instruction, and comprises execution logic and related operations of the instruction;
after the instantiation is completed, the instruction object is added into an execution queue, wherein the execution queue is a data structure for storing the instructions to be executed, and the instruction object is added into the execution queue according to the execution sequence, namely, the principle of first-in first-out;
the execution engine takes out the instruction object to be executed from the execution queue, and executes corresponding operation according to the execution logic of the instruction object; the execution process comprises reading and modifying data, performing arithmetic operation and controlling flow; after the execution is completed, the execution engine checks whether an instruction to be executed exists in the execution queue; if yes, continuing to fetch the instruction object from the execution queue for execution; if not, execution ends.
Optionally, the process of instantiating the corresponding instruction object includes the steps of:
The execution engine transmits the analyzed instruction sequence to an instruction factory, and the instruction factory determines which specific instruction object needs to be instantiated according to the type of the instruction by judging the type of the instruction;
The instruction factory transmits the constructor and the type of the instruction to the script program according to the type of the instruction, and the script program calls the constructor on the script thread to instantiate a specific instruction object; in the process of instantiating the instruction object, the instruction factory transmits parameters to the constructor of the instruction class for initialization according to the requirement;
The instruction factory returns the instantiated instruction object to the execution engine, and the execution engine receives the returned instruction object and then adds the returned instruction object to the execution queue to wait for execution.
Optionally, the process of executing the instructions in the instruction queue by the execution engine includes the steps of:
The execution engine takes out the instructions to be executed from the instruction queue, executes the instructions according to the order of the instructions, calls the corresponding methods of the instruction objects according to the types of the instructions, simulates various operations and events in the production system, and if the instructions are equipment operation instructions, the execution engine calls the operation methods of the equipment objects to simulate the operation of equipment; if the instruction is a resource scheduling instruction, the execution engine can call a scheduling method of the resource manager object to schedule resources; if the instruction is a procedure execution instruction, the execution engine calls an execution method of a procedure object to simulate the execution of a procedure;
In the instruction execution process, an execution engine transmits parameters to an instruction object according to the transmission parameters, and the execution engine is used for the instruction object to transmit required materials, parameters of equipment, parameters of a procedure and the like; after the execution of the instruction object is completed, returning an execution result to the execution engine; the execution engine updates the state of the production system according to the result of instruction execution; if the device running instruction is successfully executed, the execution engine updates the state of the device to be running; if the resource scheduling instruction is successfully executed, the execution engine updates the state and allocation condition of the resources; if the process execution instruction is successfully executed, the execution engine updates the state and progress of the process;
The execution engine records various performance metrics, including: the utilization rate of equipment, the utilization rate of resources and the completion time of working procedures are used for subsequent analysis and optimization; until all instructions in the instruction queue have been executed.
The invention provides an M language-based production system discrete event simulation optimization system, which comprises:
the interface generation module is in charge of receiving triggering operations on the plurality of space templates by the terminal, generating a control layer corresponding to the production element in a layer generation canvas on the UI design interface, and determining layer relation information and interaction rules among the plurality of control layers; generating a target file comprising a preset structured data relationship based on attribute information, layer relation information and interaction rules corresponding to the control layer, wherein the target file is used for generating a UI interface;
The code conversion module is responsible for retrieving a modeling interface in the UI interface, inputting operation content in the modeling interface by a user, generating a corresponding M language code by an operation instruction, converting the M language code into an executable instruction, and transmitting the executable instruction to the execution engine; after receiving the instruction, the execution engine analyzes and compiles the instruction; the analyzed and compiled instruction sequence is transmitted to an instruction factory, and the instruction factory instantiates corresponding instruction objects according to the types of the instructions and adds the corresponding instruction objects to an execution queue;
The instruction execution module is responsible for executing instructions in an engine execution instruction queue, and simulating various operations and events in the production system according to the order of the instructions, including the running of equipment, the scheduling of resources and the execution of procedures; and the execution engine updates the state of the production system according to the execution result of the instruction and records various performance indexes.
Optionally, the code conversion module includes:
The content analysis sub-module is in charge of receiving operation content input by a user in the modeling interface, responding to an analysis instruction of the operation slave content, analyzing according to a format set input rule of the operation content, and extracting key target information of the operation content, wherein the target information comprises an operation type and a corresponding parameter value;
The instruction filling sub-module is responsible for generating a corresponding M language code template according to the content of the target information, wherein the M language code template comprises M language instruction set parameters required by operating the content; filling instructions of the operation content into placeholder positions in corresponding M language code templates according to the parameter values, and generating complete M language codes;
a code compiling sub-module for compiling a sequence program of the M language code variable, selecting a sequence program of the global variable compiled by referring to the M language code variable as an object giving the execution code of the programmable logic controller from a plurality of sequence programs according to the format of the execution code of the programmable logic controller, converting the generated M language code into an executable instruction of the programmable logic controller by a compiler, and executing the instruction by an execution engine in the programmable logic controller;
The instantiation processing sub-module is in charge of analyzing the instruction after the execution engine receives the instruction, the analysis process comprises the steps of identifying the type and the parameter of the instruction, decomposing and analyzing the instruction and the parameter, and acquiring the related information of the instruction; after the analysis is completed, the execution engine transmits the instruction sequence obtained by the analysis to an instruction factory, and the instruction factory instantiates a corresponding instruction object according to the type of the instruction; the instruction object is the implementation of a specific instruction, and comprises execution logic and related operations of the instruction;
The object adding sub-module is responsible for adding the instruction object into an execution queue after the instantiation is completed, wherein the execution queue is a data structure for storing the instructions to be executed, and the instruction object is added into the execution queue according to the execution sequence, namely, the principle of first-in first-out;
The logic execution sub-module is responsible for taking out an instruction object to be executed from the execution queue by the execution engine, and executing corresponding operation by the execution engine according to the execution logic of the instruction object; the execution process comprises reading and modifying data, performing arithmetic operation and controlling flow; after the execution is completed, the execution engine checks whether an instruction to be executed exists in the execution queue; if yes, continuing to fetch the instruction object from the execution queue for execution; if not, execution ends.
Optionally, the instruction execution module includes:
The method calling sub-module is responsible for taking out an instruction to be executed from the instruction queue by the execution engine, executing the instruction according to the order of the instruction, calling a corresponding method of an instruction object by the execution engine according to the type of the instruction, simulating various operations and events in a production system, and calling an operation method of the equipment object to simulate the operation of equipment if the instruction is an equipment operation instruction; if the instruction is a resource scheduling instruction, the execution engine can call a scheduling method of the resource manager object to schedule resources; if the instruction is a procedure execution instruction, the execution engine calls an execution method of a procedure object to simulate the execution of a procedure;
The state updating sub-module is responsible for transmitting parameters to the instruction object according to the transmission parameters in the instruction execution process, and is used for the instruction object to transmit required materials, parameters of equipment, parameters of working procedures and the like; after the execution of the instruction object is completed, returning an execution result to the execution engine; the execution engine updates the state of the production system according to the result of instruction execution; if the device running instruction is successfully executed, the execution engine updates the state of the device to be running; if the resource scheduling instruction is successfully executed, the execution engine updates the state and allocation condition of the resources; if the process execution instruction is successfully executed, the execution engine updates the state and progress of the process;
the index storage sub-module is responsible for the execution engine to record various performance indexes, and comprises: the utilization rate of equipment, the utilization rate of resources and the completion time of working procedures are used for subsequent analysis and optimization; until all instructions in the instruction queue have been executed.
The invention combines the UI interface and the modeling interface, realizes the generation of a control layer on the UI interface, and operates and simulates the function of the production system through the modeling interface; improving user experience: the user can conveniently operate and generate the control layer by providing a friendly interaction mode through the UI interface, and codes do not need to be directly written; meanwhile, the modeling interface also provides a visual operation interface, and a user can input operation content through the interface to generate a corresponding instruction code, so that the operation process is simplified, and the use experience of the user is improved; development efficiency is improved: the control layer and the attribute information are generated through the UI interface, so that the coding workload of a developer can be reduced, and the development cost is reduced; meanwhile, an executable instruction can be automatically generated by generating an instruction code through a modeling interface, so that the process of manually writing the instruction is reduced, and the development efficiency is improved; and (3) simulating a production system: the instruction codes generated by the modeling interface can simulate various operations and events in the production system, including the operation of equipment, the scheduling of resources, the execution of procedures and the like, can simulate and test in the software development process, help developers to better understand and verify the functions and performances of the system, and reduce the trial-and-error cost of an actual system; providing performance indicators and status records: the execution engine executes the instructions in the instruction queue, the state of the production system is updated according to the execution result of the instructions, various performance indexes are recorded, the production system can be monitored and analyzed, a user is helped to know the running condition of the system, the production process is optimized, and the production efficiency is improved. The embodiment improves the user experience, improves the development efficiency, simulates the production system, provides performance indexes and state records, helps the user to better understand and manage the production system, and improves the production efficiency.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims thereof as well as the appended drawings.
The technical scheme of the invention is further described in detail through the drawings and the embodiments.
Drawings
The accompanying drawings are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate the invention and together with the embodiments of the invention, serve to explain the invention. In the drawings:
FIG. 1 is a flowchart of a discrete event simulation optimization method for an M-language-based production system in embodiment 1 of the present invention;
FIG. 2 is a process diagram of generating a UI interface according to the object file in embodiment 2 of the present invention;
FIG. 3 is a diagram illustrating the process of transcoding M language into executable instructions according to embodiment 3 of the present invention;
FIG. 4 is a process diagram of generating a complete M language code in embodiment 4 of the present invention;
FIG. 5 is a process diagram of the parsed and compiled instruction sequence delivered to the instruction factory in accordance with embodiment 5 of the present invention;
FIG. 6 is a process diagram illustrating an example of a corresponding instruction object according to embodiment 6 of the present invention;
FIG. 7 is a diagram illustrating the execution of instructions in an instruction queue by an execution engine according to embodiment 7 of the present invention;
FIG. 8 is a block diagram of a discrete event simulation optimization system for an M-language based production system in accordance with embodiment 8 of the present invention;
FIG. 9 is a block diagram of an interface generation module in embodiment 9 of the present invention;
FIG. 10 is a block diagram of a transcoding module in embodiment 10 of the present invention;
fig. 11 is a block diagram of an instruction execution module in embodiment 11 of the present invention.
Detailed Description
The preferred embodiments of the present invention will be described below with reference to the accompanying drawings, it being understood that the preferred embodiments described herein are for illustration and explanation of the present invention only, and are not intended to limit the present invention.
The terminology used in the embodiments of the application is for the purpose of describing particular embodiments only and is not intended to be limiting of embodiments of the application. As used in this application and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any or all possible combinations of one or more of the associated listed items.
When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples do not represent all implementations consistent with the application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the application as detailed in the accompanying claims. In the description of the present application, it should be understood that the terms "first," "second," "third," and the like are used merely to distinguish between similar objects and are not necessarily used to describe a particular order or sequence, nor should they be construed to indicate or imply relative importance. The specific meaning of the above terms in the present application can be understood by those of ordinary skill in the art according to the specific circumstances.
Example 1: as shown in FIG. 1, the embodiment of the invention provides a discrete event simulation optimization method of a production system based on M language, which comprises the following steps:
S100: the terminal receives triggering operation on a plurality of space templates, generates a control layer corresponding to a production element in a layer generation canvas on a UI design interface, and determines layer relation information and interaction rules among the plurality of control layers; generating a target file comprising a preset structured data relationship based on attribute information, layer relation information and interaction rules corresponding to the control layer, wherein the target file is used for generating a UI interface; the production elements comprise equipment, procedures, resources, workflow and the like;
s200: calling a modeling interface in the UI, inputting operation content in the modeling interface by a user, generating a corresponding M language code by an operation instruction, converting the M language code into an executable instruction, and transmitting the executable instruction to an execution engine; after receiving the instruction, the execution engine analyzes and compiles the instruction; the analyzed and compiled instruction sequence is transmitted to an instruction factory, and the instruction factory instantiates corresponding instruction objects according to the types of the instructions and adds the corresponding instruction objects to an execution queue;
S300: the execution engine executes the instructions in the instruction queue, and simulates various operations and events in the production system according to the order of the instructions, including the running of equipment, the scheduling of resources, the execution of procedures and the like; the execution engine updates the state of the production system according to the execution result of the instruction and records various performance indexes;
the working principle and beneficial effects of the technical scheme are as follows: firstly, a terminal receives triggering operations on a plurality of space templates, generates a control layer corresponding to a production element in a layer generation canvas on a UI design interface, and determines layer relation information and interaction rules among the plurality of control layers; generating a target file comprising a preset structured data relationship based on attribute information, layer relation information and interaction rules corresponding to the control layer, wherein the target file is used for generating a UI interface; the production elements comprise equipment, procedures, resources, workflow and the like; secondly, a modeling interface in the UI interface is called, a user inputs operation content in the modeling interface, an operation instruction is generated into a corresponding M language code, and the M language code is converted into an executable instruction and is transmitted to an execution engine; after receiving the instruction, the execution engine analyzes and compiles the instruction; the analyzed and compiled instruction sequence is transmitted to an instruction factory, and the instruction factory instantiates corresponding instruction objects according to the types of the instructions and adds the corresponding instruction objects to an execution queue; finally, executing the instructions in the instruction queue by the execution engine, and simulating various operations and events in the production system according to the order of the instructions, wherein the operations comprise equipment running, resource scheduling, procedure execution and the like; the execution engine updates the state of the production system according to the execution result of the instruction and records various performance indexes; the scheme combines the UI interface and the modeling interface, realizes the generation of a control layer on the UI interface, and operates and simulates the function of the production system through the modeling interface; improving user experience: the user can conveniently operate and generate the control layer by providing a friendly interaction mode through the UI interface, and codes do not need to be directly written; meanwhile, the modeling interface also provides a visual operation interface, and a user can input operation content through the interface to generate a corresponding instruction code, so that the operation process is simplified, and the use experience of the user is improved; development efficiency is improved: the control layer and the attribute information are generated through the UI interface, so that the coding workload of a developer can be reduced, and the development cost is reduced; meanwhile, an executable instruction can be automatically generated by generating an instruction code through a modeling interface, so that the process of manually writing the instruction is reduced, and the development efficiency is improved; and (3) simulating a production system: the instruction codes generated by the modeling interface can simulate various operations and events in the production system, including the operation of equipment, the scheduling of resources, the execution of procedures and the like, can simulate and test in the software development process, help developers to better understand and verify the functions and performances of the system, and reduce the trial-and-error cost of an actual system; providing performance indicators and status records: the execution engine executes the instructions in the instruction queue, the state of the production system is updated according to the execution result of the instructions, various performance indexes are recorded, the production system can be monitored and analyzed, a user is helped to know the running condition of the system, the production process is optimized, and the production efficiency is improved. The embodiment improves the user experience, improves the development efficiency, simulates the production system, provides performance indexes and state records, helps the user to better understand and manage the production system, and improves the production efficiency. The embodiment is used for optimizing the production process, improving the production efficiency and reducing the cost through M language generation and M language analysis and compiling; the M language has the advantages of simplicity, easiness in learning, strong model modeling capability, high-efficiency data processing capability, cross-platform support, strong visualization capability, rich expansion libraries and tools and the like, so that the M language has wide application prospects in the fields of data analysis, modeling, optimization and the like.
Example 2: as shown in fig. 2, on the basis of embodiment 1, the process for generating a UI interface by using the object file provided by the embodiment of the present invention includes the following steps:
s101: according to the target file, designing graphs, buttons, input frames and the like, establishing the relation between the graphs, the buttons, the input frames, the layer relation information and the interaction rules, and arranging the graphs, the buttons, the input frames and the like in a network layout mode;
S102: obtaining the position and the size of the content of each network layout in the UI interface, selecting a blank area as an area of the modeling interface, setting an operation panel, wherein the operation panel is used for setting modeling parameters, adjusting model attributes and other operations, placing the panel at one side or the bottom of the modeling interface, and simultaneously setting a shortcut key to realize the switching between the UI interface and the modeling interface;
S103: when switching to the UI interface, selecting a data set used by the modeling interface and a monitoring model training set prediction process function;
The working principle and beneficial effects of the technical scheme are as follows: firstly, designing graphs, buttons, input boxes and the like according to a target file, establishing connection between the graphs, the buttons, the input boxes, layer relation information and interaction rules, and arranging the graphs, the buttons, the input boxes and the like in a network layout mode; secondly, obtaining the position and the size of the content of each network layout in the UI interface, selecting a blank area as an area of the modeling interface, setting an operation panel, setting the operation panel for setting modeling parameters, adjusting model attributes and other operations, placing the panel on one side or the bottom of the modeling interface, and simultaneously setting a shortcut key to realize the switching between the UI interface and the modeling interface; finally, when switching to the UI interface, selecting a data set used by the modeling interface and a monitoring model training set prediction process function; the scheme combines modeling interface design with UI interface design, and provides an intuitive and easy-to-use modeling interface through definite design of the relationship and interaction rules of elements such as graphics, buttons, input frames and the like; and the user experience is improved: through reasonable layout and design, a modeling interface is more visual, easy to understand and operate, and a user can complete modeling tasks more quickly, so that the working efficiency is improved; the learning cost is reduced: by setting the modes of an operation panel, a shortcut key and the like, a user can conveniently set modeling parameters and adjust model attributes, so that complicated manual operation and search are reduced, and the difficulty of learning and use is reduced; interface consistency: the UI interface and the modeling interface are designed uniformly, so that the whole system is kept consistent in vision, and the overall cognition and use feeling of a user on the system are improved; function expansion and adaptability: the modeling interface has more expansibility and adaptability by selecting the functions of a data set, monitoring the model training set prediction process and the like, and can meet the requirements and scenes of different users. The modeling interface design and the UI interface design are combined, a user-friendly modeling interface can be provided, user experience and working efficiency are improved, learning cost is reduced, and certain function expansibility and adaptability are achieved.
Example 3: as shown in fig. 3, on the basis of embodiment 1, the process of transcoding M language into executable instructions provided in the embodiment of the present invention includes the following steps:
s201: receiving operation content input by a user in a modeling interface, responding to an analysis instruction of the operation slave content, analyzing according to a format set input rule of the operation content, and extracting key target information of the operation content, wherein the target information comprises an operation type, a corresponding parameter value and the like;
s202: generating a corresponding M language code template according to the content of the target information, wherein the M language code template comprises M language instruction set parameters required by operating the content; filling instructions of the operation content into placeholder positions in corresponding M language code templates according to the parameter values, and generating complete M language codes;
S203: editing the sequencing program of the M language code variable, selecting the sequencing program which is an object endowed with the execution code of the programmable logic controller and refers to the global variable edited by the M language code variable from a plurality of sequencing programs according to the format of the execution code of the programmable logic controller, converting the generated M language code into an executable instruction of the programmable logic controller through a compiler, and enabling an execution engine in the programmable logic controller to be responsible for executing the instruction;
The working principle and beneficial effects of the technical scheme are as follows: firstly, receiving operation content input by a user in a modeling interface, responding to an analysis instruction of the operation slave content, analyzing according to a format set input rule of the operation content, and extracting key target information of the operation content, wherein the target information comprises an operation type, a corresponding parameter value and the like; secondly, generating a corresponding M language code template according to the content of the target information, wherein the M language code template comprises M language instruction set parameters required by operating the content; filling instructions of the operation content into placeholder positions in corresponding M language code templates according to the parameter values, and generating complete M language codes; finally, editing the sequencing program of the M language code variable, selecting the sequencing program which is an object endowed with the execution code of the programmable logic controller and refers to the global variable edited by the M language code variable from a plurality of sequencing programs according to the format of the execution code of the programmable logic controller, converting the generated M language code into an executable instruction of the programmable logic controller through a compiler, and enabling an execution engine in the programmable logic controller to be responsible for executing the instruction; the scheme realizes the automatic processing and execution after the user inputs the operation content, and can quickly and accurately convert the operation requirement of the user into the machine executable instruction by analyzing the operation content input by the user and generating the corresponding M language code, thereby greatly improving the operation efficiency and accuracy and reducing the possible error and complexity of manual operation. In addition, the embodiment can realize accurate control and scheduling of a complex industrial automation system by using M language codes and programmable logic controllers to execute codes, the M language codes have rich functions and flexibility, various control logics and algorithms can be realized, and the programmable logic controllers are used as special control equipment, have the characteristics of high efficiency, stability and reliability, and can meet the requirements of the industrial automation system on instantaneity and reliability. The embodiment provides an automatic, efficient and accurate way for processing and executing the operation demands of users, and can effectively control and schedule an industrial automation system, thereby improving the production efficiency and quality.
Example 4: as shown in fig. 4, on the basis of embodiment 3, the process for generating a complete M language code provided in the embodiment of the present invention includes the following steps:
S2021: obtaining the variable names of placeholders in the M language code template, then analyzing the parameter values, and obtaining specific operation contents required to be filled in the M language code template to obtain the variable names corresponding to the specific operation contents;
S2022: according to the instruction of the operation content, analyzing according to the format and the rule of the instruction of the operation content, analyzing the filled value, and filling the analyzed variable name into the corresponding placeholder position in the M language code template; replacing the parsed value to a placeholder position in the M language code template according to the selected placeholder variable name;
S2023: generating a final M language code: outputting the template filled with the placeholders as a final M language code;
The working principle and beneficial effects of the technical scheme are as follows: firstly, obtaining the variable names of placeholders in an M language code template, then analyzing parameter values, and obtaining specific operation contents required to be filled in the M language code template to obtain the variable names corresponding to the specific operation contents; secondly, according to the instruction of the operation content, analyzing according to the format and the rule of the instruction of the operation content, analyzing the filled value, and filling the analyzed variable name into the corresponding placeholder position in the M language code template; replacing the parsed value to a placeholder position in the M language code template according to the selected placeholder variable name; finally, generating a final M language code: outputting the template filled with the placeholders as a final M language code; the scheme realizes a general method, and can fill the instruction content into the placeholder position in the M language code template according to the instruction and the parameter value of the operation content to generate a final M language code; automatically generating M language codes: by analyzing the instruction and the parameter value of the operation content and filling the instruction and the parameter value into the M language code template, the M language code can be automatically generated, the workload of manually writing the code is reduced, and the method is very useful for tasks needing to generate a large amount of M language codes; flexible adaptation to different operating contents: by analyzing the instruction and the parameter value of the operation content, different M language codes can be generated according to different operation contents, so that the generated M language codes can flexibly adapt to various different operation requirements; improving the readability and maintainability of the code: by separating the instructions and parameter values of the operation content from the M-language code templates, the generated M-language code can be made clearer and easier to understand. Meanwhile, if the operation content needs to be modified or updated, only the instruction and the parameter value need to be modified, and the M language code template does not need to be modified, so that the maintainability of the code is improved. The embodiment can simplify the generation process of M language codes, improve the readability and maintainability of the codes and is suitable for various different operation requirements.
Example 5: as shown in fig. 5, based on embodiment 1, the process of transferring the parsed and compiled instruction sequence provided by the embodiment of the present invention to the instruction factory includes the following steps:
S204: after receiving the instruction, the execution engine firstly analyzes the instruction, the analysis process comprises identifying the type and the parameter of the instruction, and decomposing and analyzing the instruction and the parameter to obtain the related information of the instruction; after the analysis is completed, the execution engine transmits the instruction sequence obtained by the analysis to an instruction factory, and the instruction factory instantiates a corresponding instruction object according to the type of the instruction; the instruction object is the implementation of a specific instruction, and comprises execution logic and related operations of the instruction;
S205: after the instantiation is completed, the instruction object is added into an execution queue, wherein the execution queue is a data structure for storing the instructions to be executed, and the instruction object is added into the execution queue according to the execution sequence, namely, the principle of first-in first-out;
S206: the execution engine takes out the instruction object to be executed from the execution queue, and executes corresponding operation according to the execution logic of the instruction object; the execution process comprises reading and modifying data, performing arithmetic operation and controlling flow; after the execution is completed, the execution engine checks whether an instruction to be executed exists in the execution queue; if yes, continuing to fetch the instruction object from the execution queue for execution; if not, ending the execution;
The working principle and beneficial effects of the technical scheme are as follows: after the execution engine receives the instruction, the instruction is analyzed firstly, the analysis process comprises the steps of identifying the type and the parameters of the instruction, decomposing and analyzing the instruction and the parameters, and obtaining the related information of the instruction; after the analysis is completed, the execution engine transmits the instruction sequence obtained by the analysis to an instruction factory, and the instruction factory instantiates a corresponding instruction object according to the type of the instruction; the instruction object is the implementation of a specific instruction, and comprises execution logic and related operations of the instruction; after the instantiation is completed, the instruction object is added into an execution queue, wherein the execution queue is a data structure for storing the instructions to be executed, and the instruction object is added into the execution queue according to the execution sequence, namely, the principle of first-in first-out; finally, the execution engine takes out the instruction object to be executed from the execution queue, and executes corresponding operation according to the execution logic of the instruction object; the execution process comprises reading and modifying data, performing arithmetic operation and controlling flow; after the execution is completed, the execution engine checks whether an instruction to be executed exists in the execution queue; if yes, continuing to fetch the instruction object from the execution queue for execution; if not, ending the execution; the scheme realizes the whole flow of analysis, compiling and execution of the instruction; specifically: a unified interface and a unified flow are provided for processing different types of instructions, corresponding instruction objects are instantiated through analyzing the types and parameters of the instructions, and the different types of instructions can be processed, so that the general processing of the instructions is realized; separating the analysis and compiling process of the instruction from the executing process, wherein the analysis and compiling of the instruction is a key step of converting the instruction sequence into an executable instruction object, and the executing process is a specific operation according to the executing logic of the instruction object, and the separation can improve the maintainability and expansibility of codes, so that the analysis and compiling logic and the executing logic can be independently modified and optimized; the method has the advantages that sequential execution of instructions is realized, the instructions can be sequentially executed according to the principle of first-in first-out by adding the analyzed and compiled instruction objects into the execution queue, the execution efficiency and performance are improved, the instructions are executed one by one in the cycle of an execution engine by adding the instruction objects into the execution queue, and frequent analysis and compiling of the instructions are avoided. The embodiment realizes the whole flow of analysis, compiling and execution of the instructions, provides a flexible and extensible architecture, can conveniently process different types of instructions, and realizes the sequential execution of the instructions, thereby improving the execution efficiency and performance.
Example 6: as shown in fig. 6, on the basis of embodiment 5, the process for instantiating the corresponding instruction object provided by the embodiment of the present invention includes the following steps:
S2041: the execution engine transmits the analyzed instruction sequence to an instruction factory, and the instruction factory determines which specific instruction object needs to be instantiated according to the type of the instruction by judging the type of the instruction;
S2042: the instruction factory transmits the constructor and the type of the instruction to the script program according to the type of the instruction, and the script program calls the constructor on the script thread to instantiate a specific instruction object; in the process of instantiating the instruction object, the instruction factory transmits parameters to the constructor of the instruction class for initialization according to the requirement;
S2043: the instruction factory returns the instantiated instruction object to the execution engine, and the execution engine receives the returned instruction object and then adds the returned instruction object to the execution queue for waiting to be executed;
The working principle and beneficial effects of the technical scheme are as follows: the execution engine transmits the analyzed instruction sequence to the instruction factory, and the instruction factory determines which specific instruction object needs to be instantiated according to the type of the instruction by judging the type of the instruction; secondly, the instruction factory transmits the constructor and the type of the instruction to the script program according to the type of the instruction, and the script program calls the constructor on the script thread to instantiate a specific instruction object; in the process of instantiating the instruction object, the instruction factory transmits parameters to the constructor of the instruction class for initialization according to the requirement; finally, the instruction factory returns the instantiated instruction object to the execution engine, and the execution engine receives the returned instruction object and then adds the returned instruction object to the execution queue for waiting to be executed; the scheme carries out unified management and processing on the instantiation process of the instruction, and realizes dynamic creation and flexible configuration of the instruction; creation and execution of decoupling instructions: by introducing the instruction factory, the execution engine does not need to know specific instruction classes and constructors, and only needs to transmit the analyzed instruction sequences to the instruction factory, so that the instruction factory is responsible for instantiating specific instruction objects. Therefore, the creation and execution processes of the instruction can be decoupled, and the maintainability and expandability of codes are improved; types of flexible configuration instructions: the instruction factory determines which specific instruction object needs to be instantiated according to the type of the instruction, the type of the instruction can be flexibly configured according to actual requirements, in practical application, different types of instructions can exist, each instruction type has different execution logic and operation, different types of instruction objects can be dynamically created according to the needs through the instruction factory, and the flexibility and the configurability of the system are improved; implementing parameterized configuration of instructions: in the process of instantiating the instruction object, the instruction factory can transfer parameters to the constructor of the instruction class for initialization according to the requirement, can realize the parameterized configuration of the instruction, can initialize different instruction objects by transferring different parameters, and transfer parameters to the instruction object in the execution process, thereby realizing the personalized customization and dynamic adjustment of the instruction. By introducing an instruction factory, the method and the system can better manage and process the creation and execution processes of the instructions, improve the flexibility, maintainability and configurability of the system and enable the system to better adapt to different business demands and changes.
Example 7: as shown in fig. 7, based on embodiment 1, the process of executing the instruction in the instruction queue by the execution engine provided in the embodiment of the present invention includes the following steps:
S301: the execution engine takes out the instructions to be executed from the instruction queue, executes the instructions according to the order of the instructions, calls the corresponding methods of the instruction objects according to the types of the instructions, simulates various operations and events in the production system, and if the instructions are equipment operation instructions, the execution engine calls the operation methods of the equipment objects to simulate the operation of equipment; if the instruction is a resource scheduling instruction, the execution engine can call a scheduling method of the resource manager object to schedule resources; if the instruction is a procedure execution instruction, the execution engine calls an execution method of a procedure object to simulate the execution of a procedure;
S302: in the instruction execution process, an execution engine transmits parameters to an instruction object according to the transmission parameters, and the execution engine is used for the instruction object to transmit required materials, parameters of equipment, parameters of a procedure and the like; after the execution of the instruction object is completed, returning an execution result to the execution engine; the execution engine updates the state of the production system according to the result of instruction execution; if the device running instruction is successfully executed, the execution engine updates the state of the device to be running; if the resource scheduling instruction is successfully executed, the execution engine updates the state and allocation condition of the resources; if the process execution instruction is successfully executed, the execution engine updates the state and progress of the process;
S303: the execution engine records various performance metrics, including: the utilization rate of equipment, the utilization rate of resources, the completion time of working procedures and the like, and the performance index is used for subsequent analysis and optimization; until all instructions in the instruction queue are executed;
The working principle and beneficial effects of the technical scheme are as follows: the method comprises the steps that an execution engine firstly takes out an instruction to be executed from an instruction queue, the execution engine executes the instruction according to the order of the instruction, the execution engine calls a corresponding method of an instruction object according to the type of the instruction, various operations and events in a production system are simulated, and if the instruction is an equipment operation instruction, the execution engine calls an operation method of the equipment object to simulate the operation of equipment; if the instruction is a resource scheduling instruction, the execution engine can call a scheduling method of the resource manager object to schedule resources; if the instruction is a procedure execution instruction, the execution engine calls an execution method of a procedure object to simulate the execution of a procedure; secondly, in the instruction execution process, the execution engine transmits parameters to the instruction object according to the transmission parameters, and the execution engine is used for the instruction object to transmit required materials, parameters of equipment, parameters of a procedure and the like; after the execution of the instruction object is completed, returning an execution result to the execution engine; the execution engine updates the state of the production system according to the result of instruction execution; if the device running instruction is successfully executed, the execution engine updates the state of the device to be running; if the resource scheduling instruction is successfully executed, the execution engine updates the state and allocation condition of the resources; if the process execution instruction is successfully executed, the execution engine updates the state and progress of the process; finally, the execution engine records various performance indexes, including: the utilization rate of equipment, the utilization rate of resources, the completion time of working procedures and the like, and the performance index is used for subsequent analysis and optimization; until all instructions in the instruction queue are executed; the scheme realizes an execution engine for simulating the production system, and realizes the simulation and control of the production system by sequentially executing the instructions in the instruction queue and simulating various operations and events in the production system, including equipment operation, resource scheduling, procedure execution and the like; the method provides a reliable execution environment for simulating the production system, and can simulate the operation and the event in the actual production process through the instruction in the instruction queue so as to test and verify the system; the update and the record of the production system state, including the equipment state, the resource state, the process state and the like, can be realized by parameter transmission and execution result return in the instruction execution process, and real-time monitoring and management of the production system state are provided; various performance indexes such as the utilization rate of equipment, the utilization rate of resources, the completion time of working procedures and the like can be recorded, and a reliable data source is provided for subsequent analysis and optimization; by sequentially executing the instructions in the instruction queue, the execution sequence and consistency of the production system are ensured, and confusion and errors of instruction execution are avoided; the method can be used for optimizing the operation efficiency and the resource utilization rate of the production system, and can find out the bottleneck and the improvement space in the system by analyzing the recorded performance indexes, thereby improving the overall efficiency of the production system. The present embodiment provides a reliable execution engine for simulating and controlling a production system, and provides effective means and tools for testing, monitoring and optimizing the production system.
Example 8: as shown in fig. 8, on the basis of embodiment 1 to embodiment 7, the M language-based production system discrete event simulation optimization system provided by the embodiment of the present invention includes:
the interface generation module is in charge of receiving triggering operations on the plurality of space templates by the terminal, generating a control layer corresponding to the production element in a layer generation canvas on the UI design interface, and determining layer relation information and interaction rules among the plurality of control layers; generating a target file comprising a preset structured data relationship based on attribute information, layer relation information and interaction rules corresponding to the control layer, wherein the target file is used for generating a UI interface;
The code conversion module is responsible for retrieving a modeling interface in the UI interface, inputting operation content in the modeling interface by a user, generating a corresponding M language code by an operation instruction, converting the M language code into an executable instruction, and transmitting the executable instruction to the execution engine; after receiving the instruction, the execution engine analyzes and compiles the instruction; the analyzed and compiled instruction sequence is transmitted to an instruction factory, and the instruction factory instantiates corresponding instruction objects according to the types of the instructions and adds the corresponding instruction objects to an execution queue;
the instruction execution module is responsible for executing instructions in an engine execution instruction queue, and simulating various operations and events in the production system according to the order of the instructions, including the running of equipment, the scheduling of resources, the execution of procedures and the like; the execution engine updates the state of the production system according to the execution result of the instruction and records various performance indexes;
The working principle and beneficial effects of the technical scheme are as follows: the interface generating module terminal receives triggering operations on a plurality of space templates, generates a control layer corresponding to a production element in a layer generating canvas on a UI design interface, and determines layer relation information and interaction rules among the plurality of control layers; generating a target file comprising a preset structured data relationship based on attribute information, layer relation information and interaction rules corresponding to the control layer, wherein the target file is used for generating a UI interface; the code conversion module invokes a modeling interface in the UI interface, a user inputs operation content in the modeling interface, an operation instruction is generated into a corresponding M language code, and the M language code is converted into an executable instruction and is transmitted to the execution engine; after receiving the instruction, the execution engine analyzes and compiles the instruction; the analyzed and compiled instruction sequence is transmitted to an instruction factory, and the instruction factory instantiates corresponding instruction objects according to the types of the instructions and adds the corresponding instruction objects to an execution queue; the instruction execution module executes the instructions in the instruction queue by the engine, and simulates various operations and events in the production system according to the order of the instructions, including the running of equipment, the scheduling of resources, the execution of procedures and the like; the execution engine updates the state of the production system according to the execution result of the instruction and records various performance indexes; the scheme combines the UI interface and the modeling interface, realizes the generation of a control layer on the UI interface, and operates and simulates the function of the production system through the modeling interface; improving user experience: the user can conveniently operate and generate the control layer by providing a friendly interaction mode through the UI interface, and codes do not need to be directly written; meanwhile, the modeling interface also provides a visual operation interface, and a user can input operation content through the interface to generate a corresponding instruction code, so that the operation process is simplified, and the use experience of the user is improved; development efficiency is improved: the control layer and the attribute information are generated through the UI interface, so that the coding workload of a developer can be reduced, and the development cost is reduced; meanwhile, an executable instruction can be automatically generated by generating an instruction code through a modeling interface, so that the process of manually writing the instruction is reduced, and the development efficiency is improved; and (3) simulating a production system: the instruction codes generated by the modeling interface can simulate various operations and events in the production system, including the operation of equipment, the scheduling of resources, the execution of procedures and the like, can simulate and test in the software development process, help developers to better understand and verify the functions and performances of the system, and reduce the trial-and-error cost of an actual system; providing performance indicators and status records: the execution engine executes the instructions in the instruction queue, the state of the production system is updated according to the execution result of the instructions, various performance indexes are recorded, the production system can be monitored and analyzed, a user is helped to know the running condition of the system, the production process is optimized, and the production efficiency is improved. The embodiment improves the user experience, improves the development efficiency, simulates the production system, provides performance indexes and state records, helps the user to better understand and manage the production system, and improves the production efficiency.
The embodiment is used for optimizing the production process, improving the production efficiency and reducing the cost through M language generation and M language analysis and compiling; the M language has the advantages of simplicity, easiness in learning, strong model modeling capability, high-efficiency data processing capability, cross-platform support, strong visualization capability, rich expansion libraries and tools and the like, so that the M language has wide application prospects in the fields of data analysis, modeling, optimization and the like.
Example 9: as shown in fig. 9, on the basis of embodiment 8, an interface generating module provided in an embodiment of the present invention includes:
The network layout sub-module is responsible for designing graphics, buttons, input frames and the like according to the target file, establishing the connection between the graphics, the buttons, the input frames, the layer relation information and the interaction rules, and arranging the graphics, the buttons, the input frames and the like in a network layout mode;
The region dividing sub-module is responsible for obtaining the position and the size of the content of each network layout in the UI interface, selecting a blank region as a region of the modeling interface, setting an operation panel, setting the operation panel for setting modeling parameters, adjusting model attributes and other operations, placing the panel on one side or the bottom of the modeling interface, and setting a shortcut key to realize the switching between the UI interface and the modeling interface;
The interface switching sub-module is in charge of selecting a data set used by the modeling interface and a monitoring model training set prediction process function when switching to the UI interface;
The working principle and beneficial effects of the technical scheme are as follows: the network layout submodule of the embodiment designs graphs, buttons, input frames and the like according to the target file, establishes the connection between the graphs, the buttons, the input frames, the layer relation information and the interaction rules, and lays out the graphs, the buttons, the input frames and the like in a network layout mode; the region dividing sub-module obtains the position and the size of the content of each network layout in the UI interface, selects a blank region as a region of the modeling interface, sets an operation panel, the operation panel is used for setting modeling parameters, adjusting model attributes and other operations, places the panel on one side or the bottom of the modeling interface, and simultaneously sets a shortcut key to realize the switching between the UI interface and the modeling interface; when the interface switching sub-module is switched to the UI interface, selecting a data set used by the modeling interface and monitoring a model training set prediction process function; the scheme combines modeling interface design with UI interface design, and provides an intuitive and easy-to-use modeling interface through definite design of the relationship and interaction rules of elements such as graphics, buttons, input frames and the like; and the user experience is improved: through reasonable layout and design, a modeling interface is more visual, easy to understand and operate, and a user can complete modeling tasks more quickly, so that the working efficiency is improved; the learning cost is reduced: by setting the modes of an operation panel, a shortcut key and the like, a user can conveniently set modeling parameters and adjust model attributes, so that complicated manual operation and search are reduced, and the difficulty of learning and use is reduced; interface consistency: the UI interface and the modeling interface are designed uniformly, so that the whole system is kept consistent in vision, and the overall cognition and use feeling of a user on the system are improved; function expansion and adaptability: the modeling interface has more expansibility and adaptability by selecting the functions of a data set, monitoring the model training set prediction process and the like, and can meet the requirements and scenes of different users. The modeling interface design and the UI interface design are combined, a user-friendly modeling interface can be provided, user experience and working efficiency are improved, learning cost is reduced, and certain function expansibility and adaptability are achieved.
Example 10: as shown in fig. 10, on the basis of embodiment 8, a transcoding module provided in an embodiment of the present invention includes:
The content analysis sub-module is in charge of receiving operation content input by a user in the modeling interface, responding to an analysis instruction of the operation slave content, analyzing according to a format set input rule of the operation content, extracting key target information of the operation content, wherein the target information comprises an operation type, a corresponding parameter value and the like;
The instruction filling sub-module is responsible for generating a corresponding M language code template according to the content of the target information, wherein the M language code template comprises M language instruction set parameters required by operating the content; filling instructions of the operation content into placeholder positions in corresponding M language code templates according to the parameter values, and generating complete M language codes;
a code compiling sub-module for compiling a sequence program of the M language code variable, selecting a sequence program of the global variable compiled by referring to the M language code variable as an object giving the execution code of the programmable logic controller from a plurality of sequence programs according to the format of the execution code of the programmable logic controller, converting the generated M language code into an executable instruction of the programmable logic controller by a compiler, and executing the instruction by an execution engine in the programmable logic controller;
The instantiation processing sub-module is in charge of analyzing the instruction after the execution engine receives the instruction, the analysis process comprises the steps of identifying the type and the parameter of the instruction, decomposing and analyzing the instruction and the parameter, and acquiring the related information of the instruction; after the analysis is completed, the execution engine transmits the instruction sequence obtained by the analysis to an instruction factory, and the instruction factory instantiates a corresponding instruction object according to the type of the instruction; the instruction object is the implementation of a specific instruction, and comprises execution logic and related operations of the instruction;
The object adding sub-module is responsible for adding the instruction object into an execution queue after the instantiation is completed, wherein the execution queue is a data structure for storing the instructions to be executed, and the instruction object is added into the execution queue according to the execution sequence, namely, the principle of first-in first-out;
The logic execution sub-module is responsible for taking out an instruction object to be executed from the execution queue by the execution engine, and executing corresponding operation by the execution engine according to the execution logic of the instruction object; the execution process comprises reading and modifying data, performing arithmetic operation and controlling flow; after the execution is completed, the execution engine checks whether an instruction to be executed exists in the execution queue; if yes, continuing to fetch the instruction object from the execution queue for execution; if not, ending the execution;
The working principle and beneficial effects of the technical scheme are as follows: the content analysis submodule of the embodiment receives operation content input by a user in a modeling interface, responds to an analysis instruction of the operation slave content, analyzes according to a format set input rule of the operation content, extracts key target information of the operation content, and the target information comprises an operation type, a corresponding parameter value and the like; the instruction filling submodule generates a corresponding M language code template according to the content of the target information, wherein the M language code template comprises M language instruction set parameters required by operating the content; filling instructions of the operation content into placeholder positions in corresponding M language code templates according to the parameter values, and generating complete M language codes; the code compiling sub-module edits sequencing programs of M language code variables, according to the format of the execution codes of the programmable logic controller, selects sequencing programs which are objects endowed with the execution codes of the programmable logic controller and refer to global variables edited by the M language code variables from the sequencing programs, converts the generated M language code into executable instructions of the programmable logic controller through a compiler, and an execution engine in the programmable logic controller is responsible for executing the instructions; after the execution engine of the instantiation processing sub-module receives the instruction, the instruction is analyzed firstly, the analysis process comprises the steps of identifying the type and the parameter of the instruction, decomposing and analyzing the instruction and the parameter, and obtaining the related information of the instruction; after the analysis is completed, the execution engine transmits the instruction sequence obtained by the analysis to an instruction factory, and the instruction factory instantiates a corresponding instruction object according to the type of the instruction; the instruction object is the implementation of a specific instruction, and comprises execution logic and related operations of the instruction; after the object adding submodule is instantiated, the instruction object is added into an execution queue, wherein the execution queue is a data structure for storing instructions to be executed, and the instruction object is added into the execution queue according to the execution sequence, namely, the principle of first-in first-out; the logic execution submodule execution engine takes out an instruction object to be executed from the execution queue, and the execution engine executes corresponding operation according to the execution logic of the instruction object; the execution process comprises reading and modifying data, performing arithmetic operation and controlling flow; after the execution is completed, the execution engine checks whether an instruction to be executed exists in the execution queue; if yes, continuing to fetch the instruction object from the execution queue for execution; if not, execution ends. The scheme realizes the automatic processing and execution after the user inputs the operation content, and can quickly and accurately convert the operation requirement of the user into the machine executable instruction by analyzing the operation content input by the user and generating the corresponding M language code, thereby greatly improving the operation efficiency and accuracy and reducing the possible error and complexity of manual operation. In addition, the embodiment can realize accurate control and scheduling of a complex industrial automation system by using M language codes and programmable logic controllers to execute codes, the M language codes have rich functions and flexibility, various control logics and algorithms can be realized, and the programmable logic controllers are used as special control equipment, have the characteristics of high efficiency, stability and reliability, and can meet the requirements of the industrial automation system on instantaneity and reliability. The embodiment provides an automatic, efficient and accurate mode for processing and executing the operation demands of users, and can effectively control and schedule an industrial automation system, thereby improving the production efficiency and quality; the whole flow of analysis, compiling and execution of the instruction is realized; specifically: a unified interface and a unified flow are provided for processing different types of instructions, corresponding instruction objects are instantiated through analyzing the types and parameters of the instructions, and the different types of instructions can be processed, so that the general processing of the instructions is realized; separating the analysis and compiling process of the instruction from the executing process, wherein the analysis and compiling of the instruction is a key step of converting the instruction sequence into an executable instruction object, and the executing process is a specific operation according to the executing logic of the instruction object, and the separation can improve the maintainability and expansibility of codes, so that the analysis and compiling logic and the executing logic can be independently modified and optimized; the method has the advantages that sequential execution of instructions is realized, the instructions can be sequentially executed according to the principle of first-in first-out by adding the analyzed and compiled instruction objects into the execution queue, the execution efficiency and performance are improved, the instructions are executed one by one in the cycle of an execution engine by adding the instruction objects into the execution queue, and frequent analysis and compiling of the instructions are avoided. The embodiment realizes the whole flow of analysis, compiling and execution of the instructions, provides a flexible and extensible architecture, can conveniently process different types of instructions, and realizes the sequential execution of the instructions, thereby improving the execution efficiency and performance.
Example 11: as shown in fig. 11, on the basis of embodiment 8, the instruction execution module provided in the embodiment of the present invention includes the following steps:
The method calling sub-module is responsible for taking out an instruction to be executed from the instruction queue by the execution engine, executing the instruction according to the order of the instruction, calling a corresponding method of an instruction object by the execution engine according to the type of the instruction, simulating various operations and events in a production system, and calling an operation method of the equipment object to simulate the operation of equipment if the instruction is an equipment operation instruction; if the instruction is a resource scheduling instruction, the execution engine can call a scheduling method of the resource manager object to schedule resources; if the instruction is a procedure execution instruction, the execution engine calls an execution method of a procedure object to simulate the execution of a procedure;
The state updating sub-module is responsible for transmitting parameters to the instruction object according to the transmission parameters in the instruction execution process, and is used for the instruction object to transmit required materials, parameters of equipment, parameters of working procedures and the like; after the execution of the instruction object is completed, returning an execution result to the execution engine; the execution engine updates the state of the production system according to the result of instruction execution; if the device running instruction is successfully executed, the execution engine updates the state of the device to be running; if the resource scheduling instruction is successfully executed, the execution engine updates the state and allocation condition of the resources; if the process execution instruction is successfully executed, the execution engine updates the state and progress of the process;
The index storage sub-module is responsible for the execution engine to record various performance indexes, and comprises: the utilization rate of equipment, the utilization rate of resources, the completion time of working procedures and the like, and the performance index is used for subsequent analysis and optimization; until all instructions in the instruction queue are executed;
The working principle and beneficial effects of the technical scheme are as follows: the method calling submodule execution engine of the embodiment takes out the instructions to be executed from the instruction queue, executes the instructions according to the order of the instructions, calls the corresponding methods of the instruction objects according to the types of the instructions, simulates various operations and events in a production system, and if the instructions are equipment operation instructions, the execution engine calls the operation methods of the equipment objects to simulate the operation of equipment; if the instruction is a resource scheduling instruction, the execution engine can call a scheduling method of the resource manager object to schedule resources; if the instruction is a procedure execution instruction, the execution engine calls an execution method of a procedure object to simulate the execution of a procedure; in the process of executing the instruction, the state updating sub-module transmits parameters to the instruction object according to the transmission parameters, and is used by the instruction object to transmit required materials, parameters of equipment, parameters of working procedures and the like; after the execution of the instruction object is completed, returning an execution result to the execution engine; the execution engine updates the state of the production system according to the result of instruction execution; if the device running instruction is successfully executed, the execution engine updates the state of the device to be running; if the resource scheduling instruction is successfully executed, the execution engine updates the state and allocation condition of the resources; if the process execution instruction is successfully executed, the execution engine updates the state and progress of the process; the index storage sub-module execution engine records various performance indexes, including: the utilization rate of equipment, the utilization rate of resources, the completion time of working procedures and the like, and the performance index is used for subsequent analysis and optimization; until all instructions in the instruction queue are executed; the scheme realizes an execution engine for simulating the production system, and realizes the simulation and control of the production system by sequentially executing the instructions in the instruction queue and simulating various operations and events in the production system, including equipment operation, resource scheduling, procedure execution and the like; the method provides a reliable execution environment for simulating the production system, and can simulate the operation and the event in the actual production process through the instruction in the instruction queue so as to test and verify the system; the update and the record of the production system state, including the equipment state, the resource state, the process state and the like, can be realized by parameter transmission and execution result return in the instruction execution process, and real-time monitoring and management of the production system state are provided; various performance indexes such as the utilization rate of equipment, the utilization rate of resources, the completion time of working procedures and the like can be recorded, and a reliable data source is provided for subsequent analysis and optimization; by sequentially executing the instructions in the instruction queue, the execution sequence and consistency of the production system are ensured, and confusion and errors of instruction execution are avoided; the method can be used for optimizing the operation efficiency and the resource utilization rate of the production system, and can find out the bottleneck and the improvement space in the system by analyzing the recorded performance indexes, thereby improving the overall efficiency of the production system. The present embodiment provides a reliable execution engine for simulating and controlling a production system, and provides effective means and tools for testing, monitoring and optimizing the production system.
It will be apparent to those skilled in the art that various modifications and variations can be made to the present invention without departing from the spirit or scope of the invention. Thus, it is intended that the present invention also include such modifications and alterations insofar as they come within the scope of the appended claims or the equivalents thereof.

Claims (8)

1. The M language-based production system discrete event simulation optimization method is characterized by comprising the following steps of:
The terminal receives triggering operation on a plurality of space templates, generates a control layer corresponding to a production element in a layer generation canvas on a UI design interface, and determines layer relation information and interaction rules among the plurality of control layers; generating a target file comprising a preset structured data relationship based on attribute information, layer relation information and interaction rules corresponding to the control layer, wherein the target file is used for generating a UI interface; the production elements comprise equipment, procedures, resources and workflow;
Calling a modeling interface in the UI, inputting operation content in the modeling interface by a user, generating a corresponding M language code by an operation instruction, converting the M language code into an executable instruction, and transmitting the executable instruction to an execution engine; after receiving the instruction, the execution engine analyzes and compiles the instruction; the analyzed and compiled instruction sequence is transmitted to an instruction factory, and the instruction factory instantiates corresponding instruction objects according to the types of the instructions and adds the corresponding instruction objects to an execution queue;
The execution engine executes the instructions in the instruction queue, and simulates various operations and events in the production system according to the order of the instructions, including the running of equipment, the scheduling of resources and the execution of procedures; the execution engine updates the state of the production system according to the execution result of the instruction and records various performance indexes;
A process for transcoding M language into executable instructions, comprising the steps of:
Receiving operation content input by a user in a modeling interface, responding to an analysis instruction of the operation slave content, analyzing according to a format set input rule of the operation content, and extracting key target information of the operation content, wherein the target information comprises an operation type and a corresponding parameter value;
Generating a corresponding M language code template according to the content of the target information, wherein the M language code template comprises M language instruction set parameters required by operating the content; filling instructions of the operation content into placeholder positions in corresponding M language code templates according to the parameter values, and generating complete M language codes;
Editing the sequencing program of the M language code variable, selecting the sequencing program which is an object endowed with the execution code of the programmable logic controller and refers to the global variable edited by the M language code variable from a plurality of sequencing programs according to the format of the execution code of the programmable logic controller, converting the generated M language code into an executable instruction of the programmable logic controller through a compiler, and enabling an execution engine in the programmable logic controller to be responsible for executing the instruction;
a process for generating a complete M-language code, comprising the steps of:
Obtaining the variable names of placeholders in the M language code template, then analyzing the parameter values, and obtaining specific operation contents required to be filled in the M language code template to obtain the variable names corresponding to the specific operation contents;
According to the instruction of the operation content, analyzing according to the format and the rule of the instruction of the operation content, analyzing the filled value, and filling the analyzed variable name into the corresponding placeholder position in the M language code template; replacing the parsed value to a placeholder position in the M language code template according to the selected placeholder variable name;
generating a final M language code: and outputting the template filled with the placeholders as a final M language code.
2. The M-language based production system discrete event simulation optimization method of claim 1, wherein the process of generating the UI interface by the object file comprises the steps of:
Designing graphics, buttons and input frames according to the target file, establishing the relation between the graphics, buttons and input frames and layer relation information and interaction rules, and arranging the graphics, buttons and input frames in a network layout mode;
Obtaining the position and the size of the content of each network layout in the UI interface, selecting a blank area as an area of the modeling interface, setting an operation panel, wherein the operation panel is used for setting modeling parameters and adjusting model attribute operations, placing the panel at one side or the bottom of the modeling interface, and simultaneously setting a shortcut key to realize the switching between the UI interface and the modeling interface;
when switching to the UI interface, selecting a data set used by the modeling interface and monitoring a model training set to predict a process function.
3. The M-language based production system discrete event simulation optimization method of claim 1, wherein the process of transferring the parsed and compiled instruction sequence to the instruction factory comprises the steps of:
After receiving the instruction, the execution engine firstly analyzes the instruction, the analysis process comprises identifying the type and the parameter of the instruction, and decomposing and analyzing the instruction and the parameter to obtain the related information of the instruction; after the analysis is completed, the execution engine transmits the instruction sequence obtained by the analysis to an instruction factory, and the instruction factory instantiates a corresponding instruction object according to the type of the instruction; the instruction object is the implementation of a specific instruction, and comprises execution logic and related operations of the instruction;
after the instantiation is completed, the instruction object is added into an execution queue, wherein the execution queue is a data structure for storing the instructions to be executed, and the instruction object is added into the execution queue according to the execution sequence, namely, the principle of first-in first-out;
the execution engine takes out the instruction object to be executed from the execution queue, and executes corresponding operation according to the execution logic of the instruction object; the execution process comprises reading and modifying data, performing arithmetic operation and controlling flow; after the execution is completed, the execution engine checks whether an instruction to be executed exists in the execution queue; if yes, continuing to fetch the instruction object from the execution queue for execution; if not, execution ends.
4. The M-language based production system discrete event simulation optimization method of claim 3, wherein the process of instantiating the corresponding instruction object comprises the steps of:
The execution engine transmits the analyzed instruction sequence to an instruction factory, and the instruction factory determines which specific instruction object needs to be instantiated according to the type of the instruction by judging the type of the instruction;
The instruction factory transmits the constructor and the type of the instruction to the script program according to the type of the instruction, and the script program calls the constructor on the script thread to instantiate a specific instruction object; in the process of instantiating the instruction object, the instruction factory transmits parameters to the constructor of the instruction class for initialization according to the requirement;
The instruction factory returns the instantiated instruction object to the execution engine, and the execution engine receives the returned instruction object and then adds the returned instruction object to the execution queue to wait for execution.
5. The M-language based production system discrete event simulation optimization method of claim 1 wherein the process of executing instructions in the instruction queue by the execution engine comprises the steps of:
The execution engine takes out the instructions to be executed from the instruction queue, executes the instructions according to the order of the instructions, calls the corresponding methods of the instruction objects according to the types of the instructions, simulates various operations and events in the production system, and if the instructions are equipment operation instructions, the execution engine calls the operation methods of the equipment objects to simulate the operation of equipment; if the instruction is a resource scheduling instruction, the execution engine can call a scheduling method of the resource manager object to schedule resources; if the instruction is a procedure execution instruction, the execution engine calls an execution method of a procedure object to simulate the execution of a procedure;
In the instruction execution process, an execution engine transmits parameters to an instruction object according to the transmission parameters, and the execution engine is used for the instruction object to transmit required materials, parameters of equipment, parameters of a procedure and the like; after the execution of the instruction object is completed, returning an execution result to the execution engine; the execution engine updates the state of the production system according to the result of instruction execution; if the device running instruction is successfully executed, the execution engine updates the state of the device to be running; if the resource scheduling instruction is successfully executed, the execution engine updates the state and allocation condition of the resources; if the process execution instruction is successfully executed, the execution engine updates the state and progress of the process;
The execution engine records various performance metrics, including: the utilization rate of equipment, the utilization rate of resources and the completion time of working procedures are used for subsequent analysis and optimization; until all instructions in the instruction queue have been executed.
6. An M-language based production system discrete event simulation optimization system, comprising:
the interface generation module is in charge of receiving triggering operations on the plurality of space templates by the terminal, generating a control layer corresponding to the production element in a layer generation canvas on the UI design interface, and determining layer relation information and interaction rules among the plurality of control layers; generating a target file comprising a preset structured data relationship based on attribute information, layer relation information and interaction rules corresponding to the control layer, wherein the target file is used for generating a UI interface;
The code conversion module is responsible for retrieving a modeling interface in the UI interface, inputting operation content in the modeling interface by a user, generating a corresponding M language code by an operation instruction, converting the M language code into an executable instruction, and transmitting the executable instruction to the execution engine; after receiving the instruction, the execution engine analyzes and compiles the instruction; the analyzed and compiled instruction sequence is transmitted to an instruction factory, and the instruction factory instantiates corresponding instruction objects according to the types of the instructions and adds the corresponding instruction objects to an execution queue; wherein, the code conversion module includes:
The content analysis sub-module is in charge of receiving operation content input by a user in the modeling interface, responding to an analysis instruction of the operation slave content, analyzing according to a format set input rule of the operation content, and extracting key target information of the operation content, wherein the target information comprises an operation type and a corresponding parameter value;
The instruction filling sub-module is responsible for generating a corresponding M language code template according to the content of the target information, wherein the M language code template comprises M language instruction set parameters required by operating the content; filling instructions of the operation content into placeholder positions in corresponding M language code templates according to the parameter values, and generating complete M language codes;
wherein generating a complete M-language code comprises:
Obtaining the variable names of placeholders in the M language code template, then analyzing the parameter values, and obtaining specific operation contents required to be filled in the M language code template to obtain the variable names corresponding to the specific operation contents;
According to the instruction of the operation content, analyzing according to the format and the rule of the instruction of the operation content, analyzing the filled value, and filling the analyzed variable name into the corresponding placeholder position in the M language code template; replacing the parsed value to a placeholder position in the M language code template according to the selected placeholder variable name;
generating a final M language code: outputting the template filled with the placeholders as a final M language code;
a code compiling sub-module for compiling a sequence program of the M language code variable, selecting a sequence program of the global variable compiled by referring to the M language code variable as an object giving the execution code of the programmable logic controller from a plurality of sequence programs according to the format of the execution code of the programmable logic controller, converting the generated M language code into an executable instruction of the programmable logic controller by a compiler, and executing the instruction by an execution engine in the programmable logic controller;
The instruction execution module is responsible for executing instructions in an engine execution instruction queue, and simulating various operations and events in the production system according to the order of the instructions, including the running of equipment, the scheduling of resources and the execution of procedures; and the execution engine updates the state of the production system according to the execution result of the instruction and records various performance indexes.
7. The M-language based production system discrete event simulation optimization system of claim 6, wherein the transcoding module further comprises:
The instantiation processing sub-module is in charge of analyzing the instruction after the execution engine receives the instruction, the analysis process comprises the steps of identifying the type and the parameter of the instruction, decomposing and analyzing the instruction and the parameter, and acquiring the related information of the instruction; after the analysis is completed, the execution engine transmits the instruction sequence obtained by the analysis to an instruction factory, and the instruction factory instantiates a corresponding instruction object according to the type of the instruction; the instruction object is the implementation of a specific instruction, and comprises execution logic and related operations of the instruction;
The object adding sub-module is responsible for adding the instruction object into an execution queue after the instantiation is completed, wherein the execution queue is a data structure for storing the instructions to be executed, and the instruction object is added into the execution queue according to the execution sequence, namely, the principle of first-in first-out;
The logic execution sub-module is responsible for taking out an instruction object to be executed from the execution queue by the execution engine, and executing corresponding operation by the execution engine according to the execution logic of the instruction object; the execution process comprises reading and modifying data, performing arithmetic operation and controlling flow; after the execution is completed, the execution engine checks whether an instruction to be executed exists in the execution queue; if yes, continuing to fetch the instruction object from the execution queue for execution; if not, execution ends.
8. The M-language based production system discrete event simulation optimization system of claim 6, wherein the instruction execution module comprises:
The method calling sub-module is responsible for taking out an instruction to be executed from the instruction queue by the execution engine, executing the instruction according to the order of the instruction, calling a corresponding method of an instruction object by the execution engine according to the type of the instruction, simulating various operations and events in a production system, and calling an operation method of the equipment object to simulate the operation of equipment if the instruction is an equipment operation instruction; if the instruction is a resource scheduling instruction, the execution engine can call a scheduling method of the resource manager object to schedule resources; if the instruction is a procedure execution instruction, the execution engine calls an execution method of a procedure object to simulate the execution of a procedure;
The state updating sub-module is responsible for transmitting parameters to the instruction object according to the transmission parameters in the instruction execution process, and transmitting the required materials, parameters of equipment and parameters of a procedure for the instruction object to use; after the execution of the instruction object is completed, returning an execution result to the execution engine; the execution engine updates the state of the production system according to the result of instruction execution; if the device running instruction is successfully executed, the execution engine updates the state of the device to be running; if the resource scheduling instruction is successfully executed, the execution engine updates the state and allocation condition of the resources; if the process execution instruction is successfully executed, the execution engine updates the state and progress of the process;
the index storage sub-module is responsible for the execution engine to record various performance indexes, and comprises: the utilization rate of equipment, the utilization rate of resources and the completion time of working procedures are used for subsequent analysis and optimization; until all instructions in the instruction queue have been executed.
CN202311303276.2A 2023-10-09 2023-10-09 M language-based production system discrete event simulation optimization method and system Active CN117313188B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311303276.2A CN117313188B (en) 2023-10-09 2023-10-09 M language-based production system discrete event simulation optimization method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311303276.2A CN117313188B (en) 2023-10-09 2023-10-09 M language-based production system discrete event simulation optimization method and system

Publications (2)

Publication Number Publication Date
CN117313188A CN117313188A (en) 2023-12-29
CN117313188B true CN117313188B (en) 2024-05-10

Family

ID=89242296

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311303276.2A Active CN117313188B (en) 2023-10-09 2023-10-09 M language-based production system discrete event simulation optimization method and system

Country Status (1)

Country Link
CN (1) CN117313188B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104391730A (en) * 2014-08-03 2015-03-04 浙江网新恒天软件有限公司 Software source code language translation system and method
CN116755669A (en) * 2023-06-16 2023-09-15 杭州指令集智能科技有限公司 Low code development method and tool based on DSL language operation model

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8977997B2 (en) * 2013-03-15 2015-03-10 Mentor Graphics Corp. Hardware simulation controller, system and method for functional verification

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104391730A (en) * 2014-08-03 2015-03-04 浙江网新恒天软件有限公司 Software source code language translation system and method
CN116755669A (en) * 2023-06-16 2023-09-15 杭州指令集智能科技有限公司 Low code development method and tool based on DSL language operation model

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
一种离散事件建模仿真语言系统研究;迟鹏;杨修涛;侯宝存;;系统仿真学报;20150908(09);全文 *
迟鹏 ; 杨修涛 ; 侯宝存 ; .一种离散事件建模仿真语言系统研究.系统仿真学报.2015,(09),全文. *

Also Published As

Publication number Publication date
CN117313188A (en) 2023-12-29

Similar Documents

Publication Publication Date Title
CN100380382C (en) Engineering method and system for industrial automation systems
CN101739484B (en) Knowledge component-based engineering design method
WO2022056735A1 (en) Cloud high-performance scientific calculation workflow design control system and graphical user interface
EP2808784B1 (en) A system and a method for creating a graphical user interface within a manufacturing execution system (MES)
US20150370766A1 (en) Ontology-driven requirements engineering methodology mind-mapper
CN101976067A (en) Flexible assembly line management control experiment platform and management control experiment method
CN111736821A (en) Visual modeling analysis method, system, computer device and readable storage medium
CN114117645B (en) Ship overall performance forecasting integrated application system
He et al. ISA-95 tool for enterprise modeling
CN112068522A (en) Reconfigurable production line manufacturing control system, method, and medium
WO2023004806A1 (en) Device deployment method for ai model, system, and storage medium
Rogers Tools and techniques for decomposing and managing complex design projects
CN117313188B (en) M language-based production system discrete event simulation optimization method and system
CN116859850A (en) Modularized industrial digital twin system
CN111309378A (en) Machine learning model life cycle management system and method
Nawijn et al. Automated finite element analysis in a knowledge based engineering environment
CN111026045B (en) Work management and control method and system
CN114493911A (en) Production line management method and system based on asset management shell
Ottjes et al. Design and control of multi-AGV systems: reuse of simulation software
KR20130049457A (en) Manufacturing execution system, and recording medium for the same
CN112612465A (en) Domain ontology multiplexing-oriented information system and development method
CN112395100A (en) Data-driven complex product cloud service data packet calling method and system
CN110377934A (en) The design and calculation method and device of electronic product peculiar to vessel
Goble MODSIM III—a tutorial
CN114742984B (en) Editing method and device for dynamic three-dimensional model

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant