Aided design of market mechanisms for electricity clusters

There are two pillars of sustainable development in the electricity sector: renewable energy and energy efficiency. Both can be addressed by a concept of electrical energy cluster, which is a local area power system that works towards self-balancing. In this paper, we consider the problem of designing the market mechanism for an electrical energy cluster. This task is complex and extensive with ill-defined constraints and criteria. Therefore, we propose the ARchitecture for Market Systems, a well-defined reference architecture that captures the entire design process and helps the designer to navigate through it. The contribution of the paper lies in structuring the cluster mechanism design problem through problem decomposition into several areas called views. Within this architecture, a mechanism is being designed by choosing parameters from the space of solutions, visualising the concept on different schemas, and applying simulation models for evaluation purposes. Based on our reference architecture, we also propose a decision support system (DSS) for the market designer. We prove the usefulness of the approach by implementing a part of the DSS concept and by presenting its application for exemplary cluster design processes.


Introduction
There is no doubt that the electrical power sector is undergoing a transformation that will profoundly shape people lives and the future of the planet in the long term. There are many factors driving the transformation (see Fig. 1), but taken together they can be synthesised into a megatrend towards greater granularity and energy democratisation (IRENA 2019). This means the inclusion of increasingly lesser participants in the growing scope of market functioning. Enhanced granulation also means scattering B  1 Main factors driving the current transformation of the electricity sector mechanisms, functions and entities, while increasing the accuracy of models and methods. For instance, the number of distributed energy resources, including renewable energy, has grown tremendously over the past few years. At the same time, technical and economic possibilities for the bi-directional flow of flexibility have emerged. As a result, renewable energy, initially bringing many burdens to grid operation, has become a new tool for effective balancing (Hirth and Ziegenhagen 2015). While all these trends create great opportunities for mankind, it is extremely important to direct efforts into sustainable energy development.
There are two pillars of sustainable electrical energy development: renewable energy and energy efficiency (Chel and Kaushik 2018). Both are listed as targets of the 7th Sustainable Development Goal (SDG7), known as Affordable Energy and Clean Energy that is part of the current policy of the United Nations Development Programme (UNDP). Within the remits of a universal call to action to protect the planet and ensure peace and prosperity, it states the following desirables: reliable and modern energy services, universal access to affordable, reliable and modern energy services, substantial increase of the share of renewable energy in the global energy mix, and reduction of the carbon intensity of energy as a key objective in long-term climate goals.
As an answer to the above, distributed resources (DERs) and demand side management play an important role. Although the global installed power of renewable energy as well as average energy efficiency are increasing, strong barriers hampering this growth appear in specific areas of the world. In particular, this happens where incumbent business is heavily based on fossil fuels and, thus, strives to limit the development of renewable energy. The fact that big electric utilities companies may not be favourably disposed to fast changes towards energy sustainability, makes local community-based initiatives extremely important.
In this paper, we focus on electric energy clusters (in short: energy clusters), which are understood as local communities that strive to achieve local energy balances  (Staszków et al. 2017). An energy cluster is a local area power system, i.e. a geographical concentration of institutions and individuals aiming at energy generation and demand balancing, distribution and electric power marketing (see Fig. 2). A cluster, as a manifestation of civic energy, usually supports green technologies, mainly based on photovoltaics, wind power, hydrogen or biomass. These types of small, distributed resources are often located close to energy consumers, which reduces the costs of electrical energy transportation and power losses and, thus, increases efficiency and has a positive effect on system safety. In order to address SDG7, we believe that a cluster needs to be organised as a market system (market mechanism embedded in an environment). Processes that have to be implemented in a cluster, however, may be complex and multi-stage, which reflects the nature of the energy balancing process. Different mechanisms of communication and transaction, different commodities and likely different entities are involved at various areas of the market. Therefore, a cluster can be a complex mechanism of goods and services exchange with important technical constraints [a class of network flow problems with side constraints, see Kaleta (2012b)], e.g. a local transmission network. There is no consensus on which mechanism is the best. Mechanism settings that are fair, efficient and sustainable are in general unknown and probably unattainable, so market design remains an art mostly based on expert knowledge. At the same time, there are no widely acknowledged practices in this field and it turns out that it is extremely hard to propose a practical, comprehensive solution. Therefore, there is strong need for systematising the design process and its support.
In this paper, we consider the problem of designing the market mechanism for a local energy cluster. The main contribution of the paper lies in structuring the cluster mechanism design problem through problem decomposition into several areas called views. This allows the market designer to organise their design process in a much more systematic way. We support the market design process by delivering a well-defined reference architecture that frames the problem, but at the same time retaining freedom in terms of specific modelling approaches. Designing a cluster is actually a series of decisions. Therefore, based on our reference architecture, we propose a decision support system (DSS) that encompasses this series. We prove the usefulness of the approach by implementing a part of the DSS concept and presenting its application for exemplary cluster design processes. We show how easy it is to redesign some aspects of the setting via some interaction with the DSS in order to gather insights on the evolving design. This is possible since we structure the problem and deconstruct it into several sub-problems (views). For the most important views, however, we also draw a design subspace. Within the reference architecture, a mechanism is designed by choosing parameters in each design subspace, visualising the concept on different schemas, and applying simulation models for evaluation purposes. Since we present only preliminary advances in the most important views of the reference architecture, the approach reveals a broad spectrum of problems that must be tackled by the OR community. Therefore, the role of OR remains crucial for the development of sustainable energy clusters in the nearest future, and our reference architecture is a powerful tool for combining solutions in different areas of market design into one holistic approach.

