Keywords

1 Introduction

This paper is dedicated to applying generalized nets (GNs) for modeling economic interactions that involve participation of a large number of independent agents. The aim of the work is to enrich the tools for formal description of objects, processes and interactions in multi-agent systems (MAS).

Interest in the topic is inspired by recent changes in economics methodology, where a growing demand for alternative approaches to economic analysis is observed [3]. One option for achieving greater flexibility of economic models is employing multi-agent systems that simulate the behavior of a large number of individual participants, prominent in the literature as agent-based computational economics (ACE) [14].

ACE methods are suitable for the study of processes characterized by heterogeneity of the participants and a variety of interactions among them. These methods can successfully overcome some limitations of traditional economic models, such as requirements for the existence of equilibrium, assumptions about rationality of economic actors, etc. Modern MAS have various economic applications ranging from researching production processes [10] to modeling economic crises [12], financial markets [15] or automated auctions [8]. Despite the numerous advantages of ACE, however, research work on the specifics of building economic multi-agent systems is not plentiful. Enrichment of the tools for description, design and analysis of MAS would increase the quality of developed software and contribute to the further improvement to ACE modeling of economic objects, processes and phenomena.

The first section provides a brief overview of the basic ideas and functionality of some tools for describing MAS and emphasizes the advantages of generalized nets for modeling parallel processes in complex adaptive systems. The second section models the interaction of economic systems elements with the tools of generalized nets. The last section discusses the applicability of GNs in the design of multi-agent systems for economic simulations. The conclusion summarizes the main findings on the importance of the proposed method for researchers and analysts who deal with economic issues.

The main contribution of the work is in the construction of formal models of interaction among economic subjects (such as bank loan approval, stock trading, and online market). The created GNs information models reflect the mechanisms of interaction among participants and can be used in the analysis and prediction of economic processes as well as in the design of agent systems for their simulation.

2 Some Instruments for MAS Modeling

The topicality of the theme of this paper stems from issues surrounding the design of MAS. Applying the appropriate modeling instruments can significantly improve the quality of the development process and thus, the quality of the software system. Despite the significance of agent-based modeling, there is no standard protocol, language or tool to support the development of multi-agent applications.

In practice, different approaches are used to describe and present agent-based software. [16] provides a comprehensive overview of techniques for agent-oriented analysis and design, dividing them in two groups: those that extend or adapt existing object-oriented (OO) methodologies and those that adapt knowledge engineering or other techniques. The last decade saw the emergence of new instruments such as ODD, AML, etc.

The ODD protocol standardizes the three main blocks in the description of MAS – Overview, Design concept and Details. The basic idea behind the protocol is always structuring the information about an agent-based model in the same sequence. This sequence consists of several elements that can be grouped in the abovementioned blocks: purpose, state variables and scales, process overview and scheduling; design concepts; initialization, input, and submodels [6]. Although ODD model descriptions are understandable and complete, this protocol has several shortcomings and has been modified multiple times. For example, [7] adds more elements to the model. The advantages of ODD are its independence from subject area, operation system и programming language. Its main disadvantage is that it requires the properties and methods to be presented separately, which obstructs OO implementations.

AML is an extension of industrial standard UML and facilitates MAS specification in agent-oriented software engineering. This language is applied in all phases of MAS development and offers opportunities for project visualization through standard flowcharts types. Despite the fact that AML is sufficiently detailed and tangible enough, some aspects of agent-based systems such as concurrency, ontologies and mobility are not adequately supported. The capabilities of AML for visualizing the collaboration of several subjects is also limited [2].

The disadvantages of the abovementioned tools for design and technical description of MAS are:

  • inability to design complex composite structures with a high degree of detail,

  • problems in defining the dynamic behavior of the modeled objects,

  • no temporal dimension in interactions, and others.

These restrictions hinder the adequate representation of contemporary MAS. A viable alternative are Petri nets (PNs), a mathematical modeling language and a well-known instrument for the description of distributed systems [9]. Generalized nets (GNs) as their name implies are a significant extension and generalization of the concept of PNs. GNs are currently present in various developments in the field of artificial intelligence. Two of their main applications can be found in [5, 11, 13] contains a comprehensive bibliographic database. As agent-based economics studies complex distributed systems concurrent actions of a set of interacting entities and their emergent behavior, GNs constitute a modern formalism that could be applied to MAS modeling.

