CN113420864B - Controller generation method of multi-agent system containing mutually exclusive resources - Google Patents

Controller generation method of multi-agent system containing mutually exclusive resources Download PDF

Info

Publication number
CN113420864B
CN113420864B CN202110757211.XA CN202110757211A CN113420864B CN 113420864 B CN113420864 B CN 113420864B CN 202110757211 A CN202110757211 A CN 202110757211A CN 113420864 B CN113420864 B CN 113420864B
Authority
CN
China
Prior art keywords
list
resource
agents
mutually exclusive
agent
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
CN202110757211.XA
Other languages
Chinese (zh)
Other versions
CN113420864A (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.)
Guangxi Normal University
Original Assignee
Guangxi Normal University
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 Guangxi Normal University filed Critical Guangxi Normal University
Priority to CN202110757211.XA priority Critical patent/CN113420864B/en
Publication of CN113420864A publication Critical patent/CN113420864A/en
Application granted granted Critical
Publication of CN113420864B publication Critical patent/CN113420864B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/004Artificial life, i.e. computing arrangements simulating life
    • G06N3/006Artificial life, i.e. computing arrangements simulating life based on simulated virtual individual or collective life forms, e.g. social simulations or particle swarm optimisation [PSO]

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Evolutionary Computation (AREA)
  • Artificial Intelligence (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a controller generation method of a multi-agent system containing mutually exclusive resources. The method comprises the following steps: firstly, processing the control requirement related to the mutually exclusive resource constraint condition by a mutex function of the SCT; then, taking the calculation result of the mutex function as a simplified controlled object; and finally, calculating the controller of the simplified controlled object relative to other control requirements. The method can effectively relieve the state explosion problem generated when the intelligent agent and each sub-requirement are subjected to parallel combination operation by preferentially processing the control requirement of the mutually exclusive resource and then processing other control requirements to generate the controller.

Description

Controller generation method of multi-agent system containing mutually exclusive resources
Technical Field
The invention relates to the field of automatic control and a discrete event system, in particular to a controller generation method of a multi-agent system containing mutually exclusive resources.
Background
In recent years, with the rapid development of artificial intelligence and communication technology, a multi-agent system MAS (MAS) has been widely and deeply applied in the fields of aerospace, unmanned driving, robots, and the like, and has become a hot research direction in the subjects of control engineering, computer science, robotics, economics, mathematics, physics, and the like. The multi-agent system consists of a plurality of individuals with certain sensing, calculating and executing capabilities, and the individuals are communicated with other agents through a network and cooperate with each other to jointly complete tasks. The intelligent degree of individual behaviors can be greatly improved by the cooperation of the multiple intelligent agents, so that the complex work which cannot be performed by a single individual can be completed better. Generally, information among the agents is affected by communication bandwidth, distance and various noises in the sensing, transmission and receiving processes, so that each agent is difficult to obtain accurate state information of its neighbors, and a coordinated multi-agent system cannot completely meet all requirements. Therefore, on the basis of autonomous calculation and planning negotiation of each intelligent agent, overall coordination control is carried out on the behavior of each intelligent agent, and the method is one of effective solutions for ensuring that the intelligent agents can effectively and safely complete tasks.
Generally, a resource that cannot be shared by a plurality of agents at the same time, i.e., a mutex resource, exists in a MAS. The problem of resource mutual exclusion is a common problem existing in MAS, in a Supervisory Control Theory SCT (SCT) of a Discrete Event System DES (DES), a controlled System and a Control requirement are generally described by a Deterministic Finite state Automaton (Finite state Automaton), and the SCT may generate a Supervisory controller having a maximum allowable behavior described by the Finite state Automaton for the controlled System. In SCT, constraints on mutually exclusive resources are described by control requirements, so that a controller can be generated to make system behavior meet mutual exclusivity. In MAS, the model of the whole system consists of the synchronous product of all the single agent models, the state number of the system model grows exponentially along with the increase of the number of agents, and the state explosion problem is a big obstacle to solving the control problem of the multi-agent system by using SCT.
The related theories of automata in the prior art generally include:
the alphabet sigma is a non-empty finite set of characters, the string s defined on sigma is made up of a series of symbols, the empty character e and all finite strings defined on sigma form the set sigma*,∑*Two character strings s in1,s2∈∑*Is defined as s ═ s1.s2In general, s can be abbreviated as s ═ s1s2A finite state automaton is a quintuple consisting of (Q, sigma, delta, Q)0,Qm) Where Q is the state set, Σ is the alphabet, δ: q × ∑ → Q is the state transfer function, Q0E.g. Q is the initial state,
Figure GDA0003632005650000021
to mark a state set, for states Q, Q ' ∈ Q and σ ∈ Σ, the transfer function δ (Q, σ) ═ Q ' denotes the transfer of state Q to state Q ' via event σ, if δ (Q, σ) is defined, with δ (Q, σ)! Meaning, in general, that the transfer function δ extends in a recursive manner from the domain Q × Σ to the domain Q × Σ*
(1)δ(q,ε)=q;
(2) For σ ∈ Σ, Q, Q' ∈ Q, s ∈ Σ*If δ (q, s) ═ q ', and δ (q', σ)! Then δ (q, s σ)! And δ (q, s σ) is δ (δ (q, s), σ), in which the automatons are all referred to as finite state automatons,
if there is a string s ∈ Σ*Let δ (q, s) ═ q ', then state q' is said to be reachable from state q (reachable);
if q is from the initial state q0If the value is reachable, the value q is called reachable;
if there is a string s ∈ Σ*Let δ (q, s) be q ', then state q is said to reach (recoverable) state q';
if Q'. epsilon.QmThen q is said to be reachable;
if all states are reachable and reachable, automaton A is non-blocking, defining operation Ac(A) Delete all unreachable states:
Ac(A)=(Qac,∑,δac,q0,Qac,m),
wherein the content of the first and second substances,
Figure GDA0003632005650000024
Qac,m=Qm∩Qac,δac:Qac×∑→Qac
the language L defined over the alphabet sigma is sigma*A generated language (l) (a) is denoted as l (s e Σ)*|δ(q0S)! }; a generated markup language (marked language) is marked as Lm(A)={s∈L(A)|δ(q0,s)∈Qm};
Let A be1=(Q1,∑1,δ1,q1,0,Q1,m) And A2=(Q2,∑2,δ2,q2,0,Q2,m) Respectively representing two finite state automata, each of which,
definition 1: a. the1And A2The parallel combination of (a) is an automaton a,
A=A1||A2=Ac(Q1×Q2,∑1∪∑2,δ,(q1,0,q2,0),Q1,m×Q2,m),
wherein the content of the first and second substances,
Figure GDA0003632005650000022
if it is not
Figure GDA0003632005650000023
A1And A2Is called shuffle, for three automata A1,A2And A3The parallel combining operation satisfies the combination law: (A)1||A2)||A3=A1||(A2||A3) The combination law is also suitable for the parallel combination operation of n (n is more than or equal to 3) automata; TCT is a piece of software developed by the university of Toronto for generating supervisory controllers for systems in which n automata A1,…,AnBy sync (A)1,…,An) Realizing a function;
the related knowledge of the Supervision Control Theory (SCT) in the prior art is generally:
SCT is a branch of the system's control theory for which the controller is designed by studying the logical behavior of DES (i.e. the controlled system) described by an automaton G on an alphabet sigma divided into two disjoint subsets sigmauSum ΣcWherein, sigmauIs a collection of uncontrolled (uncontrolled) events, ΣcIs a controllable (controllab1e) event set, the control requirement is described by automaton R on Σ, SCT is represented by V: l (G) → Γ realizes a control function, wherein
Figure GDA0003632005650000031
Figure GDA0003632005650000032
Is a set of control modes.
Definition 2: if the following conditions are satisfied, the language
Figure GDA0003632005650000033
Controllable with respect to the controlled system G:
Figure GDA0003632005650000034
given language
Figure GDA0003632005650000035
All subsets of H controllable with respect to G, denoted
Figure GDA00036320056500000313
The upper limit of C (H, l (g)) is supC (H, l (g)) Uk∈C(H,L(G))K, if
Figure GDA0003632005650000036
Then there is one non-blocking controller V for K and G, such that Lm(V)∩Lm(G) Is equal to K and
Figure GDA0003632005650000037
suppose A1=(Q1,∑1,δ1,q1,0,Q1,m) And A2=(Q2,∑2,δ2,q2,0,Q2,m) Respectively represent two agents, when
Figure GDA0003632005650000038
When it comes to scale A1And A2The (a) is not crossed with each other,
Figure GDA0003632005650000039
representing agent AiJ (th) state of (A)1And A2Is recorded as a mutually exclusive state set
Figure GDA00036320056500000310
Is shown in A1||A2Middle state
Figure GDA00036320056500000311
And
Figure GDA00036320056500000312
i-1, …, k cannot occur simultaneously; in TCT, the function a ═ mutex (a)1,A2List) is used to generate information about A1||A2And a controller of the exclusive constraint list, wherein the implementation of the "mutex" function is shown as an algorithm 1:
algorithm 1: procedure to implement the "mutex" function:
inputting: mutually disjoint agents A1And A2The set of mutually exclusive state pairs list,
and (3) outputting: with respect to A1||A2And a controller of list, specifically:
1) execution A12=A1||A2
2) In A12Deleting the state pairs in the list, wherein all the state pairs in the list can be reached along a path formed by the uncontrollable events;
3)A12=AC(A12);
4) output A12
Output A of Algorithm 112Are reachable and controllable, but need not be reachable; let A be A1||A2If A is12Is reachable, A12Is a controller with the maximum allowable behavior with respect to a and mutual exclusion requirements; otherwise, the function supcon of the calculation controller provided in TCT is used to obtain the controller S — supcon (a, a)12)。
Disclosure of Invention
The invention aims to provide a controller generation method of a multi-agent system containing mutually exclusive resources aiming at the problem of state explosion in the prior art. The method can effectively relieve the state explosion problem generated when the intelligent agent and the sub-control demand are subjected to parallel combined operation, thereby being capable of processing the actual problem in a larger scale.
The technical scheme for realizing the purpose of the invention is as follows:
a controller generation method for a multi-agent system including mutually exclusive resources, comprising the steps of:
1) defining a model: the multi-agent system consists of n single agents with sensing, calculating and executing capabilities, and the ith agent uses Ai=(Qi,∑i,δi,qi,0,Qi,m) Is represented by i ∈ N n1, …, n, for any agent aiAnd Aj,i,j∈NnAnd i ≠ j, alphabet
Figure GDA0003632005650000041
Let r beiDenotes the ith mutually exclusive resource, where i ∈ N m1, …, m if resource rkBy two different agents aiAnd AjMutually exclusive sharing, then AiAnd AjResource r cannot be used simultaneouslykTo r tokCan be implemented by a finite state automaton RkDescribing other control requirements by an automaton H, and obtaining the control requirement R of the whole system by using a supervision control theory1,...,RmAnd H, calculating by adopting the following process in TCT software:
1-1) calculating A ═ sync (A)1,…,An);
2-1) calculation of H' ═ sync (R)1,…,Rm,H);
3-1) calculating S ═ supcon (a, H);
in step 1-1), the scale of the controlled system A grows exponentially with the number n of agents, and in step 2-1), the scale of the finite state automaton H describing the global control demand also grows exponentially with the number m of sub-demands; in step 3-1), generating a global controller of the controlled system about all control requirements, and expressing the global controller by using a finite state automaton S;
2) in order to alleviate the problem of state explosion possibly generated in the step 1-1) and the step 2-1), the intelligent agent is divided into the following four different scenes for processing according to different conditions of the intelligent agent using the mutual exclusion resource:
1-2) scenario 1 uses one mutually exclusive resource for two agents: let A1=(Q1,∑1,δ1,q1,0,Q1,m) And A2=(Q2,∑2,δ2,q2,0,Q2,m) Respectively represent two agents, and
Figure GDA0003632005650000042
let r be A1And A2The mutually exclusive resource used, H is a finite state automaton, alphabet, describing all other control requirements except r
Figure GDA0003632005650000043
And
Figure GDA0003632005650000044
respectively representing agents A1And A2Set of events, alphabet, starting to use resource r
Figure GDA0003632005650000045
And
Figure GDA0003632005650000046
respectively representing agents A1And A2The set of events for the resource r is released,
Figure GDA0003632005650000047
the process of generating the controller in scenario 1 is as follows:
1-1-2) establishing a deterministic finite state automaton (R ═ Q, Σ, δ, Q) describing the mutually exclusive control requirements of the resource R0,Qm) Where Q is {0, 1, 2},
Figure GDA0003632005650000048
Figure GDA0003632005650000049
q0=0,Qm={0,1,2};
2-1-2) order q1∈Q1And q is2∈Q2To a
Figure GDA00036320056500000410
If delta1(q1,0,σ1)!,δ2(q2,0,σ2) | A And delta1(q1,0,σ1)=q′1,δ2(q2,0,σ2)=q′2Then (q)1,q2) Is A1And A2For a mutex state pair of R, A is calculated according to Algorithm 21=(Q1,∑1,δ1,q1,0,Q1,m) And A2=(Q2,∑2,δ2,q2,0,Q2,m) All mutually exclusive state pairs for R:
and 2, algorithm: calculation of A1And A2Mutex status pair for R:
inputting: inputting: a. the1,A2
Figure GDA0003632005650000051
R;
And (3) outputting: agent A1And A2All the exclusive state pairs of R are specifically:
1) order to
Figure GDA0003632005650000052
2) Order to
Figure GDA0003632005650000053
3)while(q1∈Q1);
4)while
Figure GDA0003632005650000054
5)if(δ1(q1,σ1) | A And delta1(q1,σ1)=q′1);
6)
Figure GDA0003632005650000055
7)end if;
8)end while;
9)end while;
10)while(q2∈Q2);
11)while
Figure GDA0003632005650000056
12)if(δ2(q2,σ2) | A And delta2(q2,σ2)=q′2);
13)
Figure GDA0003632005650000057
14)end if;
15)end while;
16)end while;
17)
Figure GDA0003632005650000058
3-1-2)A=mutex(A1,A2,list);
4-1-2)S=supcon(A,H),
Step 4-1-2) to obtain controllers S and S' ═ supcon (a)1||A2R H) is isostructural;
2-2) scenario 2 uses multiple mutually exclusive resources for two agents: let r1,r2,...,rnAs agent A1=(Q1,∑1,δ1,q1,0,Q1,m) And A2=(Q2,∑2,δ2,q2,0,Q2,m) Mutually exclusive shared resources, event sets
Figure GDA0003632005650000059
And
Figure GDA00036320056500000510
respectively represent agent a1Starting to occupy and release resource riEvent set
Figure GDA00036320056500000511
And
Figure GDA00036320056500000512
respectively represent agent a2Starting to occupy and release resource riLet us order
Figure GDA00036320056500000513
The process of generating the controller in scenario 2 is as follows:
1-2-2) establishing a description resource riDFA R of mutual exclusivity control requirementi: r for automatic machinei(i∈{1,2,…,n})=(Qi,∑i,δi,qi,0,Qi,m) Is shown in which Qi={0,1,2},
Figure GDA0003632005650000061
Figure GDA0003632005650000062
qi,0=0,Qi,m={0,1,2};
2-2-2)A1And A2With respect to a plurality of resources r1,r2Control demand R of …, rn1,R2,...,RnThe mutual exclusion state pair is calculated by adopting the following process:
(1) using Algorithm 2 at R1Get list1
(2) Using Algorithm 2 at R2Get list2
(n) at R using Algorithm 2nGet listn
Exclusive status pair list1∪list2∪…∪listn
Wherein, listiIs shown as A1And A2Obtaining list by using algorithm 2 about the set of the mutually exclusive state pairs of Rii,A1And A2Exclusive status list for all resources1∪…∪listn
3-2-2) controller of computing system with respect to all control requirements:
if R is R ═ R1||R2||…||RnAssuming that the other control requirements, other than R, are represented by the automaton H, the steps of calculating the controller are as follows:
(1)A=mutex(A1,A2,list);
(2) s is Supcon (A, H), let K be Lm((A1||A2) Andgate (R | | H)), under scene 2, supC (L)m(A)∩L(H),L(A))=supC(K,L(A1||A2));
Under scene 2, the result obtained by the technical scheme is isomorphic with a global controller obtained by directly using SCT calculation;
3-2) scenario 3 uses one mutually exclusive resource for multiple agents: let Ai=(Qi,∑i,δi,qi,0,Qi,m) For the ith agent, where i ∈ RnAnd n is>2, for any two agents AiAnd Aj
Figure GDA0003632005650000063
And i ≠ j, and r is set as a mutually exclusive resource and an event set used by all the agents
Figure GDA0003632005650000064
And
Figure GDA0003632005650000065
respectively represent the intelligence ofEnergy body AiStart to occupy and release resource r, order
Figure GDA0003632005650000066
And sigma ═ sigma1∪...∪∑n-∑O-∑RThe process of generating the controller in scene 3 is as follows:
1-3-2) establishing a finite state automaton (RR ═ Q, sigma, delta, Q) describing the mutual exclusion control requirement of a resource r0,Qm) Where Q is {0, 1, 2, …, n },
Figure GDA0003632005650000067
Figure GDA0003632005650000068
q0=0,Qm={0,1,2,…,n};
2-3-2) calculate A according to Algorithm 31,…,An-1And AnAll mutex status pairs for RR:
algorithm 3: calculating a mutual exclusion state pair when n agents share a mutual exclusion resource RR:
inputting: a. the1,…,An,RR,
Figure GDA0003632005650000069
And (3) outputting: all the mutex state pairs of the n agents with respect to the RR are specifically:
inputting: a. the1,…,An,RR,
Figure GDA0003632005650000071
And (3) outputting: all the mutex state pairs of the n agents with respect to the RR are specifically:
1)i=1;
2)while(i≤n);
3)
Figure GDA0003632005650000072
4)while(qi∈Qi);
5)while
Figure GDA0003632005650000073
6)if(δi(qi,σi) | A And deltai(qi,σi)=q′i);
7)
Figure GDA0003632005650000074
8)end if;
9)end while;
10)end while;
11)i++;
12)end while;
13)j=1;
14)while(j≤n);
15)k=j+1;
16)while(k≤n);
17)while(qi∈Qi);
18)while(qk∈Qk);
19)list=list∪{(qi,qk)};
20)end while;
21)end while;
22)k++;
23)end while
24)i++;
25)end while;
26) Outputting a list;
wherein steps 2) to 12) are calculating agent AiThe state of the resource r, from step 13) to step 25) is calculated, and n is setq=max(|Q1|,…,|QnL) and ne=max(|∑1|,…,|∑n|), the computational complexity of algorithm 3 is O (max (n.n)q.ne,n2.nq));
3-3-2) generating a controlled System A1||…||AnGlobal controller with respect to overall control requirements: calculate n (n) according to algorithm 4>2) In the case of agents sharing a resource, algorithm 4 calculates the "mutex" function that n agents use a mutually exclusive resource:
inputting: disjoint Agents A1,A2,…,AnAnd a set list of mutually exclusive state pairs;
and (3) outputting: with respect to A1||A2||...||AnAnd a controller for restricting list, specifically:
1) execution A12…n=A1||A2||…||An
2) In A12…nDelete the status in the list, and A12…nAll states of the states in list can be reached along an uncontrollable path;
3)A12…n=AC(A12…n);
4) output A12…n
Output result A12…nIs reachable and controllable, let A ═ A1||…||AnIf A is12…nIs reachable, algorithm 4 is just the controller that calculates the controlled system a as to the control demand RR; otherwise, S ═ supcon (a, a) is used12…n) Obtaining a controller, assuming that other control requirements than the RR are represented by the automaton H, the controller of the controlled system with respect to global control requirements is generated as follows:
(1)A=mutex(A1,…,An,list);
(2)S=supcon(A12…nh), if K is equal to Lm(A | (R | | H)), then sucC (L)m(A12…n)∩L(H),L(A12…n) supC (K, l (a)); in a scene 3, the result obtained by the technical scheme is isomorphic with a global controller obtained by directly using a supervisory control theory for calculation;
4-2) scenario 4 shares multiple resources for multiple agents: let A1,A2,…,AnN agents, r1,r2,…,rmFor m resources, let set a ═ a1,…,AnR as a set { r }1,…,rmThe resource allocation function is defined as the mapping Φ: r → 2A,Φ(ri)=AiWherein r isi∈r,
Figure GDA0003632005650000081
The problem in scenario 4 can be decomposed into m "multiple agents share a resource" sub-problems, AiThe agent in (1) is related to the resource riThe mutual exclusion state pair of the intelligent agent-resource relation graph ARRD is calculated by adopting an algorithm 4, and the definition of the intelligent agent-resource relation graph ARRD is as follows:
agent resource relationship graph ARRD (a, r, Φ) is an undirected graph, where a is a set of mutually exclusive agents, r is a set of mutually exclusive resources shared by the agents in set a, Φ: r → 2AIs a resource allocation function, phi (r)i)=AiRepresenting mutually exclusive resources riFrom AiIn the graphical representation of the ARRD, the agent is represented by a rectangle, the number of states and transitions of the finite state automaton representing the agent are given in parentheses below the rectangle, in an elliptic table, if phi (r)i)=AiThen from riTo picture AiIn this scenario, the problem is decomposed into m sub-problems in scenario 3, how to arrange the processing order of the m sub-problems is the key to the computational efficiency, and the priority problem of sub-problem processing is solved by adopting two greedy ideas:
greedy idea 1: the more states deleted in the mutex function, the smaller the scale of the finally obtained automaton;
greedy idea 2: the smaller the size of the agents, the more priority the control needs relating to these agents should be, for
Figure GDA0003632005650000082
With respect to mutually exclusive resources riAutomatic machine R for controlling demandiCarrying out the description;
based on the ARRD and the two greedy ideas, the algorithm for generating the controller with respect to the control requirements of the agent and the mutually exclusive resource is shown as algorithm 5:
and algorithm 5: controller computation method for n agents and m mutually exclusive resources:
inputting: ARRD (A, r, phi), n agents A1,A2,…,AnAnd m automata R describing mutually exclusive resources1,R2,…,Rm
And (3) outputting: the controller for controlling the requirements of the intelligent agent and the mutual exclusion resource specifically comprises:
1)i=1;R={R1,R2,…,Rm};
2)while(i≤|R|);
3)
Figure GDA0003632005650000091
4) computing list by Algorithm 2i
5)j=i+1;
6)while(j≤|R|);
7)if(Φ(ri)=Φ(rj));
8) Calculating list by Algorithm 4j
9)list=list∪listj
10)R=R-{Rj};
11)end if;
12)j++;
13)end while;
14)if
Figure GDA0003632005650000092
15)list=list∪listi
16)Ai=Φ(ri);
17)A′i=mutex(Ai,list);
18)A=A-Ai
19)A=A∪{Ai}′;
20)end if;
21)i++;
22)end while;
23)k=1,p=0;
24)
Figure GDA0003632005650000093
25)while
Figure GDA0003632005650000094
26)for each Rk∈R,
27)Ak=Φ(rk),
Figure GDA0003632005650000095
28)if
Figure GDA0003632005650000096
29)
Figure GDA0003632005650000097
30)p=k;
31)end if;
32)end for each;
33) Calculating listp
34)A′p=muter(Ap,listp);
35)A=A-Ap
36)A=A∪{A′p};
37)R=R-{Rp};
38)end while;
39) Output of A'p
Steps 2) to 22) describe that a plurality of mutually exclusive resources are shared by the same agent, and priorities related to control requirements of the resources are processed by adopting a first greedy idea; from step 23) to step 38), in accordance with the second greedy ideaThe computational complexity of Algorithm 5 is O (| R2) S for the output of Algorithm 5rLet A be A, assuming that other control requirements are described by automaton H1||…||AnThe controller of the controlled system with respect to global control demand is calculated by:
S=supcon(Sr,H),
let K equal to Lm(A)∩L(R||H),SupC(Lm(Sr)∩L(H),L(Sr))=SupC(K,L(A));
In the technical scheme, a controller is generated for an MAS (Multi-agent System) with mutually exclusive resources by using a supervisory control theory, and in order to relieve the problem of state explosion when a plurality of intelligent agents perform parallel combination operation, a controller generation method for preferentially processing the control requirement of the mutually exclusive resources is adopted, namely, the supervisory control theory firstly processes the control requirement related to the mutually exclusive resources in a distributed manner, and then, the result obtained in the first step is taken as a controlled system; finally, a controller related to other control requirements is generated by using a supervision control theory; this can effectively alleviate the state explosion problem to can handle larger-scale actual problem.
The method can effectively relieve the state explosion problem generated when the intelligent agent and the sub-control demand are subjected to parallel combined operation, thereby being capable of processing the actual problem in a larger scale.
Drawings
FIG. 1 is a diagram of a finite state automaton R implementing the mutual exclusion control requirement of a resource R described in scenario 1 of an example;
FIG. 2 is a diagram illustrating resource r described in scenario 2 in an embodiment exampleiFinite state automaton R for mutual exclusion control requirementsiA schematic diagram of (a);
FIG. 3 shows the calculation A in scenario 2 of the example1And A2A frame diagram of a mutually exclusive status pair of mutually exclusive resources;
FIG. 4 is a diagram illustrating a finite state automaton RR for implementing the mutually exclusive control requirement of resource r described in scenario 3 of example;
FIG. 5 shows an agent A in an embodimentiWherein i is 1, 2;
FIG. 6 shows agent A in the embodiment1And A2A finite state automaton (R) diagram relating to the mutually exclusive resource control requirement;
FIG. 7 is a diagram illustrating fairness control requirement H in an example implementation;
FIG. 8 is a schematic diagram of a controller S in an embodiment;
FIG. 9 is a philosophical model P in an embodimentiWherein i is 1, 2;
FIG. 10 is a diagram of an automaton R in an embodiment1A schematic diagram of (a);
FIG. 11 is a diagram of an automaton R in an embodiment2A schematic diagram of (a);
FIG. 12 is a diagram of an automaton S according to an exemplary embodiment;
FIG. 13 is a schematic diagram of an AGV system in an example implementation;
FIG. 14 is a schematic diagram of the logic model of AGVi in an embodiment, wherein i is 1, 2, 3, 4, 5, (a) is A1(AGV1) and (b) is A2(AGV2), (c) is A3(AGV3), (d) is A4(AGV4), (e) is A5(AGV5);
FIG. 15 is a schematic diagram of Z1SPEC in an embodiment example;
FIG. 16 is a diagram showing Z2SPEC in an embodiment example;
FIG. 17 is a schematic view of Z3SPEC in an embodiment example;
FIG. 18 is a diagram showing Z4SPEC in an embodiment example;
FIG. 19 is a diagram illustrating IPSSPEC in an example implementation;
FIG. 20 is a diagram showing WS1SPEC in an embodiment example;
FIG. 21 is a diagram showing WS2SPEC in an example of embodiment;
FIG. 22 is a schematic diagram of WS3SPEC in an example embodiment;
FIG. 23 is a diagram of ARRD1 for each AGV in an example implementation with respect to all mutually exclusive shared area control requirements;
FIG. 24 is a diagram of ARRD2 after update of ARRD1 for each AGV for all mutually exclusive shared area control requirements in an example embodiment;
FIG. 25 is a schematic diagram of ARRD3 in an example implementation;
FIG. 26 is a schematic diagram of ARRD4 in an example embodiment.
Detailed Description
The invention is further illustrated, but not limited, by the following description of the embodiments with reference to the accompanying drawings.
Implementation example:
a controller generation method for a multi-agent system including mutually exclusive resources, comprising the steps of:
1) defining a model: the multi-agent system consists of n single agents with sensing, calculating and executing capabilities, and the ith agent uses Ai=(Qi,∑i,δi,qi,0,Qi,m) Is represented by i ∈ Nn1, …, n, for any agent aiAnd Aj,i,j∈NnAnd i ≠ j, alphabet
Figure GDA0003632005650000111
Let r beiDenotes the ith mutually exclusive resource, where i ∈ N m1, …, m if resource rkBy two different agents aiAnd AjMutually exclusive sharing, then AiAnd AjResource r cannot be used simultaneouslykTo r tokCan be implemented by a finite state automaton RkDescribing other control requirements by an automaton H, and obtaining the control requirement R of the whole system by using a supervision control theory1,…,RmAnd H, calculating by adopting the following process in TCT software:
1-1) calculating A ═ sync (A)1,…,An);
2-1) calculation of H' ═ sync (R)1,…,Rm,H);
3-1) calculating S ═ supcon (a, H);
in the step 1-1), the scale of the controlled system A grows exponentially along with the number n of the intelligent agents, in the step 2-1), the scale of a finite state automaton H for describing the global control requirement also grows exponentially along with the number of the sub-requirements m, and in the step 3-1), a global controller of the controlled system for all the control requirements is generated and is represented by a finite state automaton S;
2) according to different conditions of using the mutual exclusion resource by the intelligent agent, processing is respectively carried out according to the following four scenes:
1-2) scenario 1 uses one mutually exclusive resource for two agents: let A1=(Q1,∑1,δ1,q1,0,Q1,m) And A2=(Q2,∑2,δ2,q2,0,Q2,m) Respectively represent two agents, and
Figure GDA0003632005650000121
let r be A1And A2The mutually exclusive resource used, H is a finite state automaton, alphabet, describing all other control requirements except r
Figure GDA00036320056500001215
And
Figure GDA0003632005650000123
respectively representing agents A1And A2Set of events, alphabet, starting to use resource r
Figure GDA0003632005650000124
And
Figure GDA0003632005650000125
respectively representing agents A1And A2The set of events for the resource r is released,
Figure GDA0003632005650000126
the process of generating the controller in scenario 1 is as follows:
1-1-2) establishing a deterministic finite state automaton R ═ describing the mutual exclusion control requirements of the resource R (Q, Σ, δ, Q)0,Qm) Where Q is {0, 1, 2},
Figure GDA0003632005650000127
Figure GDA0003632005650000128
q0=0, Q m0, 1, 2, as shown in fig. 1;
2-1-2) order q1∈Q1And q is2∈Q2To a
Figure GDA0003632005650000129
If delta1(q1,0,σ1)!,δ2(q2,0,σ2) | A And delta1(q1,0,σ1)=q′1,δ2(q2,0,σ2)=q′2Then (q)1,q2) Is A1And A2For a mutex state pair of R, A is calculated according to Algorithm 21=(Q1,∑1,δ1,q1,0,Q1,m) And A2=(Q2,∑2,δ2,q2,0,Q2,m) All mutually exclusive state pairs for R:
and 2, algorithm: calculation of A1And A2Mutex status pair for R:
inputting: a. the1,A2
Figure GDA00036320056500001210
R;
And (3) outputting: agent A1And A2All the exclusive state pairs of R are specifically:
1) order to
Figure GDA00036320056500001211
2) Order to
Figure GDA00036320056500001212
3)while(q1∈Q1);
4)while
Figure GDA00036320056500001213
5)if(δ1(q1,σ1) | A And delta1(q1,σ1)=q′1);
7)
Figure GDA00036320056500001214
7)end if;
8)end while;
9)end while;
10)while(q2∈Q2);
11)while
Figure GDA0003632005650000131
12)if(δ2(q2,σ2) | A And delta2(q2,σ2)=q′2);
13)
Figure GDA0003632005650000132
16)end if;
17)end while;
16)end while;
17)
Figure GDA0003632005650000133
3-1-2)A=mutex(A1,A2,list);
4-1-2)S=supcon(A,H),
Step 4-1-2) to obtain controllers S and S' ═ supcon (a)1||A2R H) is isostructural;
the controller generated by the technical scheme and the controller directly generated by the supervisory control theory are isomorphic, and the calculation A in the supervisory control theory can be relieved to a certain extent1||A2||R||H-generated state explosion problems, specifically:
two agents A1And A2As shown in FIG. 5, events i1 and i2 represent agent A, respectivelyiStarting and ending the use of resources, the control requirements for mutually exclusive resources are depicted in FIG. 6; thus, in A1||A2The middle state (2, 2) is A1And A2A mutually exclusive state pair; another control requirement of the system is fairness of resource usage, i.e. "request first use", the model of the control requirement is as shown in fig. 7, and a self-loop about events 12, 22 is added to each state in fig. 7 to obtain a finite state automaton model of the control requirement, and the TCT software is used to generate the controller according to the following steps:
1)A12=mutex(A1,A2,[(2,2)]);
2)S=supcon(A12h), Supcon with TCT (syn (A)1,A2) The result of sync (R, H)), the controller S is as shown in fig. 8;
2-2) scenario 2 uses multiple mutually exclusive resources for two agents: let r1,r2,…,rnAs agent A1=(Q1,∑1,δ1,q1,0,Q1,m) And A2=(Q2,∑2,δ2,q2,0,Q2,m) Mutually exclusive shared resources, event sets
Figure GDA0003632005650000134
And
Figure GDA0003632005650000135
respectively represent agent a1Start to occupy and release resources riEvent set
Figure GDA0003632005650000136
And
Figure GDA0003632005650000137
respectively represent agent a2Start ofSeizing and releasing resource riLet us order
Figure GDA0003632005650000138
The process of generating the controller in scenario 2 is as follows:
1-2-2) establishing a description resource riFinite state automaton R for mutual exclusion control requirementsi: r for automatic machinei(i∈{1,2,…,n})=(Qi,∑i,δi,qi,0,Qi,m) Is shown in which Qi={0,1,2},
Figure GDA0003632005650000141
qi,0=0, Q i,m0, 1, 2, as shown in fig. 2;
2-2-2)A1and A2With respect to a plurality of resources r1,r2,…,rnControl demand R of1,R2,...,RnThe mutual exclusion state pair of (c) is calculated by the following process, as shown in fig. 3:
(1) using Algorithm 2 at R1Get list1
(2) Using Algorithm 2 at R2Get list2
……
(n) at R by Algorithm 2nGet listn
Exclusive status pair list ═ list1∪list2∪…∪listn
Wherein, listiIs represented by A1And A2With respect to RiThe list is obtained by using an algorithm 2i,A1And A2Exclusive status list for all resources1∪…∪listn
3-2-2) controller of computing system with respect to all control requirements:
if R is R ═ R1||R2||…||RnAssuming that the other control requirements are represented by automaton H, in addition to R, the steps for computing the controller are as follows:
(1)A=mutex(A1,A2,list);
(2) s is Supcon (A, H), let K be Lm((A1||A2) Andgate (R | | H)), under scene 2, supC (L)m(A)∩L(H),L(A))=supC(K,L(A1||A2));
In scene 2, the result obtained by the technical scheme is isomorphic with a global controller obtained by directly using a supervisory control theory, specifically:
two philosophies in two philosophies share a dish of spaghetti, each philosophile needs two forks to eat the spaghetti, but cannot take them up at the same time, one philosophere can take up the forks in any order and put them back on the table at the same time after eating the spaghetti; the control requirement is that each fork cannot be picked up by two philosophers at the same time and there is no deadlock, the behavior of each philosopher is described as automaton Pi(i e1, 2) as shown in FIG. 9, controllable event i1 represents philosopher i to take fork 1, controllable event i3 represents philosopher i to take fork 3, and uncontrollable event i0 represents philosopher i to put two forks back on the desktop, as shown in FIGS. 10 and 11, R of FIG. 101And R of FIG. 112Describing the control demand models of fork 1 and fork 2, respectively, the philosopher dining problem can be generated into a system global controller by the following steps:
(1) calculating list { (1, 1), (1, 2), (1, 3), (2, 1), (2, 2), (2, 3), (3, 1), (3, 2), (3, 3) } according to algorithm 3;
(2) calculating S ═ mutex (A)1,A2List), the automaton S is shown in fig. 12;
3-2) scenario 3 uses one mutually exclusive resource for multiple agents: let Ai=(Qi,∑i,δi,qi,0,Qi,m) Is the ith agent, where i ∈ RnAnd n is>2, for any two agents AiAnd Aj
Figure GDA0003632005650000142
And i ≠ j, providedr is a mutually exclusive resource, set of events, used by all agents
Figure GDA0003632005650000143
And
Figure GDA0003632005650000144
respectively represent agent aiStart to occupy and release resource r, order
Figure GDA0003632005650000151
And sigma ═ sigma1∪...∪∑n-∑O-∑RThe process of generating the controller under scene 3 is as follows:
1-3-2) establishing a finite state automaton (RR ═ Q, sigma, delta, Q) describing the mutual exclusion control requirement of a resource r0,Qm) Where Q is {0, 1, 2, …, n },
Figure GDA0003632005650000152
Figure GDA0003632005650000153
q0=0, Q m0, 1, 2, …, n, as shown in fig. 4;
2-3-2) calculate A according to Algorithm 31,…,An-1And AnAll mutex status pairs for RR:
algorithm 3: calculating a mutual exclusion state pair when n agents share a mutual exclusion resource RR:
inputting: a. the1,…,An,RR,
Figure GDA0003632005650000154
And (3) outputting: all the mutex state pairs of the n agents with respect to the RR are specifically:
1)i=1;
2)while(i≤n);
4)
Figure GDA0003632005650000155
4)while(qi∈Qi);
5)while
Figure GDA0003632005650000156
6)if(δi(qi,σi) ! And deltai(qi,σi)=q′i);
7)
Figure GDA0003632005650000157
8)end if;
9)end while;
10)end while;
11)i++;
12)end while;
13)j=1;
14)while(j≤n);
15)k=j+1;
16)while(k≤n);
17)while(qi∈Qi);
18)while(qk∈Qk);
19)list=list ∪{(qi,qk)};
20)end while;
21)end while;
22)k++;
23)end while
24)i++;
25)end while;
26) Outputting a list;
wherein steps 2) to 12) are calculating agent AiThe state of the resource r, from step 13) to step 25) is calculated, and n is setq=max(|Q1|,…,|QnL) and ne=max(|∑1|,…,|∑n|), the computational complexity of algorithm 3 is O (max (n.n)q·ne,n2.nq));
3-3-2) generating a controlled System A1||…||AnGlobal controller with respect to overall control requirements: calculate n (n) according to algorithm 4>2) In the case of agents sharing a resource, algorithm 4 calculates the "mutex" function that n agents use a mutually exclusive resource:
inputting: disjoint Agents A1,A2,…,AnAnd a set list of mutually exclusive state pairs;
and (3) outputting: with respect to A1||A2||…||AnAnd a controller for restricting list, specifically:
1) execution A12…n=A1||A2||…||An
2) In A12…nDelete the status in the list, and A12…nAll states of the states in list can be reached along an uncontrollable path;
3)A12…n=AC(A12…n);
4) output A12…n
Output result A12…nIs reachable and controllable, let A ═ A1||…||AnIf A is12…nIs reachable, algorithm 4 is just the controller that calculates the controlled system a as to the control demand RR; otherwise, S ═ supcon (a, a) is used12…n) Obtaining a controller, and assuming that other control requirements except RR are represented by the automaton H, generating the controller of the controlled system relative to the global control requirement according to the following steps:
(1)A=mutex(A1,…,An,list);
(2)S=supcon(A12…nh), let K be Lm(A | (R | | H)), then sucC (L)m(A12…n)∩L(H),L(A12…n))=supC(K,L(A));
4-2) scenario 4 shares multiple resources for multiple agents: let A1,A2,…,AnN agents, r1,r2,…,rmFor m resources, let set A ═ A1,…,AnAre collectedr={r1,…,rm}. the resource allocation function is defined as the mapping Φ: r → 2A,Φ(ri)=AiWherein r isi∈r,
Figure GDA0003632005650000161
The problem in scenario 4 can be decomposed into m "multiple agents share a resource" sub-problems, AiThe agent in (1) is related to the resource riThe mutual exclusion state pair is calculated by adopting an algorithm 4, and the definition of an agent-resource relation graph ARRD is as follows:
agent resource relationship graph ARRD (a, r, Φ) is an undirected graph, where a is a set of mutually exclusive agents, r is a set of mutually exclusive resources shared by the agents in set a, Φ: r → 2AIs a resource allocation function, phi (r)i)=AiRepresenting mutually exclusive resources riFrom AiIn the graphical representation of the ARRD, the agent is represented by a rectangle, the number of states and transitions of the finite state automata describing the agent are given in parentheses below the rectangle, the volunteers are represented by ovals, if phi (r)i)=AiThen from riTo AiEach agent in (1) draws a straight line, as in the example of ARRD in fig. 23, in which the problem is decomposed into m sub-problems for scenario 3, and two greedy ideas are used to solve the priority problem of sub-problem processing:
greedy idea 1: the more states deleted in the mutex function, the smaller the scale of the obtained automaton;
greedy idea 2: the combined size of the agents should be as small as possible, and the smaller the size of the agents, the more control needs relating to these agents should be handled with priority, for
Figure GDA0003632005650000171
With respect to mutually exclusive resources riControl demand automaton RiThe description is that:
based on the ARRD and the two greedy ideas, the algorithm for generating the controller with respect to the control requirements of the agent and the mutually exclusive resource is shown as algorithm 5:
and algorithm 5: controller computation method for n agents and m mutually exclusive resources:
inputting: ARRD (A, r, phi), n agents A1,A2,…,AnAnd m automata R describing mutually exclusive resources1,R2,…,Rm
And (3) outputting: the controller for controlling the requirements of the intelligent agent and the mutual exclusion resource specifically comprises:
1)i=1;R={R1,R2,…,Rm};
2)while(i≤|R|);
3)
Figure GDA0003632005650000172
4) computing list by Algorithm 2i
5)j=i+1;
6)while(j≤|R|);
7)if(Φ(ri)=Φ(rj));
8) Calculating list by Algorithm 4j
9)list=list∪listj
10)R=R-{Rj};
11)end if;
12)j++;
13)end while;
14)if
Figure GDA0003632005650000173
15)list=list∪listi
16)Ai=Φ(ri);
17)A′i=mutex(Ai,list);
18)A=A-Ai
19)A=A∪{Ai}′;
20)end if;
21)i++:
22)end while;
23)k=1,p=0;
24)
Figure GDA0003632005650000181
25)while
Figure GDA0003632005650000182
26)for each Rk∈R,
27)Ak=Φ(rk),
Figure GDA0003632005650000183
28)if
Figure GDA0003632005650000184
29)
Figure GDA0003632005650000185
30)p=k;
31)end if;
32)end for each;
33) Calculating listp
34)A′p=muter(Ap,listp);
35)A=A-Ap
36)A=A∪{A′p};
37)R=R-{Rp};
38)end while;
39) Output of A'p
Wherein, steps 2) to 22) describe that a plurality of mutually exclusive resources are shared by the same agent, and a first greedy idea is adopted to process the priority of the control requirements of the resources; from step 23) to step 38), the priority of the relevant control requirements is processed according to the second greedy idea, and the computational complexity of the algorithm 5 is O (| R |2) S for the output of Algorithm 5rShow, assume other controlsThe demand is described by an automaton H, and A is equal to A1||…||AnThe controller of the controlled system with respect to global control demand is calculated by:
S=supcon(Sr,H),
let K equal to Lm(A)∩L(R||H),SupC(Lm(Sr)∩L(H),L(Sr))=SupC(K,L(A))。
Specifically, the method comprises the following steps:
1) automatic Guided Vehicle (AGV): a plurality of AGVs run on a fixed route to load or unload parts, and an abstract working scenario is shown in fig. 13; in the distributed supervision control of the AGV, the generated control logics of the sub-controllers conflict, so that a coordinator needs to be designed to solve the conflict; according to the method, the global controller of the whole controlled system can be generated without generating any coordinator; the system in fig. 13 consists of five AGVs (AGV1, AGV2, AGV3, AGV4 and AGV5), three workstations (WS1, WS2 and WS3), two loading stations (IPS1 and IPS2) for type I and type II components, and one station CPS for unloading finished products, the AGVs transporting the components on a fixed circular path in which there are four mutually exclusive shared areas: AGVl and AGV2 share Zone 1; AGV2 and AGV3 share Zone 2; AGV2 and AGV4 share Zone 3; AGV4 and AGV5 share Zone 4; the endless transport route of the AGV is as follows:
Figure GDA0003632005650000191
Figure GDA0003632005650000192
Figure GDA0003632005650000193
Figure GDA0003632005650000194
Figure GDA0003632005650000195
arrows → and
Figure GDA0003632005650000196
representing the direction of travel of the AGV when loading and unloading parts, respectively, the sequence of processing for the two types of input parts is as follows:
IPS1→AGV1→WS2→AGV3→WS1;
IPS2→AGV2→WS3→AGV4→WS1,
type I and type II parts are assembled into a complete product in WS1, the AGV5 transports the assembled product from WS1 to CPS, and an automaton model describing the behavior of AGVi uses Ai(i ═ 1, 2, 3, 4, 5), as shown in fig. 14, the event representations of the automaton model were even for uncontrollable events and odd for controllable events, and the physical meanings of the events in the model shown in fig. 14 are listed in table 1:
table 1: physical significance of events in AGV model
Figure GDA0003632005650000197
Figure GDA0003632005650000201
2) Description of the control requirements: for safety reasons, Zone1, Zone2, Zone3 and Zone4 cannot be occupied simultaneously by two AGVs simultaneously, all events are contained in the alphabet Σ, the control requirements of mutually exclusive and common work areas IPS1 and IPS2 are as follows:
z1 SPEC: for Zone1, the AGV1 and AGV2 cannot enter the Zone1 together,
z2 SPEC: for Zone2, the AGV2 and AGV3 cannot enter the Zone2 together,
z3 SPEC: for Zone3, the AGV2 and AGV4 cannot enter the Zone3 together,
z4 SPEC: for Zone4, the AGV4 and AGV5 cannot enter the Zone4 together,
IPSPEC: AGVs 1 and AGVs 2 cannot simultaneously enter the common work area of IPS1 and IPS2,
is ∑'1The robot model of Z1SPEC is shown in fig. 15, and Σ — {10, 11, 12, 13, 20, 22, 23, 24}, and Σ 'is omitted from all states in fig. 15 for simplicity'1Self-loopa of (1);
is ∑'2An automaton model of Z2SPEC is shown in fig. 16, and Σ - {18, 20, 24, 26, 31, 32, 33, 34}, and Σ 'is omitted from all states in fig. 16 for simplicity'2Self-loopa of (1);
is ∑'3The machine model for Z3SPEC is shown in fig. 17, with sigma- (18, 21, 26, 28, 40, 41, 44, 46), and for simplicity, sigma 'is omitted from all states in fig. 17'3Self-loopa of (1);
is ∑'4The robot model of Z4SPEC is shown in fig. 18, and Σ - {40, 42, 43, 44, 50, 51, 52, 53}, and Σ 'is omitted from all states in fig. 18 for simplicity'4Self-circulation;
is sigma'5The machine model of IPSSPEC is shown in fig. 19, and for simplicity, the machine model for Σ — 10, 13, 22, 23 is omitted from fig. 19 for all states'1Self-loopa of (1);
other control requirements besides the mutually exclusive shared region are described below:
WS1 SPEC: type I and type II parts are assembled into a complete product in the workstation WS1, the workstation WS1 can only accommodate one of the two types, which can be shipped to the WS1 in any order, before shipping the entire product to the CPS;
WS2 SPEC: the AGV1 transports a type I part to the workstation WS2, and the AGV3 unloads a type I part from the WS2, the station accommodating only one part at a time;
WS3 SPEC: AGVs 2 transport type II parts to the workstation WS3, AGVs 4 unload type II parts to WS3, which can only accommodate one part at a time;
is ∑'6The automaton model for WS1SPEC is shown in fig. 20, and for simplicity, the model for Σ ″, which is omitted from all states in fig. 20'6Self-loopa of (1);
is ∑'7The automaton model for WS2SPEC is shown in fig. 21, and for simplicity, the model for Σ ″ 'is omitted in all states in fig. 21'7Self-loopa of (1);
is ∑'8The automaton model for WS3SPEC is shown in fig. 22, and for simplicity, # is omitted from all states in fig. 22'8Self-loopa of (1);
3) the controller is generated by adopting the method of the embodiment: ARRD for each AGV for all mutually exclusive shared area control requirements is shown in FIG. 23; according to algorithm 5, Z1SPEC and IPSPEC involving AGV1 and AGV2 are processed first, A for clarity1,A2The connection between Z1SPEC and IPSPEC is plotted using a dashed line in FIG. 23; for Z1SPEC, A1And A2The mutually exclusive state pairs of (1, 3), (3, 3), (1, 5); for IPSPEC, A1And A2Is (2, 4), thus, a list is obtained1={(1,3),(3,3),(1,5),(2,4)},A12Z1IP=mutex(A1,A2,list1) (17, 26); the state of the automaton and the number of transitions are marked in parentheses after the equation, the same notation is used below, and then A is1,A2Z1SPEC and IPSPEC are deleted and A is deleted12Z1IP is added to ARRD1, and the updated ARRD is shown in FIG. 24, A4And A5The number of states of the synchronization product is less than A3And A12Z1IP synchronous product, A4And A12Z1The number of states of the automaton obtained by the IP Sync product, therefore, the second step should be done with priority to the Z4SPEC, A4And A5The mutually exclusive state pairs for Z4SPEC are (2, 1), (2, 3), (4, 1), (4, 3),
A45Z4=mutex(A4,A5,{(2,1),(2,3),(4,1),(4,3)})(18,26);
after this step, A in ARRD2 is added4,A5And Z4SPEC is deleted and A is removed45Z4Added to ARRD2 to give ARRD3, shown in fig. 25, and the third step is to process the Z2SPEC related to AGVs 2 and AGVs 3 by algorithm 5; for Z2SPEC, automaton A12Z1IP and A3In the set list2Of { (4, 1), (4, 3), (9, 1), (9, 3), (10, 1), (10, 3), (12, 1), (12, 3), (14, 1), (14, 3) },
A123Z12IP=mutex(A12Z1IP,A3,list2)(54,118).
deletion of A in ARRD312Z1IP,A3And Z2SPEC, and adding A123Z12IP, ARRD4 Final processing Z3SPEC, A relating to AGV2 and AGV4 is shown in FIG. 26123Z12IP and A45Z4Is contained in list3={(2,1),(2,6),(2,11),(2,13),(2,16),(2,17),(12,1),(12,6),(12,11),(12,13),(12,16),(12,17),(30,1),(30,6),(30,11),(30,13),(30,16),(30,17),(34,1),(34,6),(34,11),(34,13),(34,16),(34,17),(35,1),(35,6),(35,11),(35,13),(35,16),(35,17),(38,1),(38,6),(38,11),(38,13),(38,16),(38,17),(39,1),(39,6),(39,11),(39,13),(39,16),(39,17),(4l,1),(41,6),(41,11),(41,13),(41,16),(41,17),(42,1),(42,6),(42,11),(42,13),(42,16),(42,17),(43,1),(43,6),(43,11),(43,13),(43,16),(43,17),(45,1),(45,6),(45,11),(45,13),(45,16),(45,17),(46,1),(46,6),(46,11),(46,13),(46,16),(46,17),(47,1),(47,6),(47,11),(47,13),(47,16),(47,17),(49,1),(49,6),(49,11),(49,13),(49,16),(49,17),(50,1),(50,6),(50,11),(50,13),(50,16),(50,17),(51,1),(51,6) Of (51, 11), (51, 13), (51, 16), (51, 17), (52, 1), (52, 6), (52, 11), (52, 13), (52, 16), (52, 17), (53, 1), (53, 6), (53, 11), (53, 13), (53, 16), (53, 17) },
A1234521234IP=mutex(A123212IP,A4524,list3)(748,2504).
after handling the control demand of the mutually exclusive shared resource, the other control demands WS1SPEC, WS2SPEC and WS3SPEC are subsequently handled,
WSPEC=sync(WS1SPEC,WS2SPEC,WS3SPEC)(16,356);
S1=supcon(A12345Z1234IP,WSPEC)(4406,11338).
automatic machine S1Is the controller of the controlled system for global control requirements generated by this example;
4) by using a supervisory control theory, a global controller of the whole system about control requirements can be obtained, and the calculation can be carried out in TCT software through the following steps:
A=sync(A1,A2,A3,A4,A5)(3072,15360);
SPEC=sync(Z1SPEC,Z2SPEC,Z3SPEC,Z4SPEC,IPSPEC,WSlSPEC,WS2SPEC,WS3SPEC)(3888,20196).
S2=supcon(A,SPEC)(4406,11338).
automatic machine S2The controller is calculated by a supervisory control theory global controller and is used for controlling the global control requirement of the controlled system;
5) the results obtained by the two methods were compared: the results generated by the method and the global controller are tested by TCT, and the automaton S1And S2Is isomorphic, and the automaton S obtained by the method of the embodiment1Is a controller of the controlled system for the global control requirement, table 2 lists the sizes of the automata involved in the two methods, and the conclusion can be drawn from the data in table 2: the automaton adopting the method of the embodiment has a much smaller scale than the automaton generated during the calculation of the global controllerScale:
table 2: comparison of results of the two methods
Figure GDA0003632005650000221
Figure GDA0003632005650000231