Problem formulation
We assume a competitive environment which can be modelled as the system illustrated in Fig. 3 derived from the standard Mount-Reiter diagram (Mount and Reiter 1974).
In this system, we assume that a set of agents, N , participates in a game which results in a redistribution of commodities. There can be one distinguished agent called System Operator (SO), who is responsible for system operation (in particular, choosing the payoff structure) and has an impact on the mechanism according to some regulations. Each agent sends their signal (messages, actions at Mount-Reiter diagram) to the mechanism. The mechanism decides on commodity redistribution and payoff structure, which define outcomes. The agents strive towards their selfish objectives, while the whole mechanism is designed to achieve certain goals. Designing a cluster involves designing a mechanism in a broad sense, including the environment in which the mechanism is embedded.

Fig. 3 Market mechanism
Let θ i be a state of agent i revealed to the mechanism, that is, a signal sent by the agent to the mechanism. It may not contain their private information like real valuations, costs etc. All signals constitute a vector θ ∈ representing current market state, where denotes a set of all possible market states. We assume that any general information about market states is available to the SO and can be sent by them to the mechanism.
With a given market state θ , the decisions leading to transactions are made in either a centralised or decentralised way and are denoted by a = a(θ ) ∈ A, where A is a set of possible results. It includes allocations of commodities that represent the volumes of transactions, as well as other parameters that are a result of the mechanism, including prices x.
The benefits u i (a, θ i ) resulting from a market game where player i acquires gains depend on the mechanism result a and the agent's state θ i . In order to maximise their benefits u i (a, θ i ), the agent i adopts strategy s i (θ i ) from set of strategies S i available to agent i and based on their state θ i . During the game, each agent makes their strategy, and both results a(θ ) and benefits u i are a complex effect of the market game.
Designing the market mechanism is a reversed problem to the typical problems considered in game theory. The problem is to design the rules of a certain game in order to achieve game results with certain features. Following Toczyłowski (2003), we define mechanism M as a pair (S, g), where S is a space of possible strategies of agents and g : S 1 × · · · × S n → A is a function that defines the rules of the game. Assuming that f (θ ) is the desired result of the game, it is necessary that g(s 1 , . . . , s n ) = f (θ ) becomes a game equilibrium, e.g. Nash equilibrium, Bayesian equilibrium or dominance equilibrium.
The key difference compared to the classical mechanism design is that we consider that the allocation determined by the mechanism must be feasible according to some limited resources used for commodities transportation, that is, the transmission grid. This infrastructure is modelled as a directed graph G = (V , E), which represents the transmission system of the grid. Each agent n is located at vertex V n and can inject or receive energy from it. The flow of commodities in network G is the result of a transaction arranged by the mechanism, but also it follows the basic principles of Kirchoff's laws. Due to technical constraints, each edge e ∈ E has limited capacity, while each vertex v ∈ V has limited divergency. This means that the mechanism cannot set any allocation, but it must take into account the limited resources represented by G and the principles of commodities' flow in G. This requirement cannot be reduced to a restrictive definition of S i for each agent since the problem is not decomposable to each agent, and the resulting flow depends on allocations to all agents. This is the main area where the theory of the mechanism design encounters strong barriers to implementation, while the process of designing energy clusters is more or less a process of searching for acceptable solutions constituting a certain trade-off. In this case, the design space should be defined and a decision support system, including simulation analysis, is needed to support the designer of the energy cluster who makes decisions on its settings.
The market mechanism operates in environment E denoted by the following tuple E = (N , , A, U), where: -N is a set of agents, -is a set of market states, -A is a set of mechanism results, -U is the outcomes of agents.
The social choice function f : → A defines results a = f (θ ) ∈ A of a game for a given market state θ . Then, the mechanism M = (S, g) of the designed game implements the social function f in environment E if for each state θ ∈ there exists a strategy s * = (s * 1 , . . . , s * n ) such that g(s * 1 , . . . , s * n ) = f (θ ) and s * is a game equilibrium induced by mechanism M = (S, g). The best situation is when dominant strategies lead to a competitive (Walrasian) equilibrium, which is defined by a set of requirements: market clearance, individual rationality, budget balance, envy-freeness.
The cluster design problem cannot be reduced just to the pure market mechanism design problem. The scope of decisions that the designer must undertake goes beyond the pure market rules and covers the whole system, including both mechanism and environment. The quality of the solution touches not only aspects of the pure mechanism, like the above-mentioned requirements for competitive equilibrium, but also can include real life aspects, like agent complexity, adjustment of processes in the daily activities of the agent and others. Therefore, the assessment of the cluster design is not well defined and often a subjective issue. Let us denote by S a set of possible solutions, that is, cluster designs. Choosing the solution is a multi-criteria, complex task with a set of quality measures L = {q 1 (S), . . . , q |L| (S)}. We assume that there is partial order in the set of solutions S, that is, there are functions q l : S → R such that if q l (S 1 ) > q l (S 2 )∀ l=1..|L| , then solution S 1 is strictly preferred over solution S 2 . The problem of finding the best solution in S is defined as follows: Some of the criteria are widely acknowledged. Toczyłowski (2003) defines the efficiency of value a = f (θ ) of the social choice function as the maximisation of social welfare. In the simplest scenario, social welfare is defined as: where B and S are sets of buying and selling offers respectively, e m and s l are prices, and d m and p l are accepted volumes of buying and selling offers respectively. Pareto optimality of the value a = f (θ ) of the social choice function can act as another quality measure. Pareto optimality is achieved if no individual allocation a i can be improved without worsening the results of other agents (Toczyłowski 2003). This means that for any given θ there is no for all i ∈ N and with sharp inequality for some i. Incentive compatibility is another desirable criterion. It is achieved when truthful strategies of agents s * are their best strategies. Other exemplary criteria include the following: -Short-term economic efficiency-can be approximated by cost minimisation or social welfare maximisation (Toczyłowski 2003); -Long-term economic efficiency-for instance, it can be approximated by the quality measures of market signals (Kaleta 2016); -Fairness versus Price of Fairness-minimisation of the price that must be paid in order to satisfy fairness conditions (Kaleta 2014); -Matching processes to agents' preferences.
the efficiency of allocation in the mechanisms of second price (Parkes et al. 2001). Despite the classical theory of auction, the practical design of mechanisms is still an art, in which the designer puts more of their experience and intuition when making design decisions, and then tries to prove the features of the developed solution. There are some approaches to optimal mechanisms, for instance the one considered by Myerson, in regard to the effect of solving a specific optimisation problem (Myerson 1981), but so far the formulation of the general problem has not allowed the automatic design of mechanisms in practice.