The main advantages of generalized nets as a discrete tool for description of models of complex systems with many different and interacting components, often involved in parallel activities are:

  • the conditions of predicate-transitive PNs are replaced by a predicate matrix which defines the rules for tokens’ transfer to the different output places,

  • in addition to discrete time in which processes in PNs take place, GNs contains an absolute time scale which can be used for keeping the time while a net is functioning,

  • specific token’s feature determines plausible predicate values,

  • while going through transitions, the tokens receive new characteristics through a characteristic feature,

  • practically no limitations to the characteristics of the tokens [1].

These features of generalized nets turn them into a potential tool for modeling dynamic processes within MAS with heterogeneous participants. Compared to well-known instruments for MAS modeling, GNs offer a simple and effective way of adequately modeling real processes. With GNs, designers are free to define different types of data and create models suitable for OO programming. Therefore, generalized nets are a possible alternative for overcoming the shortcomings of the abovementioned modeling languages and for expanding the applications of agent technology in economic research studies.

3 Generalized Net Models for MAS Simulation of Some Economic Processes

Through GNs, economic processes are described as a complex system of objects that interact and influence each other over time. Descriptions of two GN models of examples from the field of economics are discussed below.

Assume a business process of loan approvals in a financial institution is given. Loan candidates are represented by tokens with initial characteristics that include an agent’s income, age, number of children, other debts, etc. The representation of this GN model (Fig. 1) contains only three transitions.

Fig. 1.
figure 1

A GN model for bank loan system

The form of the first transition is the following:

$$ Z_{1} = \left\langle {\left\{ {l_{1} } \right\}, \left\{ {l_{2} , l_{3} } \right\}, r_{1} , M_{1} , \wedge \left( {l_{1} } \right)} \right\rangle . $$
(1)

The token from place l 1 splits into two tokens α 2 and α 3 , which take places l 2 and l 3 , respectively. Token α 2 obtains characteristic “number of clients who receive the loan” at place l 2 and token α 3 obtains characteristic “number of clients who do not receive the loan” at place l 3 . If we need any additional information, such as loan type, we can expand the respective token’s characteristics.

The transition condition r 1 is represented by the index matrix (IM):

where W 1,2 and W 1,3 define the conditions for approving and declining a loan request.

The arc-capacity IM M 1 for the transition Z 1 can have the form:

with possibility to receive n loan requests simultaneously. In this case we must set c(l 1 ) = c(l 2 ) + c(l 3 ) = c(l 6 ) = c(l 7 ) = n, where c gives the capacities of the places.

The last element of Z1 is the so-called transition type and it is an object having a form similar to a Boolean expression. It contains as variable the symbol that serves as label for the transition’s input place, and the Boolean connective \( \wedge \) determines that the place l1 must contain at least one token.

The second transition is the following:

$$ Z_{2} = \left\langle {\left\{ {l_{5} , l_{6} } \right\}, \left\{ {l_{7} } \right\}, r_{2} , M_{2} , \vee \left( {l_{5} , l_{6} } \right)} \right\rangle $$
(2)

Now,

where n ≥ 1.

This transition models the process of repaying the loan. If necessary, that repayment could be carried out by the loan guarantors (place l 6 ). In real life there are various other situations such as, for example, the borrower applying for refinancing.

The transition type \( \vee \left( {l_{5} , l_{6} } \right) \) determines the following condition: there must be at least one token in the set of places l 5 and l 6 .

Actions at Z 3 can be represented as follows:

$$ Z_{3} = \left\langle {\left\{ {l_{2} , l_{4} } \right\}, \left\{ {l_{4} , l_{5} } \right\}, r_{3} , M_{3} , \vee \left( {l_{2} , l_{4} } \right)} \right\rangle , $$
(3)

Where

and predicate W 2,4 has characteristic “it is necessary to refinance the loan”, W 2,5  = \( \neg \) W 2,4 . Token α 2 enters place l 4 or l 5 and obtains suitable characteristics. The form of IM M 3 is similar to the one above.

In this first GN model, we discussed one of the ways to represent the process of lending a loan. All discussed situations can be broken down into further details.

Figure 2 presents a model of a part of MAS for stock exchange. Transition Z 1 models the process of receiving input orders to buy a particular amount of financial instruments and their distribution for further processing, e.g., market order (l 3 ), limit order (l 4 ) and market-to-limit order (l 5 ).

Fig. 2.
figure 2

A GN model of stock exchange system

Here is what transition Z 1 looks like:

$$ Z_{1} = \left\langle {\left\{ {l_{1} , l_{2} , l_{11} ,l_{12} } \right\}, \left\{ {l_{3} , l_{4} , l_{5} , l_{7} } \right\}, r_{1} , M_{1} , \vee \left( {l_{1} , l_{2} , l_{11} , l_{12} } \right)} \right\rangle . $$
(4)

The initial characteristics of the tokens from this part of MAS are: l 1 – reception of purchase orders; l 2 – presence of new information from the National Commerce Register, which should be taken into consideration in the further implementation of the service; l 11 – arrival of a purchase order, after the supervisory authorities denied participation for this buyer once; l 12 – availability of information in the national database that needs to be compared with information in the submitted documents.

Matrices r 1 and M 1 have the following contents:

Transition Z 2 models the process of structuring the received applications as market orders (l 3 ), limit orders (l 4 ) and market-to-limit orders (l 5 ):

$$ Z_{2} = \left\langle {\left\{ {l_{3} , l_{4} , l_{5} } \right\}, \left\{ {l_{6} } \right\}, r_{2} , M_{2} , \vee \left( {l_{3} , l_{4} , l_{5} } \right)} \right\rangle . $$
(5)

The process of buying a stock under the defined deal parameters is modeled with transition Z 3 :

$$ Z_{3} = \left\langle {\left\{ {l_{6} } \right\}, \left\{ {l_{8} , l_{9} , l_{10} } \right\}, \left\{ {t_{3} } \right\}, \left\{ {t_{31} , t_{32} ,t_{33} } \right\}, r_{3} , M_{3} , \vee \left( { l_{6} } \right)} \right\rangle . $$
(6)

The times of occurrence of transitions Δt 3-31 , Δt 3-32 и Δt 3-33 depend on the length of the corresponding auction sessions.

Transition Z 4 represents the outcome of information system:

$$ Z_{4} = \left\langle {\left\{ {l_{7} , l_{8} , l_{9} , l_{10} } \right\}, \left\{ {l_{11} , l_{12,} l_{13} } \right\}, r_{4} , M_{4} , \vee \left( {l_{7} , l_{8} , l_{9} , l_{10} } \right)} \right\rangle . $$
(7)

For this transition IM have the following contents:

The presented model reflects only a small part of the actions included in the procedures of an agent-based exchange information system.

4 Generalized Net Model of Electronic Market Simulation

Both examples above demonstrate the possibilities for real use of GN in agent-based economic modeling. The first one represents a bank activity in a credit department whose basic processes are described. This model can be used for predicting different situations that may arise at the department (delaying payments, modifying credit terms and conditions, refinancing, etc.).

The second model visualizes purchases at a stock exchange. This model can be expanded to present a market where every agent, buyer or dealer, could pursue their own strategy for buying or selling. Both models could also be improved to provide mechanisms for reporting the impact of external effects on interest rates, stock prices and more.

The main advantages of both GN models from Sect. 3 are:

  • describing and modeling of real-life parallel processes,

  • simulating of processes,

  • monitoring and controlling of processes.

However, these two examples do not demonstrate the essence of applying a GN model to an agent-based system, which is the representation of the behaviors and interactions of many agents, each of which has unique characteristics. For demonstrating these advantages of GNs, we will build a model of MAS for many-to-many negotiation (Fig. 3).

Fig. 3.
figure 3

Many-to-many negotiation

In order to describe the interactions between buyer B i , i = 1, …, m and seller S j , j = 1, …, n [4] proposes a model of bilateral agents’ negotiation, where each agent’s behavior depends on a scoring function and the remaining time that an agent has. The corresponding GN model of buyer Ba behavior is shown on Fig. 4.

Fig. 4.
figure 4

GN model of buyer agent in electronic market MAS

The first transition Z 1a has n + 1 input places, labeled l 1,a , l 2,a , …, l n,a – receiving sellers’ offers (the notation used here is l i,j , where i is buyer number, and j is seller number) and l ago means that the buyer is ready to receive the next offer (i.e. it has finished processing the previous one). There is only one output–l a and it is the offer that is currently being processed.

Transition Z 1a chooses an offer to process provided that processing the previous offer has been completed and place l ago contains a token:

$$ Z_{{1{\text{a}}}} = \left\langle {\left\{ {l_{{1,{\text{a}}}} , l_{{2,{\text{a}}}} , \ldots ,l_{{{\text{n}},{\text{a}}}} ,l_{\text{ago}} } \right\}, \left\{ {l_{a} } \right\}, r_{{{\text{Z}}1{\text{a}}}} , M_{{{\text{Z}}1{\text{a}}}} , \wedge \left( {l_{ago} , \vee (l_{1,a} , l_{2,a} , \ldots ,l_{n,a} )} \right)} \right\rangle . $$
(8)