Claims (1)

1. A controller generation method for a multi-agent system including mutually exclusive resources, comprising the steps of:
1) defining a model: the multi-agent system consists of n single agents with sensing, calculating and executing capabilities, and the ith agent uses Ai=(Qi,∑i,δi,qi,0,Qi,m) Is represented by i ∈ Nn1, …, n, for any agent aiAnd Aj,i,j∈NnAnd i ≠ j, alphabet
Figure FDA0003632005640000011
Let r beiDenotes the ith mutually exclusive resource, where i ∈ Nm1, …, m if resource rkBy two different agents aiAnd AjMutually exclusive sharing, then AiAnd AjResource r cannot be used simultaneouslykTo rkCan be implemented by a finite state automaton RkDescribing other control requirements by an automaton H, and obtaining the control requirement R of the whole system by using a supervision control theory1,...,RmAnd H, calculating by adopting the following process in TCT software:
1-1) calculating a ═ sync { a ═ sync }1,…,An);
2-1) calculating H' ═ sync { R1,…,Rm,H);
3-1) calculating S ═ supcon (a, H);
in step 1-1), the scale of the controlled system a grows exponentially with the number n of agents; in step 2-1), generating a global controller of the controlled system about all control requirements, and expressing the global controller by using the finite state automata S;
2) according to different conditions of using the mutual exclusion resource by the intelligent agent, processing is respectively carried out according to the following four scenes:
1-2) scenario 1 uses one mutually exclusive resource for two agents: let A1=(Q1,∑1,δ1,q1,0,Q1,m) And A2=(Q2,∑2,δ2,q2,0,Q2,m) Respectively represent two agents, and
Figure FDA0003632005640000012
let r be A1And A2The mutually exclusive resource used, H is a finite state automaton, alphabet, describing all other control requirements except r
Figure FDA0003632005640000013
And
Figure FDA0003632005640000014
respectively representing agents A1And A2Set of events, alphabet, starting to use resource r
Figure FDA0003632005640000015
And
Figure FDA0003632005640000016
respectively representing agents A1And A2The set of events for the resource r is released,
Figure FDA0003632005640000017
the process of generating the controller in scenario 1 is as follows:
1-1-2) establishing a deterministic finite state automaton (R ═ Q, Σ, δ, Q) describing the mutually exclusive control requirements of the resource R0,Qm) Where Q is {0, 1, 2},
Figure FDA0003632005640000018
Figure FDA00036320056400000111
q0=0,Qm={0,1,2};
2-1-2) order q1∈Q1And q is2∈Q2To for
Figure FDA0003632005640000019
If delta1(q1,0,σ1)!,δ2(q2,0,σ2) | A And delta1(q1,0,σ1)=q′1,δ2(q2,0,σ2)=q′2Then (q)1,q2) Is A1And A2For a mutex state pair of R, A is calculated according to Algorithm 21=(Q1,∑1,δ1,q1,0,Q1,m) And A2=(Q2,∑2,δ2,q2,0,Q2,m) All mutually exclusive state pairs for R:
and 2, algorithm: calculation of A1And A2Mutex status pair for R:
inputting: a. the1,A2
Figure FDA00036320056400000110
R;
And (3) outputting: agent A1And A2All the exclusive state pairs of R are specifically:
1) order to
Figure FDA0003632005640000021
2) Order to
Figure FDA0003632005640000022
3)while(q1∈Q1);
4)
Figure FDA0003632005640000023
5)if(δ1(q1,σ1) | A And delta1(q1,σ1)=q′1);
6)
Figure FDA0003632005640000024
7)end if;
8)end while;
9)end while;
10)while(q2∈Q2);
11)
Figure FDA0003632005640000025
12)if(δ2(q2,σ2) | A And delta2(q2,σ2)=q′2);
13)
Figure FDA0003632005640000026
14)end if;
15)end while;
16)end while;
17)
Figure FDA0003632005640000027
And is
Figure FDA0003632005640000028
3-1-2)A=mutex(A1,A2,list);
4-1-2)S=supcon(A,H),
Step 4-1-2) to obtain controllers S and S' ═ supcon (a)1||A2R H) is isostructural;
2-2) scenario 2 uses multiple mutually exclusive resources for two agents: let r1,r2,…,rnAs agent A1=(Q1,∑1,δ1,q1,0,Q1,m) And A2=(Q2,∑2,δ2,q2,0,Q2,m) Mutually exclusive shared resources, event sets
Figure FDA0003632005640000029
And
Figure FDA00036320056400000210
respectively represent agent a1Starting to occupy and release resource riEvent set
Figure FDA00036320056400000211
And
Figure FDA00036320056400000212
respectively represent agent a2Start to occupy and release resources riLet us order
Figure FDA00036320056400000213
The process of generating the controller in scenario 2 is as follows:
1-2-2) establishing a description resource riFinite state automaton R for mutual exclusion control requirementsi: r for automatic machinei(i∈{1,2,…,n})=(Qi,∑i,δi,qi,0,Qi,m) Is shown in which Qi={0,1,2},
Figure FDA00036320056400000214
qi,0=0,Qi,m={0,1,2};
2-2-2)A1And A2With respect to a plurality of resources r1,r2,…,rnControl demand R of1,R2,...,RnThe mutual exclusion state pair is calculated by adopting the following process:
(1) using Algorithm 2 at R1Get list1
(2) Using Algorithm 2 at R2Get list2
……
(n) at R by Algorithm 2nGet listn
Exclusive status pair list ═ list1∪list2∪…∪listn
Wherein, listiIs represented by A1And A2With respect to RiThe list is obtained by using an algorithm 2i,A1And A2Exclusive status list for all resources1∪…∪listn
3-2-2) controller of computing system with respect to all control requirements:
if R is R ═ R1||R2||…||RnAssuming that the other control requirements, other than R, are represented by the automaton H, the steps of calculating the controller are as follows:
(1)A=mutex(A1,A2,list);
(2) s is Supcon (A, H), let K be Lm((A1||A2) Andgate (R | | H)), under scene 2, supC (L)m(A)∩L(H),L(A))=supC(K,L(A1||A2));
3-2) scenario 3 uses one mutually exclusive resource for multiple agents: let Ai=(Qi,∑i,δi,qi,0,Qi,m) Is the ith agent, where i ∈ RnAnd n > 2, for any two agents AiAnd Aj
Figure FDA0003632005640000031
And i ≠ j, and r is set as a mutually exclusive resource and an event set used by all the agents
Figure FDA0003632005640000032
And
Figure FDA0003632005640000033
respectively represent agent aiBegin to occupy and release resource r, order
Figure FDA0003632005640000034
And sigma' ═ sigma1∪...∪∑n-∑O-∑RThe process of generating the controller in scene 3 is as follows:
1-3-2) establishing a finite state automaton (RR ═ Q, sigma, delta, Q) describing the mutual exclusion control requirement of a resource r0,Qm) Where Q is {0, 1, 2, …, n },
Figure FDA0003632005640000035
Figure FDA00036320056400000311
q0=0,Qm={0,1,2,…,n};
2-3-2) calculate A according to Algorithm 31,…,An-1And AnAll mutex status pairs for RR:
algorithm 3: calculating a mutual exclusion state pair when n agents share a mutual exclusion resource RR:
inputting: a. the1,…,An,RR,
Figure FDA0003632005640000036
…,
Figure FDA0003632005640000037
And (3) outputting: all the mutex state pairs of the n agents with respect to the RR are specifically:
1)i=1;
2)while(i≤n);
3)
Figure FDA0003632005640000038
4)while(qi∈Qi);
5)
Figure FDA0003632005640000039
6)if(δi(qi,σi) | A And deltai(qi,σi)=q′i);
7)
Figure FDA00036320056400000310
8)end if;
9)end while;
10)end while;
11)i++;
12)end while;
13)j=1;
14)while(j≤n);
15)k=j+1:
16)while(k≤n);
17)while(qi∈Qi);
18)while(qk∈Qk);
19)list=list∪{(qi,qk)};
20)end while;
21)end while;
22)k++;
23)end while
24)i++;
25)endwhile;
26) Outputting a list;
wherein steps 2) to 12) are calculating agent AiThe state of use of resource r, step 13) to step 25)Setting n for mutual exclusion state pair of each agentq=max(|Q1|,…,|QnI) and ne=max(|∑1|,…,|∑n|), the computational complexity of algorithm 3 is O (max (n.n)q.ne,n2.nq));
3-3-2) generating a controlled System A1||…||AnGlobal controller with respect to overall control requirements: according to the algorithm 4, the condition that n (n is more than 2) agents share one resource is calculated, and the algorithm 4 calculates a 'mutex' function of the n agents using one mutually exclusive resource:
inputting: disjoint Agents A1,A2,…,AnAnd a set list of mutually exclusive state pairs;
and (3) outputting: with respect to A1||A2||...||AnAnd a controller for restricting list, specifically:
1) execution A12…n=A1||A2||…||An
2) At A12…nDelete the status in the list, and A12…nAll states of the states in list can be reached along an uncontrollable path;
3)A12…n=AC(A12…n);
4) output A12…n
Output result A12…nIs reachable and controllable, let A ═ A1||…||AnIf A is12…nIs reachable, algorithm 4 is just the controller that calculates the controlled system a as to the control demand RR; otherwise, S ═ supcon (a, a) is used12…n) Obtaining a controller, assuming that other control requirements than the RR are represented by the automaton H, the controller of the controlled system with respect to global control requirements is generated as follows:
(1)A=mutex(A1,…,An,list);
(2)S=supcon(A12…nh), if K is equal to Lm(A | (R | | H)), then sucC (L)m(A12…n)∩L(H),L(A12…n))=supC(K,L(A));
4-2) Scenario 4 shares multiple resources for multiple agents: let A1,A2,…,AnN agents, r1,r2,…,rmFor m resources, let set a ═ a1,…,AnR as a set { r }1,…,rmThe resource allocation function is defined as the mapping Φ: r → 2A,Φ(ri)=AiWherein r isi∈r,
Figure FDA0003632005640000051
The problem in scenario 4 can be decomposed into m "multiple agents share a resource" sub-problems, AiThe agent in (1) is related to the resource riThe mutual exclusion state pair of the intelligent agent-resource relation graph ARRD is calculated by adopting an algorithm 4, and the definition of the intelligent agent-resource relation graph ARRD is as follows:
agent resource relationship graph ARRD (a, r, Φ) is an undirected graph, where a is a set of mutually exclusive agents, r is a set of mutually exclusive resources shared by the agents in set a, Φ: r → 2AIs a resource allocation function, phi (r)i)=AiRepresenting mutually exclusive resources riFrom AiIn the graphical representation of the ARRD, the agent is represented by a rectangle, the number of states and transitions of the finite state automata describing the agent are given in parentheses below the rectangle, the resource is represented by an ellipse, if phi (r)i)=AiThen from riTo AiEach agent in (1) draws a straight line, in this scenario, the problem is decomposed into m scenario 3 sub-problems, and two greedy ideas are used to solve the priority problem of sub-problem processing:
greedy idea 1: the more states deleted in the mutex function, the smaller the scale of the finally obtained automaton;
greedy idea 2: the smaller the size of the agents, the more priority the control requirements relating to these agents are to be handled, for
Figure FDA0003632005640000052
With respect to mutually exclusive resources riAutomatic machine R for controlling demandiThe description is carried out;
based on the ARRD and the two greedy ideas, the algorithm for generating the controller with respect to the control requirements of the agent and the mutually exclusive resource is shown as algorithm 5:
and algorithm 5: controller computation method for n agents and m mutually exclusive resources:
inputting: ARRD (A, r, phi), n agents A1,A2,…,AnAnd m automata R describing mutually exclusive resources1,R2,…,Rm
And (3) outputting: the controller related to the requirements of controlling the intelligent agent and the mutual exclusion resource specifically comprises the following components:
1)i=1;R={R1,R2,…,Rm};
2)while(i≤|R|);
3)
Figure FDA0003632005640000053
4) computing list by Algorithm 2i
5)j=i+1;
6)while(j≤|R|);
7)if(Φ(ri)=Φ(rj));
8) Calculating list by Algorithm 4j
9)list=list∪listj
10)R=R-{Rj};
11)end if;
12)j++;
13)end while;
14)
Figure FDA0003632005640000061
15)list=list∪listi
16)Ai=Φ(ri);
17)A′i=mutex(Ai,list);
18)A=A-Ai
19)A=A∪{Ai}′;
20)end if;
21)i++;
22)end while;
23)k=1,p=0;
24)lmin=+∞;
25)
Figure FDA0003632005640000062
26)for each Rk∈R;
27)
Figure FDA0003632005640000063
28)if(lmin>l);
29)lmin=l;
30)p=k;
31)endif;
32)end while;
33) Calculating listp
34)A′p=muter(Ap,listp);
35)A=A-Ap
36)A=A∪{A′p};
37)R=R-{Rp};
38)end while;
39) Output of A'p
Wherein, steps 2) to 22) describe that a plurality of mutually exclusive resources are shared by the same agent, and a first greedy idea is adopted to process the priority of the control requirements of the resources; from step 23) to step 38), the priority of the relevant control requirements is processed according to the second greedy idea, and the computational complexity of the algorithm 5 is O (| R |2) The output of algorithm 5 is SrIt is shown that assuming that the other control requirements are described by automaton H, let a be a1||…||AnThe controller of the controlled system with respect to global control demand is calculated by:
S=supcon(Sr,H),
let K equal to Lm(A)∩L(R||H),SupC(Lm(Sr)∩L(H),L(Sr))=SupC(K,L(A))。
CN202110757211.XA 2021-07-05 2021-07-05 Controller generation method of multi-agent system containing mutually exclusive resources Active CN113420864B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110757211.XA CN113420864B (en) 2021-07-05 2021-07-05 Controller generation method of multi-agent system containing mutually exclusive resources

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110757211.XA CN113420864B (en) 2021-07-05 2021-07-05 Controller generation method of multi-agent system containing mutually exclusive resources