Attempts towards a holistic approach
A number of attempts have been made in the literature to capture the problem of designing market mechanisms in a systemic manner. This has resulted in the development of a number of taxonomies of auction mechanisms, from which the Montreal Taxonomy (MT) is the best known and relatively the most comprehensive. MT defines a set of mechanism criteria and a space of possible values for the space of market solutions. According to Ströbel and Weinhardt, it contains a comprehensive set of rules and algorithms necessary to define the market structure and, in particular, it can be used in the design of information systems and their implementation using IT tools, giving structure to the software development process starting from the analysis phase, through to design and implementation (Ströbel and Weinhardt 2003).
The system approach naturally prompts to look for a certain structure of the problem that goes beyond the conceptual system. Starting from the second half of the 1990s, along with the increasing importance of auction mechanisms supported by IT systems, researchers have developed a universal description of auction mechanisms, which at the same time ensures the expressiveness of a wide range of mechanisms, and provides a complete description of the mechanism and machine interpretation. Works from this period have begun to distinguish explicitly the phase structure in the market processes, which eventually resulted in the division into the phases of bid submission, allocation of offers and pricing (Ströbel and Weinhardt 2003;Schmid and Lindemann 1998;Maes et al. 1999). The concept introduced by Weinhardt and others , known in the literature as Market Engineering, plays a special role in the structural approach. The structural approach is also the foundation of Toczyłowski's works (Toczyłowski 2003). To the best of our knowledge, Toczyłowski's work is the only one directly addressing the problem of designing mechanisms under constraints by applying his concept of multi-commodity trade. Toczyłowski focuses more on the structure of the problem expressed in the form of parametric balancing models, and to a lesser extent as embedded in the structure of processes or information elements around these processes. Finally, the structural approach has led to the creation of a number of reference architectures (Rolli et al. 2004;Kalagnanam and Parkes 2004;Rolli and Eberhart 2005).
Recently, several studies taking advantage of various reference architectures have been published. In Mengelkamp et al. (2018), a market design framework consisting of seven fundamental components for designing a microgrid energy market has been derived, and used for the Brooklyn Microgrid real case study. Zhang et al. pre-sented a concept based on a four-layer system architecture, but considered it in three dimensions (Zhang et al. 2018). This approach is very close to the Smart Grid Architecture Model (SGAM) developed by the three European Standardisation Organisations (CEN-CENELEC-ETSI 2012). Based on that, a modelling toolbox has been developed and efforts towards a model-driven approach with proper modelling document processes have been undertaken (Wilker et al. 2018). The extensive review of works related to SGAM, including theoretical fundamentals and current applications is presented in (Uslar et al. 2019).
While the approaches listed above focus more on elements needed to run a market and less on market mechanisms modelling the market, Khorasany et al. presented a general P2P market framework, but with specific allocation and payment rules (Khorasany et al. 2019). The closest approach to the one we present in this paper has been presented in Huber et al. (2018), where Market Engineering House is applied to structure the process of designing so-called Smart Market Platforms. The Market Engineering House leaves open the space of possible market mechanisms, but it also defines its components on a very general level and does not provide any specific modelling tools. Therefore, the paper ends in an open call for suitable bidding languages and incentive-compatible pricing mechanisms development. Finally, some similar attempts to reference architecture for market mechanisms in other specific sectors have appeared recently, e.g. in cloud logistic systems (Jaekel 2019).
Lastly, we need to mention that market mechanism design is increasingly perceived as more of an engineering task, and as such the role of engineering approaches, including OR and software engineering-based approaches, is growing. Nisan (2007) believes that mechanism design in the field of economics is the equivalent of designing algorithms, protocols and systems in the field of computer science. He claims that designing the mechanism solves an algorithmic problem, which leads to the field called Algorithmic Mechanism Design. Conversely, the role of computer science is to support the implementation of designed mechanisms, referred to as Electronic Market Design. According to Lai (2005), it is likely that a pure mechanism designer would design a mechanism with high economic efficiency but omitting the aspects of computational efficiency, reliability, security, complexity and user experience, while a pure system designer would probably attach importance to completely opposite concepts. Also, Subrahmanian and Talukdar (2004) consider market mechanism design as an engineering task.