The transition condition r Z1a and arc-capacity M Z1a are represented by IMs, where W 1 , …, W n are predicates, through which the next offer for processing is determined. It choice may depend on negotiation history with a certain buyer, offer conditions, etc. As only one offer can be processed at a time, it is implied that only one of the predicates W 1 , …, W n can be assigned a value of true in case a certain choice is made. A value of false assigned to transfer predicate l ago l a means that the token of l ago could not be assigned to l a .

The second transition is the following:

$$ Z_{{2{\text{a}}}} = \left\langle {\left\{ {l_{{{\text{a}}init}} , l_{\text{a}} ,l_{\text{atm}} } \right\}, \left\{ {l_{a\alpha } ,l_{a\beta } ,l_{a\gamma } } \right\}, \left\{ {0,0,t_{prop} } \right\},r_{{{\text{Z}}2{\text{a}}}} , M_{{{\text{Z}}2{\text{a}}}} , \vee (l_{ainit} , l_{a} ,l_{atm} ) } \right\rangle $$
(9)

and it models the process of assessing the currently processed offer and making a decision. The offer l a chosen in transition Z 1a serves as input. Output could be l , l and l , which correspond respectively to decisions to withdrawing from negotiations due to time running out (timeout); accepting the processed offer and making a deal; preparing a counteroffer. Additional input for this transition may also be provided: l ainit – for initializing an agent’s activity and making an opening offer and l atm – for forceful activation of a transition in case of prolonged lack of new offers.

Now,

where Init is a predicate for making an opening offer, F 1 , …, F 3 and T 1 , …, T 3 are predicates for transitions to the respective output places. The two false predicates in r Z2a guarantee that, during initialization no timeout or making a deal may occur. The third element of a transition’s definition gives the length of the transfer to output states (places) where t prop indicates the time needed for preparing a new offer (transfer to l ).

The last transition \( Z_{{3{\text{a}}}} \) is as follows:

$$ Z_{{3{\text{a}}}} = \left\langle {\left\{ {l_{{{\text{a}}\gamma }} } \right\}, \left\{ {l_{a,1} ,l_{a,2} , \ldots ,l_{a,n} ,l_{ago} ,l_{atm} } \right\}, \left\{ {0,0, \ldots ,0,0,t_{timeout} } \right\},r_{{{\text{Z}}3{\text{a}}}} , M_{{{\text{Z}}3{\text{a}}}} , \wedge (l_{a\gamma } )} \right\rangle . $$
(10)

The last transition directs the prepared specific offer (l ) to the respective seller S 1 , S 2 , …, S n . Moreover, activating this transition ensures unconditional (predicate true in r Z3a ) tokens for l ago and l atm , which are necessary for allowing transition Z 1a and activating transition Z 2a in case of timeout, respectively. Transfer time of token to l atm is given by the parameter t timeout (Eq. 10). This guarantees periodic self-activation of this transition when there are no new offers.

The IMs are:

where Y 1 , …, Y n are predicates for directing the generated offer to the respective seller. Only one of predicates Y 1 , …, Y n may be assigned a value of true when activating the transition.

A GN model of agent-buyer in MAS for simulating an e-market is very similar.

The model that was described earlier demonstrates modeling time-related characteristics via a GN. For example, to measure the time needed for generating new offers in different bidding strategies, the t prop characteristic is used, and for ensuring activity when there are no offers, t timeout is set.

The three GN models that were presented demonstrate some of the advantages of GN. For example, detailed and individualized description of the mechanism of interaction among participants facilitates the software realization of MAS via an OO programming language. Agents’ behaviors and interactions can be described in detail and time-related characteristics can also be added.

5 Conclusion

In this paper we show that generalized nets are detailed, comprehensive and tangible enough to be a useful tool for building multi-agent information systems. A comparative analysis has been conducted on instruments for multi-agent modeling. The advantages of GNs as a generalization of Petri nets variations were listed. Simplified generalized nets which model some business processes were developed. Employing GNs, a new model of agent-participant (buyer or seller) in MAS for electronic market simulation was built. The analysis that was performed shows that GNs are a suitable instrument for preliminary modeling of basic parts of large scale ACE applications before their software implementation. Due to their features GNs might form a significant contribution to the effort of bringing about widespread adoption of intelligent agents across various areas of applications, such as economic research. Future work will include integrating the developed models in complex models in MAS for electronic commerce.