Publications (2)

Publication Number Publication Date
CN113420864A CN113420864A (en) 2021-09-21
CN113420864B true CN113420864B (en) 2022-06-14

Family

ID=77720189

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110757211.XA Active CN113420864B (en) 2021-07-05 2021-07-05 Controller generation method of multi-agent system containing mutually exclusive resources

Country Status (1)

Country Link
CN (1) CN113420864B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101071500A (en) * 2006-05-12 2007-11-14 深圳迈瑞生物医疗电子股份有限公司 Hardware accelerated display parallel processing structure and parallel processing method
US8738860B1 (en) * 2010-10-25 2014-05-27 Tilera Corporation Computing in parallel processing environments
CN105116795A (en) * 2015-07-22 2015-12-02 西安电子科技大学 Distributed control method for automatic manufacturing system with assembly operation

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8024405B2 (en) * 2006-03-30 2011-09-20 Microsoft Corporation Declarative model for concurrency-control across lightweight threads
US20100211948A1 (en) * 2009-02-16 2010-08-19 Sun Microsystems, Inc. Method and system for allocating a resource to an execution entity

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101071500A (en) * 2006-05-12 2007-11-14 深圳迈瑞生物医疗电子股份有限公司 Hardware accelerated display parallel processing structure and parallel processing method
US8738860B1 (en) * 2010-10-25 2014-05-27 Tilera Corporation Computing in parallel processing environments
CN105116795A (en) * 2015-07-22 2015-12-02 西安电子科技大学 Distributed control method for automatic manufacturing system with assembly operation

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Modeling and analysis of real -time systems with mutex components;Guoqiang Li等;《2010 IEEE International Symposium on Parallel & Distributed Processing, Workshops and Phd Forum (IPDPSW)》;20100524;1-8 *
自动制造系统中的无死锁调度与控制;黄忠华;《中国博士学位论文全文数据库 信息科技辑》;20070415(第04期);I140-34 *