Lessons from the literature review
Different approaches, from the narrowly understood mechanism design through to architectural models and extensive frameworks addressing implementation and legislative issues, show that designing market mechanisms is a broad challenge and can be observed from various angles. The problem is demanding, and the theory of mechanisms does not support their practical design with clear answers. There is very limited knowledge concerning the concept of decision support systems (DSS), which support a decision maker who is involved in market design for an electricity cluster. Instead of a holistic approach, there are some fragmentary solutions that can be grouped into two streams of research. In the first stream, a decision maker can be supported in designing detailed solutions for some areas of the market mechanism design. Some theoretical frameworks define the space of a narrowly understood mechanism, in the form of taxonomy or parameterisation (Ströbel and Weinhardt 2003;Toczyłowski 2003). In this approach, it is hard to cover the complexity of modelling, as well as to combine modelling elements into coherent market processes. The second stream delivers extensive frameworks that support the decision maker in a broad view of the problem (including implementation aspects in ICT technologies or legal issues), but they offer very limited support in decision making related to detailed but crucial design issues, like choosing the right formulation for the Winner Determination Problem, pricing rules or bidding languages (Uslar et al. 2019;Huber et al. 2018). Some papers use such frameworks to present very specific market designs [e.g. Khorasany et al. (2019)], but it is hard to use them in general decision-making processes. Finally, there is no support for designing network auctions or more general auctions under constraints.
It is clear that there is no general method for assisted designing of market mechanisms. What the designer could expect is a reference architecture that guides them through all aspects of the problem and delivers tools at each step, while preserving freedom in making essential decisions based on the solution space. The decision maker should have software tools supporting them in modelling the market design as well as its validation. Therefore, there is a gap between the current state-of-the-art and the required decision support tools. At the same time, an increasing number of references to different market design architecture frameworks in publications presenting specific market designs indicates that there is strong need for a generalised, structural approach.
This paper falls into the stream of works devoted to reference architectures for mechanism design. It differs from other works in the scope of the framework. It is broader than pure taxonomies, but does not include issues related to specific implementations or technologies, which would introduce the risk of technology bias. Therefore, it is a purely designing tool. It also applies the parameterisation approach that helps the decision maker to search the solution space. Finally, it allows for the building of a complex decision support system for the designer.

