Scheduling strategy determination method, terminal equipment and computer readable storage medium
Patent Information
- Application Number
- CN202380046009.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-24
- Publication Date
- 2025-01-17
AI Technical Summary
In the existing technology, the AGV scheduling strategy optimization efficiency is low and the scheduling strategy needs to be manually formulated, resulting in a heavy development workload and difficulty in optimizing the strategy.
By establishing the process model of the simulation model and linearly planning it according to the scheduling task objectives, the optimal scheduling strategy is automatically generated, the amount of data is reduced, and the optimization efficiency of the scheduling strategy is improved.
It realizes the optimization of AGV scheduling strategy, simplifies program development, reduces the difficulty of code maintenance, and improves the optimization efficiency of scheduling strategy.
Smart Images

Figure CN119325580A_ABST
Abstract
Description
Scheduling strategy determination method, terminal device, and computer-readable storage medium Technical Field
[0001] The present application belongs to the field of intelligent control technology, and in particular relates to a scheduling strategy determination method, a terminal device, and a computer-readable storage medium. Background Art
[0002] An Automated Guided Vehicle (AGV), also known as an automated guided vehicle, is a transport vehicle equipped with automated guidance devices, such as electromagnetic or optical ones, that can travel along a prescribed path and features safety protection and various transfer functions. AGVs are often used in large-scale manufacturing systems. Their proper use not only improves the automation level of the system but also reduces production costs and improves efficiency. Large-scale manufacturing systems often require multiple AGVs of varying types, and coordinated scheduling between them is crucial to ensuring the proper operation of the system.
[0003] Currently, simulation software is typically used to build a simulation model of the AGV working environment. A scheduling strategy is then manually formulated, and the AGVs in the simulation model are then controlled based on the scheduling strategy. The scheduling results are then obtained through simulation. This approach, because the scheduling strategy is manually formulated, cannot guarantee optimal scheduling. If the scheduling strategy is unreasonable, it must be re-formulated, resulting in a high workload for program development and low optimization efficiency.
[0004] Summary of the Invention
[0005] The embodiments of the present application provide a scheduling strategy determination method, a terminal device, and a computer-readable storage medium, which can improve the optimization efficiency of the scheduling strategy of an unmanned guided vehicle.
[0006] In a first aspect, an embodiment of the present application provides a method for determining a scheduling strategy, including:
[0007] Performing process modeling on the simulation model to obtain a process model, wherein the simulation model is a model of the working environment of the unmanned guided vehicle generated by simulation software, and the process model is used to represent the action process of the dynamic objects in the simulation model;
[0008] The process model is linearly programmed according to the scheduling task objectives to obtain a scheduling strategy.
[0009] In an embodiment of the present application, a scheduling strategy is obtained by establishing a process model of the simulation model and performing linear programming on the process model according to the scheduling task objectives. The scheduling strategy determination method provided in an embodiment of the present application automatically generates an optimal scheduling strategy through linear programming of the process model, thereby ensuring optimal scheduling. Furthermore, because this method can automatically generate a scheduling strategy, it eliminates the need for manual coding / modification of the calling strategy code, simplifying program development workload and improving the optimization efficiency of the calling strategy.
[0010] In a possible implementation of the first aspect, performing process modeling on the simulation model to obtain the process model includes:
[0011] Acquiring parameter data in the simulation model, wherein the parameter data includes first attribute information of a physical entity in the simulation model;
[0012] The process model is established based on the parameter data.
[0013] In the embodiment of the present application, the process model can describe the task process more accurately, and compared with the simulation model, the process model has the characteristics of simple model and smaller data parameters. Therefore, by generating a process model based on the simulation model and then using the process model to plan the scheduling strategy, it is possible to effectively reduce the amount of data in the processing process while ensuring the optimization of the scheduling strategy, thereby achieving the rapid implementation of the optimization of the scheduling strategy.
[0014] Optionally, the process model uses Petri nets. Petri nets are a mathematical representation of discrete parallel systems. They are suitable for describing asynchronous and concurrent computer system models. Petri nets offer both rigorous mathematical representations and intuitive graphical representations, providing a rich set of system description tools and behavioral analysis techniques while also providing a solid conceptual foundation for computer science.
[0015] In a possible implementation of the first aspect, establishing the process model according to the parameter data includes:
[0016] generating a document in a preset format according to the parameter data, wherein the preset format is a lightweight data exchange format, and the document includes first attribute information of a physical entity in the simulation model;
[0017] The process model is generated according to the document in the preset format.
[0018] Optional, the default format is JSON.
[0019] In this embodiment, the acquired parameter data from the simulation model is first converted into a lightweight data exchange format, and then a process model is generated based on the converted data. This approach effectively improves data transmission efficiency; the use of JSON format is easy to read and write, as well as easy for machine parsing and generation, effectively improving the efficiency of process model construction and reducing program compilation errors.
[0020] In a possible implementation of the first aspect, the process model includes places, transitions, directed arcs, and tokens; wherein the places represent locations, the transitions represent events, the directed arcs are used to connect places and transitions and represent the relationship between event occurrences, and the tokens represent dynamic objects in the simulation model and are used to move from one place to another.
[0021] Generating the process model according to the document in the preset format includes:
[0022] generating a place in the process model according to first attribute information of a physical entity in the document;
[0023] Transitions, directed arcs and tokens are added to the library according to the first attribute information of the physical entity in the document.
[0024] In the embodiment of the present application, the process model can describe the task process more accurately, and compared with the simulation model, the data parameters of the process model are smaller. Therefore, by generating a process model based on the simulation model and then using the process model to plan the scheduling strategy, the amount of data in the processing process can be effectively reduced while ensuring the optimization of the scheduling strategy, thereby achieving the rapid implementation of the optimization of the scheduling strategy.
[0025] In a possible implementation of the first aspect, performing linear programming on the process model according to the scheduling task objective to obtain a scheduling strategy includes:
[0026] mapping a time function for each of the transitions in the process model to obtain a processed process model;
[0027] The processed process model is subjected to linear programming according to the scheduling task target to obtain the scheduling strategy.
[0028] In the embodiment of the present application, the transition mapping time function is equivalent to time coloring the process model, so that the process model has the task processing priority and the ability to solve instantaneous actions and delayed acquisition.
[0029] Optionally, you can colorize tokens in the process model so that different colors represent different characteristics. For example, different colors could represent different types of resources that an automated guided vehicle can transport. You can also add temporal logic to the process model to more accurately describe the behavioral processes of the transitions within it.
[0030] In the embodiment of the present application, by adding attribute information such as time and color to the process model, the information expressed by the process model is richer and closer to the actual task environment of the unmanned guided vehicle, providing reliable data guarantee for the optimization processing of subsequent scheduling strategies.
[0031] In a possible implementation of the first aspect, performing linear programming on the processed process model according to the scheduling task objective to obtain the scheduling strategy includes:
[0032] Establishing a linear programming mathematical model according to the scheduling task target and the processed process model;
[0033] An optimal solution of the mathematical model is calculated, where the optimal solution is the scheduling strategy.
[0034] Optionally, a Mixed Integer Linear Program (MILP) is employed in the embodiments of the present application. Since some decision variables (such as the number of transitions and inventory) are integers, the use of MILP can facilitate faster and more accurate calculation of the optimal solution while ensuring that the constraints are met.
[0035] In a possible implementation of the first aspect, the mathematical model includes target conditions and constraint conditions;
[0036] Calculating the optimal solution of the mathematical model includes:
[0037] During each iteration, an actual transition sequence corresponding to each transition of the process model is calculated based on the constraint conditions, wherein the actual transition sequence includes actual state values of each of the multiple transitions in the process model;
[0038] When a target sequence is obtained, the optimal solution is generated according to the target sequence, wherein the target sequence includes an actual transition sequence corresponding to each transition of the process model in an iterative process that satisfies the target condition.
[0039] In a possible implementation of the first aspect, during each iteration, sequentially calculating an actual transition sequence corresponding to each transition of the process model based on the constraint condition includes:
[0040] For the Nth iteration process, obtaining the actual transition sequence and model state corresponding to the process model of the N-1th iteration process, where N is an integer greater than 1;
[0041] Calculating a theoretical transition sequence corresponding to the process model in the N-th iteration process according to the constraint conditions, the actual transition sequence corresponding to the process model in the N-1th iteration process, and the model state;
[0042] Converting the theoretical transition sequence into scheduling instructions for being recognized by the simulation software;
[0043] The transition in the process model is triggered according to the scheduling instruction, and an actual transition sequence corresponding to the process model in the Nth iteration process is obtained.
[0044] In the embodiments of the present application, data exchange between different software programs is achieved through data format conversion. By isolating the simulation model, process model, and linear programming mathematical model in this way, data can be processed in parallel, improving simulation efficiency. During the development process, simply setting up an interface allows for parallel development of different software programs, which helps improve development efficiency. Furthermore, if code issues arise, only the code of the corresponding software needs to be modified, reducing the difficulty of code maintenance.
[0045] In a second aspect, an embodiment of the present application provides a scheduling device, including:
[0046] a modeling unit, configured to perform process modeling on the simulation model to obtain a process model, wherein the simulation model is a model of the working environment of the unmanned guided vehicle generated by simulation software, and the process model is used to represent the motion process of the dynamic objects in the simulation model;
[0047] The planning unit is used to perform linear programming on the process model according to the scheduling task objectives to obtain a scheduling strategy.
[0048] In a third aspect, an embodiment of the present application provides a terminal device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the scheduling strategy determination method as described in any one of the first aspects above is implemented.
[0049] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the scheduling strategy determination method as described in any one of the above-mentioned first aspects is implemented.
[0050] In a fifth aspect, an embodiment of the present application provides a computer program product. When the computer program product is run on a terminal device, the terminal device executes the scheduling strategy determination method described in any one of the above-mentioned first aspects.
[0051] It can be understood that the beneficial effects of the second to fifth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments or descriptions of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0053] FIG1 is a flow chart of a method for determining a scheduling strategy according to an embodiment of the present application;
[0054] FIG2 is a schematic diagram of a Petri net provided in an embodiment of the present application;
[0055] FIG3 is a layout diagram provided in an embodiment of the present application;
[0056] FIG4 is a schematic diagram of a simulation process provided by an embodiment of the present application;
[0057] FIG5 is a structural block diagram of a scheduling device provided in an embodiment of the present application;
[0058] FIG6 is a schematic diagram of the structure of a terminal device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0059] In the following description, specific details such as specific system structures and techniques are provided for purposes of illustration rather than limitation to facilitate a thorough understanding of the embodiments of the present application. However, it will be apparent to those skilled in the art that the present application may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid obscuring the description of the present application with unnecessary detail.
[0060] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or collections thereof.
[0061] It will also be understood that the term "and / or" used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
[0062] As used in this specification and the appended claims, the term "if" can be interpreted as "when" or "upon" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "upon determination" or "in response to determining" or "upon detection of [described condition or event]" or "in response to detecting [described condition or event]," depending on the context.
[0063] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.
[0064] References to "one embodiment" or "some embodiments" in this specification mean that a particular feature, structure, or characteristic described in conjunction with the embodiment is included in one or more embodiments of the present application. Thus, phrases such as "in one embodiment," "in some embodiments," "in other embodiments," and "in yet other embodiments" appearing in various places in this specification do not necessarily refer to the same embodiment, but rather mean "one or more but not all embodiments," unless otherwise specifically emphasized.
[0065] An Automated Guided Vehicle (AGV), also known as an automated guided vehicle, is a transport vehicle equipped with automated guidance devices, such as electromagnetic or optical ones, that can travel along a prescribed path and features safety features and various transfer functions. AGVs are often used in large-scale manufacturing systems. Their proper use not only improves the automation level of the system but also reduces production costs and improves efficiency. Large-scale manufacturing systems often require multiple AGVs of varying types, and coordinated scheduling between them is crucial to ensuring the system's proper operation.
[0066] In related technologies, the optimization design of AGV scheduling strategies usually adopts the following two methods:
[0067] Method 1: In the same simulation software (such as Plant Simulation or Flexsim), write a complete set of AGV scheduling simulation code, including the code of the AGV scheduling strategy (such as scheduling controller logic) and the AGV controlled behavior.
[0068] Method 2: Write the AGV controlled behavior in the simulation software, write the AGV scheduling strategy code outside the simulation environment, and use the communication interface to implement the AGV scheduling strategy code to control the AGV in the simulation environment.
[0069] Both of the above approaches use simulation software to build a simulation model of the AGV working environment, manually formulate a scheduling strategy, and then control the AGVs in the simulation model based on the scheduling strategy, obtaining scheduling results through simulation. In this approach, since the scheduling strategy is manually formulated, it cannot guarantee optimal scheduling. If the scheduling strategy is unreasonable, it must be re-formulated, resulting in a large program development workload and low scheduling strategy optimization efficiency.
[0070] In order to solve the above problems, an embodiment of the present application provides a method for determining a scheduling strategy. In an embodiment of the present application, a process model of a simulation model is established, and linear programming of the process model is performed according to the scheduling task objectives to obtain a scheduling strategy. In the scheduling strategy determination method provided in an embodiment of the present application, the optimal scheduling strategy is automatically generated by linear programming of the process model, which can ensure the optimization of scheduling; in addition, since this method can automatically generate a scheduling strategy, there is no need to manually write / modify the code for the calling strategy, which simplifies the workload of program development and improves the optimization efficiency of the calling strategy.
[0071] 1 is a flow chart of a method for determining a scheduling strategy according to an embodiment of the present application. As an example and not a limitation, the method may include the following steps:
[0072] S101, performing process modeling on the simulation model to obtain a process model.
[0073] The simulation model is a model of the AGV's working environment generated using simulation software. Examples of such software include Plant Simulation and Flexsim. Plant Simulation is software for simulating and optimizing factories, production lines, and production logistics processes. Flexsim is a Windows-based, object-oriented simulation environment for establishing discrete event processes.
[0074] In some application scenarios, the simulation model can be presented in the form of a two-dimensional plane diagram. In other application scenarios, the simulation model can be presented in the form of a three-dimensional diagram (such as a virtual reality environment).
[0075] The physical equipment in the working environment of an AGV corresponds to the physical entities in the simulation software. For example, if the working environment of an AGV is a factory, the simulation model will include the physical entities corresponding to each of the physical equipment within the factory, including the production lines, production equipment on the production lines, AGVs, AGV tracks, AGV charging stations, warehouses, and cache locations. The simulation model must be constructed based on the actual factory layout. For example, the docking ports and cache locations of the raw material warehouse and finished product warehouse, the loading and unloading ports of each production equipment on the production line, and the location of AGV charging stations within the factory area should all conform to the actual factory layout.
[0076] The process model is used to represent the movement process of the unmanned guided vehicle in the simulation model.
[0077] Optionally, the process model can use Petri nets. Petri nets are a mathematical representation of discrete parallel systems. They are suitable for describing asynchronous and concurrent computer system models. Petri nets offer both rigorous mathematical representations and intuitive graphical representations, providing a rich set of system description tools and behavioral analysis techniques while also providing a solid conceptual foundation for computer science.
[0078] A Petri net is a process model that typically includes elements such as places, transitions, directed arcs, and tokens. A place represents a location, specifically a geographical point, location, or channel. For example, an AGV track in a factory can be represented as a place in a Petri net, and a warehouse in a factory can be represented as a place. A transition represents an event. A transition not only represents the motion of a dynamic object, but also the state change before and after the event occurs. For example, an automated guided vehicle moving from one place to another is a transition, and materials being moved from one warehouse to another is a transition. A directed arc is a directional line that connects places and transitions and represents the relationship between events. As shown in Figure 2, directed arc 23 connects place n1 and transition t1, and directed arc 24 connects transition t1 and place n2. Directed arcs 23 and 24 indicate that transition t1 occurs between places n1 and n2. In a Petri net, arcs are not allowed between two places or transitions. Tokens represent dynamic objects in the simulation model and are used to move from one place to another. Places can be used for any number of tokens. For example, in an automated guided vehicle (AGV) scenario, the AGV and the materials it carries are dynamic objects. A transition is allowed if each input place of the transition has a token. When a transition is allowed, the transition occurs, the tokens of the input places are consumed, and tokens are generated for the output places.
[0079] Refer to Figure 2, which is a schematic diagram of the Petri net provided by an embodiment of the present application. As shown in Figure 2, there are two places n1 and n2, and the transitions between n1 and n2 are t1 and t2. As shown in (a) in Figure 2, token 21 (black solid circle) is in place n1. When transition t1 is satisfied, token 21 transitions to place n2 via directed arc 23 and directed arc 24, and at the same time, token 21 is deleted from place n1 and token 21 is added to place n2 (the process from (a) in Figure 2 to (b) in Figure 2). When transition t2 is satisfied, token 21 transitions to place n1 via directed arc 25 and directed arc 26, and at the same time, token 22 is added to place n1 and token 21 is deleted from place n2 (the process from (b) in Figure 2 to (a) in Figure 2).
[0080] It should be noted that the process model is not limited in the embodiments of the present application, and other models with similar or identical principles may also be used, such as a timed automaton model.
[0081] In some embodiments, an implementation of S101 may include:
[0082] Acquire parameter data in the simulation model, wherein the parameter data includes first attribute information of a physical entity in the simulation model; and establish the process model according to the parameter data.
[0083] In an embodiment of the present application, the first attribute information may include fixed attributes and variable attributes, etc. For example, for an AGV, its first attribute information may include the AGV number (fixed attribute), the current position of the AGV (variable attribute), the current power (variable attribute), and the movement route (fixed attribute), etc. For a warehouse, its first attribute information may include the warehouse location (fixed attribute), the number of storable materials (fixed attribute), the number of currently stored materials (variable attribute), and the type of storable materials (fixed attribute), etc. For a production line, its first attribute information may include the production line location (fixed attribute), the production type (fixed attribute), the estimated completion time (variable attribute), and the production unit time (fixed attribute), etc.
[0084] In some application scenarios, simulation software, software for generating process models, and calculation software for linear programming can be installed on the terminal device separately. The different software can exchange data through program interfaces.
[0085] In one implementation of acquiring parameter data, a terminal device can capture parameter data from a simulation software program and send the parameter data to the software used to generate the process model. For example, keywords can be set, and an automatic capture program can identify the keywords in the simulation software program to capture the corresponding parameter data. Optionally, a data table can be generated with the keywords and the parameter data corresponding to the captured keywords to facilitate the subsequent establishment of the process model.
[0086] Usually, the amount of parameter data involved in a simulation model is large. If conventional data formats (such as the data format of simulation software) are used to transmit data, the data transmission efficiency is low.
[0087] In order to solve the above problem, in some embodiments, the method of establishing the process model based on the parameter data includes: generating a document in a preset format based on the parameter data, wherein the preset format is a lightweight data exchange format, and the document includes first attribute information of the physical entity in the simulation model; generating the process model based on the document in the preset format.
[0088] Optionally, the preset format can be JSON (JavaScript Object Notation). This format uses a text format that is completely independent of the programming language to store and represent data. Its hierarchical structure is concise and clear, making it easy to read and write. It is also easy for machines to parse and generate, and effectively improves network transmission efficiency.
[0089] Exemplarily, the JSON definition of a node is "Node":{"1":{"index":1,"coordinates":[x,y]}}, where index marks the index of each node, and [x,y] is the coordinate of the node. The position of each entity is determined by a node. For entities with limited length, one node is mapped. For entities with length parameters, the coordinates are determined by multiple nodes. See Figure 3, which is a layout diagram provided by an embodiment of the present application. As shown in Figure 3, 8 nodes 0-8 are defined, and nodes 0-5 are nodes in the AGV running track. The track is divided into multiple sections by nodes, where nodes 0, 1, 3, 4, and 5 are marked with the locations of charging piles, raw material warehouses, unloading stations, loading stations, and finished product warehouses, respectively. The production line is an entity with limited length, and its coordinates are determined by nodes 6-7.
[0090] The JSON format of parameter data for different entities is as follows:
[0091] Each AGV track is an arc, and its parameter data is defined in JSON format as "Arc":{"1":{"index":1,"direction":"directed","from":node,"to":node,"to":node,"distance":1}}. Index indicates the index of each arc, and "direction" represents the direction of the arc. A value of "directed" indicates a directed arc, while a value of "undirected" indicates an undirected arc. "from" and "to" represent the endpoints of the arc, respectively. "distance" is the length of the arc, which is related to the time the AGV spends running on the track.
[0092] The JSON definition of the warehouse parameter data is "Warehouse":{"1":{"index":1, "coordinate":2,"capacity":20,"quantity":20}}. The JSON definition of the loading station is "Loadstation":{"1":{"index":1,"coordinate":2,"capacity":10,"quantity":10}}. The JSON definition of the unloading station is "Unloadstation":{"1":{"index":1,"coordinate":node,"capacity":10,"quantity":10}}. Among them, "index" is the index of each entity; the value of "coordinate" is the index of the node corresponding to the entity. For example, the coordinate value of "Loadstation" with index 1 is 2, indicating the index of the node where the model is located, that is, node["index"] = 2; "capacity" represents the maximum capacity of the entity, and the value of "quantity" represents the actual load of the entity.
[0093] The JSON definition of the production line's parameter data is "Machine":{"1":{"index":1,"loadpoints":[4,8],"unloadpoints":[5,7],"cost":[10,6],"rate":[3,2]}}. The values in "unloadpoints" are the output locations of the production line's finished products, and the values in "loadpoints" are the input locations of the production line's raw materials. The numbers in the array represent the node positions corresponding to the input positions. For example, [4,8] indicates that the production line has two finished product unloading locations, and the node indexes of each location are 4 and 8, which can be used to distinguish the loading points of different products. Similarly, [5,7] indicates that the raw material output locations of the production line correspond to node indexes 5 and 7, which are used to distinguish the input of different raw materials. The value of "cost" indicates the material consumption rate. For example, [10,6] means that the first raw material input position consumes 10 units of raw material 1 per unit time, and the second raw material input position consumes 6 units of raw material 2 per unit time. "rate" is used to describe the production speed of the production line. For example, [3,2] means that the production line produces two products. The first product is output from the first position and 3 units of product 1 are produced per unit time. The second product is output from the second position and 2 units of product 2 are produced per unit time.
[0094] The JSON definition of the charging station parameter data is "Charge":{"1":{"index":1,"coordinate":2,"rate":2}}. "index" is the index of each charging station, "coordinate" is the index of the corresponding node, and "rate" represents the AGV charging efficiency. For example, a rate value of 2 means that it takes 2 units of time for each AGV to fully charge (100%) from a low power state (0%).
[0095] The JSON definition of AGV parameter data is "AGV":{"1":{"index":1,"coordinate":1,"type":1,"cost":[2,2,1,0.5],"rate":[1,2,…]},"battery":50}. "index" is the index of each AGV, "coordinate" is the node index, which initializes the AGV's position, and "type" is the AGV type, describing different states such as empty and loaded. The values in the "cost" array represent the time required for the AGV to perform actions such as loading, unloading, moving with a full load, and moving without a load. The "rate" array represents the power consumption of each AGV per unit time. For example, [0.2,0.2,1,0.5] indicates that loading and unloading consume 0.2% of the power, moving a full load consumes 1% of the power per unit distance, and moving an empty load consumes 0.5% of the power per unit distance. "battery" initializes the remaining power of the AGV. For example, 50 indicates that the AGV currently has 50% power remaining.
[0096] In this embodiment, the acquired parameter data from the simulation model is first converted into a lightweight data exchange format, and then a process model is generated based on the converted data. This approach effectively improves data transmission efficiency; the use of JSON format is easy to read and write, as well as easy for machine parsing and generation, effectively improving the efficiency of process model construction and reducing program compilation errors.
[0097] In some embodiments, the implementation method of generating the process model based on the document in the preset format may include: generating a library in the process model based on the first attribute information of the physical entity in the document; adding transitions, directed arcs and tokens to the library based on the first attribute information of the physical entity in the document.
[0098] In the embodiment of the present application, each entity recorded in a document of a preset format can be mapped to a Petri net structure. The Petri net structures corresponding to each entity are connected into an overall structure through the positional relationship between the nodes. Transitions, directed arcs, and tokens are then added to the overall structure to obtain a process model.
[0099] For example, the coordinates of the entity can be determined based on the index of the node corresponding to each entity recorded in the document, and the place corresponding to the entity can be generated based on the coordinates of the entity. Then, based on the other attributes of each entity recorded in the document, transitions, directed arcs, and tokens are added to the place corresponding to the entity. For example, based on the "quantity": 10" of the unloading station recorded in the document, the number of tokens in the place corresponding to the unloading station is set to 10. For another example, based on the "quantity": 20" of the warehouse recorded in the document, the number of tokens in the place corresponding to the warehouse is set to 20.
[0100] The process model can describe the task process more accurately, and compared with the simulation model, the process model has the characteristics of simple model and smaller data parameters. Therefore, generating a process model based on the simulation model and then using the process model to plan the scheduling strategy can effectively reduce the amount of data in the processing process while ensuring the optimization of the scheduling strategy, thereby achieving the rapid implementation of the optimization of the scheduling strategy.
[0101] S102: performing linear programming on the process model according to the scheduling task target to obtain a scheduling strategy.
[0102] In the embodiment of the present application, the scheduling task goal can be a single goal such as shortest completion time, shortest sum of driving paths, minimum inventory, etc. Of course, the scheduling task goal can also include multiple single goals.
[0103] In an embodiment of the present application, in a process model, a scheduling strategy refers to an actual transition sequence corresponding to each transition required in the process of completing a scheduling goal, and the actual transition sequence corresponding to each transition includes the actual state value of each step of the transition in each transition process model.
[0104] Linear programming (LP) is a mathematical theory and method for solving extreme value problems for linear objective functions under linear constraints. LP can solve any linear problem. It has a unified algorithm and is a method for solving optimal decisions for multiple variables.
[0105] In the embodiment of the present application, S102 may include the following steps:
[0106] 1) Establish a linear programming mathematical model for the process model based on the scheduling task objectives.
[0107] In the embodiments of the present application, the mathematical model of linear programming includes target conditions and constraints. The target conditions can be embodied as an objective function, which is determined based on the scheduling task objectives. Specifically, decision variables are found based on factors that influence the scheduling task objectives to be achieved, and the objective function is determined by the functional relationship between the decision variables and the scheduling task objectives to be achieved.
[0108] Constraints are the restrictions imposed on achieving the scheduling task objectives. Specifically, the constraints imposed on the decision variables determine the constraints that the decision variables must satisfy. In the mathematical model of linear programming, the objective condition is a linear function, and the constraints are linear equations or linear inequalities. Solving a linear programming problem is equivalent to calculating the optimal solution (also called the optimal value) of the objective function, assuming that the decision variables satisfy the constraints.
[0109] Optionally, a mixed integer linear program (MILP) is employed in the embodiments of the present application. If some decision variables in a linear programming problem must be integers, then the programming problem is transformed into a mixed integer linear programming problem. In other words, the optimization problem has not only conditional constraints, but also integer constraints.
[0110] Because some decision variables (such as the number of transitions and inventory) in this embodiment are integers, conventional linear programming can only satisfy the lower bound of the constraints and may not yield an optimal solution. MILP, however, can more quickly and accurately calculate the optimal solution while ensuring that the constraints are satisfied.
[0111] 2) Calculate the optimal solution of the mathematical model of linear programming, where the optimal solution is the scheduling strategy.
[0112] In the embodiment of the present application, the linear programming problem can be solved by iteratively calculating the optimal solution. Specifically, the solution steps may include:
[0113] During each iteration, an actual transition sequence corresponding to each transition of the process model is calculated based on the constraint conditions, wherein the actual transition sequence includes actual state values of each of the multiple transitions in the process model;
[0114] When a target sequence is obtained, the optimal solution is generated according to the target sequence, wherein the target sequence includes an actual transition sequence corresponding to each transition of the process model in an iterative process that satisfies the target condition.
[0115] The process model contains multiple transitions. Each iteration includes all the transitions the process model undergoes from its initial state to its target state (i.e., achieving the target conditions), and each transition includes the state values of each of the multiple transitions in the process model. For example, if there are a transitions in the process model, and each iteration requires the process model to undergo b transitions, the iteration result of each iteration includes the state values of each of the a transitions out of the b transitions. Each of the b transitions corresponds to a transition sequence, and this transition sequence includes the state values of each of the a transitions.
[0116] For example, when the scheduling task goal is to complete the production order in the shortest time, the established objective function is expressed as Among them, K is the number of transitions required to complete production, T k is the time required for the kth transition. The constraint condition can be expressed as: M k-1 ≥C - ·x k x′ k =λ k ·x k M k =M k-1 +C·x′ k A k ≥0 M K =M F k=1,2,3…,K-1,K
[0117] Among them, x k represents the kth corresponding theoretical change, represents the theoretical state value of the i-th transition in the process model, x k (i)=1 means if and only if transition t i In state M k Can be triggered. k Indicates the actual transition corresponding to the kth time (the transition actually triggered), represents the actual state value of the i-th transition in the process model, x′ k (i)=1 means if and only if transition t i In state M k The actual trigger is: k =λ k ·x k ,λ k is a diagonal matrix. Assuming that there are m transitions in the Petri net model, then in A k Indicates the amount of electricity in the transport unit, C - is the input correlation matrix of the Petri net model, C is the correlation matrix of the Petri net model, M k-1 is the model state of the Petri net model when k-1 transitions occur, M k is the model state of the Petri net model at k transitions, M F is the target state of the Petri net model, corresponding to the state when the production order is completed.
[0118] Calculate the optimal solution of the above mathematical model, which is the scheduling strategy of the transport unit. Specifically, perform iterative calculations according to the above mathematical model to obtain the matrix of K changes in each iteration process Thus, the actual transition sequence x′ of the process model K transitions in each iteration can be obtained k If the Nth iteration process satisfies the above scheduling task goal (i.e. the shortest time required to complete the production order), then the actual transition sequence x′1, x′2, …, x′ corresponding to the K transitions occurring in the Nth iteration process will be K Determine the scheduling strategy for the transport unit.
[0119] As described in the above embodiments, in some application scenarios, simulation software, software for generating process models, and calculation software for linear programming can be installed separately on the terminal device. Data can be exchanged between different software via program interfaces. Based on this, in order to implement scheduling simulation and obtain simulation data, in some embodiments, each iteration process can include the following steps:
[0120] I. For the Nth iteration process, obtain the actual transition sequence and model state corresponding to the process model of the N-1th iteration process, where N is an integer greater than 1.
[0121] For the first iteration process, the initial value of the actual transition sequence corresponding to the process model and the initial value of the model state of the process model may be set.
[0122] II. Calculate the theoretical transition sequence corresponding to the process model in the Nth iteration process based on the constraint conditions, the actual transition sequence corresponding to the process model in the N-1th iteration process, and the model state.
[0123] The model state of a process model includes the current number of tokens in all places in the process model.
[0124] III. Convert the theoretical transition sequence into scheduling instructions for being recognized by the simulation software.
[0125] IV. Triggering the transition in the process model according to the scheduling instruction to obtain an actual transition sequence corresponding to the process model in the Nth iteration process.
[0126] Referring to Figure 4, it is a schematic diagram of the simulation process provided by an embodiment of the present application. In the application scenario shown above, the software of the process model obtains parameter data from the simulation software and generates a process model based on the parameter data. After the simulation starts, the calculation software of the linear programming receives the scheduling task target (such as S401 in Figure 4), obtains model parameters from the process model, generates a mathematical model of the linear programming based on the model parameters and the scheduling task target, and calculates the iteration result (theoretical transition sequence) of the current iterative process based on the actual transition sequence and model state of the current process model (such as S402 in Figure 4), and then converts the iteration result into a scheduling instruction and returns it to the simulation software; the simulation software performs simulation according to the scheduling instruction (such as the trigger simulation shown in S403 in Figure 4); the software of the process model obtains the simulation result from the simulation software, and updates the actual transition sequence and model state of the process model according to the simulation result; the calculation software obtains the real-time transition sequence and model state from the software of the process model, and calculates the iteration result of the next iteration. And so on, until the target condition is reached.
[0127] In the embodiments of the present application, data exchange between different software programs is achieved through data format conversion. By isolating the simulation model, process model, and linear programming mathematical model in this way, data can be processed in parallel, improving simulation efficiency. During the development process, simply setting up an interface allows for parallel development of different software programs, which helps improve development efficiency. Furthermore, if code issues arise, only the code of the corresponding software needs to be modified, reducing the difficulty of code maintenance.
[0128] In some embodiments, S102 may further include the following steps:
[0129] A time function is mapped for each transition in the process model to obtain the processed process model; and linear programming is performed on the processed process model according to the scheduling task objective to obtain the scheduling strategy.
[0130] In the embodiment of the present application, the transition mapping time function is equivalent to time coloring the process model, so that the process model has the task processing priority and the ability to solve instantaneous actions and delayed acquisition.
[0131] Optionally, you can colorize tokens in the process model so that different colors represent different characteristics. For example, different colors could represent different types of resources that an automated guided vehicle can transport. You can also add temporal logic to the process model to more accurately describe the behavioral processes of the transitions within it.
[0132] In the embodiment of the present application, by adding attribute information such as time and color to the process model, the information expressed by the process model is richer and closer to the actual task environment of the unmanned guided vehicle, providing reliable data guarantee for the optimization processing of subsequent scheduling strategies.
[0133] In the scheduling strategy determination method provided in the embodiment of FIG1 , a scheduling strategy is obtained by establishing a process model of a simulation model and performing linear programming on the process model according to the scheduling task objectives. By automatically generating the optimal scheduling strategy through linear programming of the process model, scheduling optimization can be ensured. Because this method can automatically generate the scheduling strategy, there is no need to manually write / modify the control code for calling the strategy, which simplifies the program development workload and improves the optimization efficiency of calling the strategy. In addition, compared with the control code for calling the strategy, the development code for the process model and the linear programming development code is smaller in code size and less frequently updated, thereby effectively reducing the maintenance workload and difficulty of subsequent code.
[0134] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0135] Corresponding to the scheduling strategy determination method described in the above embodiment, Figure 5 is a structural block diagram of the scheduling device provided in the embodiment of the present application. For the sake of convenience, only the parts related to the embodiment of the present application are shown.
[0136] Referring to FIG5 , the device includes:
[0137] The modeling unit 51 is used to perform process modeling on the simulation model to obtain a process model, wherein the simulation model is a model of the working environment of the unmanned guided vehicle generated by simulation software, and the process model is used to represent the action process of the dynamic object in the simulation model.
[0138] The planning unit 52 is used to perform linear programming on the process model according to the scheduling task objectives to obtain a scheduling strategy.
[0139] Optionally, the modeling unit 51 is further configured to:
[0140] Acquire parameter data in the simulation model, wherein the parameter data includes first attribute information of a physical entity in the simulation model; and establish the process model according to the parameter data.
[0141] Optionally, the modeling unit 51 is further configured to:
[0142] A document in a preset format is generated according to the parameter data, wherein the preset format is a lightweight data exchange format and the document includes first attribute information of a physical entity in the simulation model; and the process model is generated according to the document in the preset format.
[0143] Optionally, the process model includes places, transitions, directed arcs, and tokens; wherein the places represent locations, the transitions represent events, the directed arcs connect places and transitions and represent the relationship between event occurrences, and the tokens represent dynamic objects in the simulation model and are used to move from one place to another. Accordingly, the modeling unit 51 is further configured to:
[0144] generating a place in the process model according to first attribute information of a physical entity in the document;
[0145] Transitions, directed arcs and tokens are added to the library according to the first attribute information of the physical entity in the document.
[0146] Optionally, the planning unit 52 is further configured to:
[0147] A time function is mapped for each transition in the process model to obtain the processed process model; and linear programming is performed on the processed process model according to the scheduling task objective to obtain the scheduling strategy.
[0148] Optionally, the planning unit 52 is further configured to:
[0149] A linear programming mathematical model is established according to the scheduling task target and the processed process model; and an optimal solution of the mathematical model is calculated, where the optimal solution is the scheduling strategy.
[0150] Optionally, the mathematical model includes target conditions and constraint conditions. Accordingly, the planning unit 52 is further configured to:
[0151] During each iteration, an actual transition sequence corresponding to each transition of the process model is calculated based on the constraint conditions, wherein the actual transition sequence includes actual state values of each of the multiple transitions in the process model;
[0152] When a target sequence is obtained, the optimal solution is generated according to the target sequence, wherein the target sequence includes an actual transition sequence corresponding to each transition of the process model in an iterative process that satisfies the target condition.
[0153] Optionally, the planning unit 52 is further configured to:
[0154] For the Nth iteration process, obtaining the actual transition sequence and model state corresponding to the process model of the N-1th iteration process, where N is an integer greater than 1;
[0155] Calculating a theoretical transition sequence corresponding to the process model in the N-th iteration process according to the constraint conditions, the actual transition sequence corresponding to the process model in the N-1th iteration process, and the model state;
[0156] Converting the theoretical transition sequence into scheduling instructions for being recognized by the simulation software;
[0157] The transition in the process model is triggered according to the scheduling instruction, and an actual transition sequence corresponding to the process model in the Nth iteration process is obtained.
[0158] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / units are based on the same concept as the method embodiment of this application. Their specific functions and technical effects can be found in the method embodiment section and will not be repeated here.
[0159] In addition, the scheduling device shown in FIG5 can be a software unit, a hardware unit, or a combination of software and hardware units built into an existing terminal device, or can be integrated into the terminal device as an independent accessory, or can exist as an independent terminal device.
[0160] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0161] FIG6 is a schematic diagram of the structure of a terminal device provided in an embodiment of the present application. As shown in FIG6 , the terminal device 6 of this embodiment includes: at least one processor 60 (only one is shown in FIG6 ), a memory 61, and a computer program 62 stored in the memory 61 and executable on the at least one processor 60. When the processor 60 executes the computer program 62, the steps of any of the above-mentioned scheduling strategy determination method embodiments are implemented.
[0162] The terminal device may be a computing device such as a desktop computer, laptop, PDA, or cloud server. The terminal device may include, but is not limited to, a processor and memory. Those skilled in the art will appreciate that FIG6 is merely an example of a terminal device 6 and does not limit the terminal device 6. The terminal device may include more or fewer components than shown, or a combination of certain components, or different components. For example, the terminal device may also include input / output devices, network access devices, etc.
[0163] The processor 60 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. A general-purpose processor may be a microprocessor or any conventional processor.
[0164] In some embodiments, the memory 61 may be an internal storage unit of the terminal device 6, such as a hard disk or memory of the terminal device 6. In other embodiments, the memory 61 may also be an external storage device of the terminal device 6, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the terminal device 6. Furthermore, the memory 61 may also include both an internal storage unit of the terminal device 6 and an external storage device. The memory 61 is used to store an operating system, application programs, a boot loader, data, and other programs, such as the program code of the computer program. The memory 61 may also be used to temporarily store data that has been output or is about to be output.
[0165] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the above-mentioned various method embodiments can be implemented.
[0166] An embodiment of the present application provides a computer program product. When the computer program product is run on a terminal device, the terminal device can implement the steps in the above-mentioned method embodiments when executing the computer program product.
[0167] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and when the computer program is executed by the processor, it can implement the steps of the above-mentioned various method embodiments. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may at least include: any entity or device that can carry the computer program code to the device / terminal device, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electric carrier signal, a telecommunication signal and a software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk or an optical disk. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electric carrier signals and telecommunication signals.
[0168] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant description of other embodiments.
[0169] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0170] In the embodiments provided in this application, it should be understood that the disclosed devices / terminal equipment and methods can be implemented in other ways. For example, the device / terminal equipment embodiments described above are merely illustrative. For example, the division of the modules or units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0171] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0172] The above-described embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present application, and should all be included in the scope of protection of the present application.
Claims
1. A method for determining a scheduling strategy, It is characterized in that include: Performing process modeling on the simulation model to obtain a process model, wherein the simulation model is a model of the working environment of the unmanned guided vehicle generated by simulation software, and the process model is used to represent the action process of the dynamic object in the simulation model; The process model is linearly programmed according to the scheduling task objectives to obtain a scheduling strategy.
2. The method for determining a scheduling strategy according to claim 1, It is characterized in that The process modeling of the simulation model to obtain the process model includes: Acquire parameter data in the simulation model, wherein the parameter data includes first attribute information of a physical entity in the simulation model; The process model is established based on the parameter data.
3. The method for determining a scheduling strategy according to claim 2, It is characterized in that The step of establishing the process model according to the parameter data comprises: Generating a document in a preset format according to the parameter data, wherein the preset format is a lightweight data exchange format, and the document includes first attribute information of a physical entity in the simulation model; The process model is generated according to the document in the preset format.
4. The method for determining a scheduling strategy according to claim 3, It is characterized in that The process model includes places, transitions, directed arcs and tokens; wherein the places represent locations, the transitions represent events, the directed arcs are used to connect places and transitions and represent the relationship between event occurrences, and the tokens represent dynamic objects in the simulation model and are used to move from one place to another. The step of generating the process model according to the document in the preset format includes: Generate a place in the process model according to first attribute information of a physical entity in the document; Transitions, directed arcs and tokens are added to the library according to first attribute information of the physical entity in the document.
5. The method for determining a scheduling strategy according to claim 1, It is characterized in that The linear programming of the process model according to the scheduling task target to obtain the scheduling strategy includes: mapping a time function for each of the transitions in the process model to obtain a processed process model; The processed process model is linearly programmed according to the scheduling task target to obtain the scheduling strategy.
6. The method for determining a scheduling strategy according to claim 5, It is characterized in that The step of performing linear programming on the processed process model according to the scheduling task target to obtain the scheduling strategy includes: Establishing a mathematical model of linear programming according to the scheduling task objectives and the processed process model; An optimal solution of the mathematical model is calculated, where the optimal solution is the scheduling strategy.
7. The method for determining a scheduling strategy according to claim 6, It is characterized in that The mathematical model includes target conditions and constraint conditions; The calculating the optimal solution of the mathematical model comprises: In each iteration, the actual transition sequence corresponding to each transition of the process model is calculated in sequence based on the constraint conditions, wherein the actual transition sequence includes actual state values of each of the multiple transitions existing in the process model; When the target sequence is obtained, the optimal solution is generated according to the target sequence, wherein the target sequence includes an actual transition sequence corresponding to each transition of the process model in an iteration process that satisfies the target condition.
8. The method for determining a scheduling strategy according to claim 7, It is characterized in that In each iteration, the actual transition sequence corresponding to each transition of the process model is calculated in sequence based on the constraint conditions, including: For the Nth iteration process, obtaining the actual transition sequence and model state corresponding to the process model of the N-1th iteration process, where N is an integer greater than 1; Calculate the theoretical transition sequence corresponding to the process model in the Nth iteration process according to the constraint conditions, the actual transition sequence corresponding to the process model in the N-1th iteration process and the model state; Converting the theoretical transition sequence into scheduling instructions for being recognized by the simulation software; The transition in the process model is triggered according to the scheduling instruction, and an actual transition sequence corresponding to the process model in the Nth iteration process is obtained.
9. A terminal device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, It is characterized in that When the processor executes the computer program, the method according to any one of claims 1 to 8 is implemented.
10. A computer-readable storage medium storing a computer program. It is characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.