Also Published As

Publication number Publication date
CN113420864A (en) 2021-09-21

Similar Documents

Publication Publication Date Title
Luo et al. Distributed algorithms for multirobot task assignment with task deadline constraints
Chan et al. Optimal scheduling of multicluster tools with constant robot moving times, part I: Two-cluster analysis
Ibuki et al. Optimization-based distributed flocking control for multiple rigid bodies
Vick et al. Robot control as a service—towards cloud-based motion planning and control for industrial robots
Motes et al. Multi-robot task and motion planning with subtask dependencies
US9227318B1 (en) Optimal buffer space configuration and scheduling for single-arm multi-cluster tools
CN113346944A (en) Time delay minimization calculation task unloading method and system in air-space-ground integrated network
Abdessameud et al. Synchronization of nonlinear systems with communication delays and intermittent information exchange
US20210229281A1 (en) Collaborative multi-robot tasks using action primitives
CN105759633B (en) A kind of multi-robot system with strongly connected components controllably includes control method
CN111722539B (en) Digital twin manufacturing unit behavior modeling method based on time automaton
Testa et al. Distributed mixed-integer linear programming via cut generation and constraint exchange
Toyota et al. Formation control of multi-agent system considering obstacle avoidance
Li et al. Multi-objective policy generation for multi-robot systems using Riemannian motion policies
CN109102186A (en) Across floor path conflict processing method and system
Camisa et al. Multi-robot pickup and delivery via distributed resource allocation
CN113420864B (en) Controller generation method of multi-agent system containing mutually exclusive resources
Kawano Hierarchical sub-task decomposition for reinforcement learning of multi-robot delivery mission
Hasegawa et al. On resource arc for Petri net modelling of complex resource sharing system
Dai et al. Data-efficient control barrier function refinement
CN112148035B (en) Multi-unmanned aerial vehicle track optimization method and device, storage medium and computer equipment
Palanca et al. A flexible agent architecture in SPADE
Wang et al. Cluster consensus in multiple Lagrangian systems under pinning control
Taghavifard Scheduling cellular manufacturing systems using ACO and GA
Adamides Responsibility-based manufacturing

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