Reference architecture
A market balance can be obtained by multi-step processes of the multi-commodity trade. A cluster coordinator is responsible for running a complex process that leads to demand and supply balance at every given moment. Usually, this process is a sequence of auctions. Due to the complexity of the multi-stages and multi-commodity mechanism that must be applied for energy clusters, a single representation of the complete model is not possible. Conversely, it is not necessary to emphasise the full complexity during most development tasks, which are rather focused only on some aspects of the problem. Thus, there is some apparent contradiction between the need for a complete model and presenting the details that are only important for a given smaller issue. In order to deal with this problem, a new reference model of a market system, ARchitecture for Market Systems (ARMS), is proposed.
ARMS brings an integrated, holistic view on the mechanism design. The aim of ARMS is to tackle the entire problem in one consistent life cycle from design and deployment to maintenance. It integrates and extends suitable modelling methods into one framework and various approaches mainly taken from software development, enterprise modelling and business process modelling. It also uses and enhances the parameterisation concepts of Toczyłowski in each field of design space (Toczyłowski 2003).
The concept of ARMS addresses the problem of system design for a cluster formulated in Sect. 2. The decision maker of the problem is identified with the cluster designer, who can be anyone involved in the comprehensive market design for a cluster with a need for a systematic structured approach towards the market design. According to our findings from the literature review, the problem is more often perceived as a combination of algorithmic and information system engineering challenges. Therefore, we expect that the decision maker is an engineer, who is willing to apply a systematic approach to solve the problem, preferably one that has been successfully applied in other engineering areas, including computer science. As the number of energy clusters is rapidly increasing and each case involves a dedicated solution, we expect that practitioners involved in cluster implementations in particular will look for decision supporting systems that can be based on ARMS.
The proposed approach consists of deconstructing the complex market system into so-called views in which system modelling takes place. Figure 4 presents mapping of the most important elements of market design into views, as defined in ARMS methodology. The approach assumes that it is possible to deconstruct the environment together with a mechanism into a set of general components organized in views. Then, this general, abstract data model, can be used to compose and orchestrate processes, thus leading to a comprehensive model that includes all the information necessary to run simulations and start practical implementation.
The organisational structure of the cluster is modelled in organisation view. It defines the market participants and the static relations between them. Usually, it is performed by the market entity hierarchy, i.e. as an acyclic oriented graph. Data view encompasses models for each data (apart from organisational data and product/performance data discussed later) that are included in market processes. Different models can be used to model different kinds of data, e.g. ontologies, entity-relationship diagrams and UML classes. The commodities' structure and transmission grid parameters should be modelled in data view with the use of graph models. Bidding languages are also defined in data view. They describe the format and syntax of data that are used to formulate bids. There is great attention related to bidding languages in the case of combinatorial auctions. In the case of electricity, however, commodities are divisible and logic constraints take different shape compared to combinatorial auctions. Also, new technologies for distributed resources and emerging commodities, e.g. different types of Demand Side Response programs, need specific constraints and requirements to be taken into account during bidding. Therefore, a challenging area for OR research emerges in the development of expressive, concise bidding languages. Some pre- In product/performance view the focus is put on the final results of the process and the additional data used to measure the performance of the system. Any models, e.g. product trees, can be used to model data for commodity allocations, market prices and other results of system operations. For instance, a decision on pricing models, uniform or local prices, must be done in this view. Here, a designer also defines performance indicators, e.g. social welfare, system cost, trading volume or others measures selected as chosen indicators by the performance indicator tree model.
Static relations between functions are to be modelled in the function view. It must be emphasised that only static aspects are modelled here, e.g. inclusion or extension, without putting them on the time arrow. There are two crucial functions that must be addressed among others: the Winner Determination Problem and pricing. Mechanisms for electricity clusters need to take into account transmission network constraints. Such auction mechanisms under network constraints have been introduced in Kaleta (2012b). A specific Winner Determination Problem must be formulated from the space of vertex-oriented Winner Determination Problems (VWDP). The basic formulation of VWDP for a cluster in the form of a linear program can be defined as follows (more specifically, it is a security-constrained reversed VWDP-like problem): for buy offer m. The Power Transfer Distribution Factor PT D F ve is defined for a pair of node-lines and it denotes the MW change in the power flow at a given line when additional (relatively to some assumed flow) 1 MW is transferred from the given node of the network to the referenced node. For each transmission line e ∈ E, the power flow must be in a range from −P e to P e . Although the above model is well defined, there is a rich space for more side constraints that address the needs and technical requirements of distributed resources. Depending on the type of side constraints, the final version of VWDP unfortunately may become an NP-complete task. This is undesirable, since transparency and fairness are crucial in the case of auction mechanisms; therefore, heuristics cannot be applied. We provided a catalogue of side constraints along with their impact on problem complexity that creates a well-defined parameterised space of problems in Kaleta (2012b).
Pricing policy is the second crucial element at function view. Pricing procedure is usually described either as a set of rules or equations or as a result solving a specific linear program. For electricity clusters, we propose to apply a generalised class of locational pricing mechanisms (Kaleta 2016). In particular, one of the candidates for good pricing mechanism is the LP+ mechanism, which is proved to minimise the so-called Price of Fairness (Kaleta 2014).
All views meet at the process view, which is the only dynamic view. It organises the elements defined in other views into process. Flow charts, BPMN (Business Process Modelling Notation), eEPC (extended Event-driven Process Chain) and communication schemas are exemplary models that should be assigned to this view. The relations between various elements in different views emerge in the processes view. The very simplified model of market processes could present the market entities A 1 , . . . , A N sending signals with the use of defined bidding language and referring to commodities' structure at the beginning of a process. Then, a market mechanism consisting of well-defined functions is run and results in a form provided in product/performance view are produced. In the last part of the process, the results are sent back to authorised agents. Table 1 contains a list of different reference architectures or solutions that can be considered as a reference architecture. We defined five criteria for comparison: -mechanism space-narrow/wide; how extensive is a space of possible solution? -design support-yes/partially/no; is there any support for the designing process? -design tool-yes/partially/no; is there any tangible tool that could be used for designing, for instance some variants of flowcharts, diagrams etc.? -side constraints-yes/no; yes if given approach considers side constraints, otherwise no; -versatility-high/aver./low; how versatile (universal) is the approach?

Comparison to other reference architectures
Since there is no objective measure for the criteria, the table presents a subjective assessment of 16 approaches. Note that ARMS, in our opinion, is one of the best architectures. Its strong point is the very wide space of possible mechanisms, side constraints consideration, and the provision of tools and support for the designer. We assessed ARMS as the average versatile since it defines some frames in which the problem must fit. We believe, however, that it is a good trade-off between versatility and the ability to provide some modelling tools, and a comprehensive, consistent approach.

Decision support system
A decision-making process should follow the spiral model as it is envisioned in Fig. 5. We assume that due to constant development in many fields that touch upon this problem, it must be a continuous improvement process. Therefore, the spiral model suits well the needs of problem redefinition after acquiring some experience with the current setting. The process starts with problem definition along with goals and quality measures, as well as restrictions on the decision space. After that, a designing step takes place. A set of variant design variables is defined and then a selection of promising variable settings is performed. The next step consists of the analysis of pre-selected settings and the selection of the best solution according to the defined criteria. In the last step, the solution is implemented and monitored. When the quality of the current solution is too low, the next iteration of the spiral starts.
At different stages of the proposed spiral model, a designer may need some support. This can be offered by dedicated decisions of the market design support system (DSS). The DSS is built of a set of tools that allows for a holistic view of the mechanism design. The basic components of DSS are depicted in Fig. 6. Components of the DSS   are organised in four groups. The first group is the Model database. This group collects models that can be used by the designer during the process. The following models are provided in the DSS: -Agents' models: preferences and technical-these are the models of agents, including modelling their preferences, as well as their technical constraints; -Multi-agent simulation engine-this is a model of a simulation in a multi-agent environment with the use of the above agent models; -Scheduling models-optimisation models that can be used to set processes schedules on the market or markets; -Criteria models-models of each criterion, so they can be used to determine the values of criteria to assess the overall quality of a given solution; -Multi-criteria models for choosing design-models supporting the designer in choosing the solution from the set of Pareto-optimal solutions.
The second group is the Knowledge database. It represents information that is needed during the design process. The parameterisation component is a database of parameters together with their domains that shapes the decision space. The structural deconstruction of the problem allows for the parameterisation of solution space in each field of ARMS. As a result of the parameterisation setting, a specific solution may be created, e.g. specific optimisation models in the function perspective. Parameterisation specifies which decisions must be implemented and what are the potential options for these decisions. Based on these parameters, the designer knows what decisions must be made. There can be many decision spaces, for instance one space for each view. The second component in this group is a set of reference models. These can be perceived as predefined settings that can be always recalled by the designer. In addition to expanding scientific knowledge, reference models should be created for various specific applications or conditions.
In the third group, Algorithms, we find the following algorithms: -Multi-agent simulation-algorithms needed for running a multi-agent simulation; -Scheduling market processes-algorithms for solving a scheduling task defined in the first group of components; -Multi-criterion mechanism optimisation-algorithms corresponding to multicriterion models for the selection of one solution from the set of Pareto non-dominated solutions; -Calculation of criteria-algorithms for criteria calculation, based on models in the first group; -Game theory tools-a set of tools that allows for the better understanding of a given setting, for instance tools related to finding equilibrium.
The support system allows for setting the parameters against a set of well-defined measures. For this purpose, it contains models in the first group and algorithms in the third group. In particular, the DSS should be able to evaluate the solution by multi-agent simulations and game-theory concepts.
In the last group, which is the Graphical User Interface (GUI), different modelling tools exist, mainly in the form of graphs or flowchart models. For example, in the case of modelling the transmission network, an Object structure modeller could be used to support a user in drawing the network just with the drag&drop approach. When the designer works in organisation view, the Subject structure modeller can be used to draw the organisation hierarchy. The Process modeller is for drawing the processes schedule. In this case, however, some specialised models can be used, for example the Business Process Model and Notation (BPMN) or the extended Event-Driven Process Chain (eEPC).

Illustrative example
In this section, we discuss a process of exemplary cluster design, which is performed based on the ARMS reference architecture approach. For this purpose, we developed DSS which implements some subsets of components, while other components are implemented partially or not at all (see Fig. 6). It was enough, however, to use DSS effectively in order to test the concept. We mimic the process of decision making that the designer goes through based on the ARMS framework. At particular steps of the process, the designer uses specific components of the DSS we developed to arrange the design of market settings and then to test and assess the current setting. We assume that organisational structure, commodities' structure, and bidding language are very simple and static in the decision-making process, while the designer chooses the Winner Determination Problem through the parameterisation process, and then focuses on different pricing rules and assessment criteria.
As a data case, we use a real exemplary cluster illustrated in Fig. 7. We consider a system with 31 nodes, including 24 generators and loads at every node. The grid topology, as well as data related to demand, the technical constraints of generators, and costs are based on real data drawn from a particular area of the Polish electrical energy system.
The designer first defines the basic structures needed for problem formulation. There are sellers and buyers in the organisational structure. In commodity structure, there are two kinds of commodities: energy and primary reserves that are traded over a time period of 24 h with time granulation equal to 1 h. The bidding language is limited to step-wise price functions relative to the offered volume, either non-decreasing or non-increasing for selling and buying offers respectively.
In the process view, the designer models the main process as a BPMN model (see Fig. 8). The process, however, can also be visualised in dedicated view presenting recurrent processes on a two-time axis (see Fig. 9). The horizontal axis represents flowing time, while the vertical axis shows the time horizon to which the process refers. Parameters of network auction and pricing components are selected via the user interface depicted in Fig. 10. We assume that the decision maker chooses the Optimal Power Flow model with active power and PTDF factors used in constraints. Therefore, the security-constrained VWDP with MIN/MAX-VOLUME constraints is chosen as a Winner Determination Problem implementation (Kaleta 2012b).  The decision maker first chooses uniform pricing as a pricing component. Five quality measures are selected: economic surplus Q, network surplus Q N S , unbalanced value Q N B , fairness and market signal. Two kinds of simulations are available in the current implementation of our DSS. The static simulation assumes that agents are truthful, while dynamic simulation uses an advanced multi-agent system of learning agents [based on Kaleta et al. (2009)]. The results of static and multi-agent simulations according to the chosen criteria are presented in Table 2. The decision maker observes quite a large imbalance. In order to improve that, in the second step, he or she can easily set up another pricing rule, that is, the Locational Marginal Pricing. The decision maker once again runs the simulations and retrieves values for quality measures. Now, they can observe that the market is balanced, but there is a large network surplus. This means that significant part of social welfare remains unallocated to agents, signifying that the mechanism is not balanced and probably some regulation is needed to distribute the surplus outside of the market mechanism. Therefore, the decision maker decides to check the third model. He or she can quickly set the parameterisation of the pricing rule to so-called Local Pricing, L P+ (Kaleta 2016). The simulation component of DSS is used to obtain results for static and dynamic simulations and finally to obtain quality measures. In this setting, both network surplus Q N S and imbalance Q N B are moderate, so the solution seems to be a reasonable choice.
We need to emphasise that altering the settings (in this case study, this means mainly pricing models) is as simple as clicking and marking up elements of the required model. Thanks to that, the designer is able to go quickly through the models listed above, test The most significant values for decision-making process are highlighted in italics them, and collect quality data and insights. Two steps of parameterisation are visible in Fig. 10. In the first step, namely the Winner Determination Problem parameterisation, there is a screen with several radio buttons and checkboxes. On this screen, the designer may decide, for instance, which commodities will be available on the market, what model of power grid will be used, whether transmission losses will be included and so on. A similar screen is presented under mechanism parameterisation, which generally allows for choosing variants of pricing mechanisms. The final optimisation model, which is usually a unit commitment problem and pricing, is composed automatically based on the user's selection. The process described above is applied to data originating from a real power system. We simulated the interaction between the decision maker and our DSS presenting how the concept and the system can be used in the process of designing the market mechanism due to parameterisation and validation of the design mainly through agent-based simulations. The case study shows that DSS allows the decision maker to make fast and easy mechanism setting formulation and testing. The decision maker is, therefore, aided in the process of searching the complex space of possible mechanisms.

Summary
The sustainable development of electricity markets requires bottom-up initiatives that increase energy efficiency and support for distributed resources. These goals can be well implemented in the idea of energy clusters understood as local communities striving for electricity self-balancing. Effective cluster operations, however, require complex procedures for the exchange of goods, including multi-stage, multicommodity auction mechanisms. In this paper, we presented the concept of the ARMS reference architecture supporting the design of such mechanisms. It is based on a parametric and systemic approach. Its main advantage is the coverage of the problem in a holistic manner, and thanks to the structuring of the problem it is possible to build a support system for decision making in the field of market design. We presented a case study for design process supported by our exemplary implementation of DSS. A decision maker is supported by being guided through the design process, as well as by navigation through the design space due to its parameterisation. The clear benefit is that the designer can easily formulate an instance of market design and validate it against defined quality measures through agent-based simulations. This allows the decision maker to broaden their knowledge and experience concerning the settings of the market considered and verify test data sets quickly. To the best of our knowledge, there are no similar decision support systems considered in the literature. As the designing mechanism for energy clusters is an engineering task, we think that engineers engaged in this field can benefit from our structured, systematic approach. Since the number of energy clusters is increasing rapidly and further growth of distributed power markets is expected worldwide, we believe that the ARMS can gain even more importance in the near future for the electric power industry.
ARMS is a general concept that allows us to implement the exemplary DSS but it does not define it in detail. Every component of the proposed architecture of DSS could be further developed. In particular, a wider set of quality measures should be defined. It is worth noting that although for some of the sub-problems defined in the ARMS architecture, we define the space of possible solutions, there is still an unsatisfactory level of knowledge, and a significant OR contribution is expected in the coming years. The DSS we developed is limited in the scope of parameterisation to some subset of parameters, and attempts towards a full mechanism parameterisation according to known taxonomies should be undertaken. Also, the reference model database partially implemented in our DSS should be extended by collecting some meaningful settings, as we did for uniform pricing and Locational Marginal Pricing. Several components of the DSS are still not implemented since they need to be researched further. There are many unanswered questions remaining such as: what game theory tools would be useful in DSS, how to visualise the process and whole system settings for the user, how to design agent-based simulations that better model the real behaviour of agents, is it enough to model object and subject structure by oriented graphs, and many others. Finally, the most interesting research question is: once the whole designing process is defined and parameterised, is it possible to automate it? Until now, we have only delivered a framework for helping the decision maker in design space search and solution assessment. Is it possible to solve the multi-criterion problem formulated in Sect. 2 and find an optimal design, instead of simply supporting the user in searching the design space? All of these questions open up a great number of interesting challenges for the OR community, in particular related to bidding languages design, network winner determination problems and pricing mechanisms. We hope that ARMS will help in answering these in a systematic way.
Open Access This article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.