https://doi.org/10.31449/inf.v47i2.4291 Informatica 47 (2023) 159–172 159 A Hybrid Modelling Framework for E-Commerce Supply Chain Simulation: Complex Adaptive Systems Perspective Alejandro Nila Luévano 1 , Aida Huerta Barrientos 1 , Nicolás Kemper Valverde 2 1 Faculty of Engineering, National Autonomous University of Mexico, CDMX, México. 2 ICAT, National Autonomous University of Mexico, CDMX, México. E-mail: nilaalejandro@gmail.com, aida.huerta@comunidad.unam.mx, kemper@unam.mx Keywords: hybrid simulation, complex adaptative system hybrid simulation, supply chain hybrid simulation Received: July 14, 2022 E-commerce emerged as consequence of electronic transactions developed on 60’s, but real boom was observed during 90’s along with Internet common use. Complexity sciences approach has several advantages for e-Commerce study. This study addresses the need for modelling and simulation (M&S) of e-commerce supply chain as complex adaptive system (CAS) but with a novel application in the field of hybrid M&S, integrating top-down and bottom-up approaches using synthetic microanalysis, to perform simulation experiments to find natural emergent properties at certain levels as result of the interactions between the constituent parts, so far lacking in the scientific literature. Although previous researchers conducted simulation studies into the e-commerce supply chain as CAS, they all focused on applying agent-based simulation approach only. First, we conduct the literature review on main features of CAS, M&S of CAS as well as the e-commerce supply chain conceptualized as CAS and their modelling and simulation evolution. Second, we present a novel hybrid M&S methodology for integrating top-down and bottom-up approaches using synthetic microanalysis. Then, we applied the methodology to an omnichannel retail business case study. Finally, our concluding remark and future work are drawn. The novel methodology proved to be useful for anticipate business decisions on e-commerce supply chain. Povzetek: Ta študija s pomočjo hibridne metodologije obravnava potrebo po modeliranju in simulaciji e- poslovne dobavne verige kot kompleksnega prilagodljivega sistema. 1 Introduction Seminal contributions have been made on Complex Adaptive Systems (CAS) by pioneer researchers as Buckley [1], Holland [2] and Gell-Mann [3]. CAS term was first introduced by Walter Buckley in 1968 to describe a system whose elements or components are directly or indirectly related in a causal network, such that at least some of the components are related to others at any one time, the interrelations may be mutual or unidirectional, linear, non-linear or intermittent, and varying in degrees of causal efficacy or priority. In [4] three characteristics of CAS are proposed: evolution, aggregate behavior, and anticipation. After that, in [5] one extra characteristic of CAS is added: hierarchical arrangements of boundaries and signals. It is important to note that CAS form and use internal models to anticipate the future, basing current actions on expected outcomes, in fact it is the attribute that distinguishes CAS from other kinds of complex systems and makes the emergent behavior of CAS intricate and difficult to understand [6]. Previous studies presented on [7, 8] have almost exclusively focused on one M&S approach to study CAS. However, hybrid modelling which extends the M&S discipline by combining research approaches, methods, techniques, and tools from across disciplines [9] to one or more stages of a simulation study, still is limited. In the literature review we found contributions only in the domain of defense [11]. On the other hand, e-commerce emerged as a consequence of electronic transactions developed on 60’s, but real boom was observed during 90’s along with Internet common use. Previously, catalogue sales already offered products and services on home delivery, but every transaction must be done by a presential visit or at least using a printed document. Complexity sciences approach has several advantages for e-commerce study, beside the understanding of patterns and behavior of main actors from the point of view of companies, it is also useful for customer understanding and specific patterns that will follow to choose their products or services offered online. Supply chain has been conceptualized as a CAS by many authors [11 – 17]. The traditional tools used in the study of the supply chain as CAS are the following: System Dynamics (SD), Agent Based Modelling Simulation (ABMS), Dynamic Systems Theory, Observation Data-Based Models, Dynamic Networks, Ordinary Differential equations (ODE), Difference equations and Partial Differential equations (PDE), Cellular Automata, Evolutionary Game Theory (EGT), and Fractional Calculus. In the field of simulation, the implementation of models based on top-down approach, which is used to provide holistic perspective by synthetic microanalysis, the SD is preferred. While implementing models based on bottom-up approach, that is a deductive 160 Informatica 47 (2023) 159–172 A. Nila et al. perspective, the Discrete-Event Simulation (DES) and ABMS. Combining two or more of the following methods: SD, DES, and ABMS, has experienced near-exponential growth in popularity in past two decades [18]. In the domain of supply chain, but not from the CAS perspective, we found contributions by [19, 20] using two or more simulation approaches. More recently, in [21] DES and ABMS are combined with heuristics to govern train movements destination selection, incorporating an ensemble of simulation runs. In [22] SD, DES and ABMS are applied to an aerospace manufacturer’s real case to assess the sustainability performance of alternative supply chain. This study addresses the need for modelling and simulation of e-commerce supply chain as CAS but with a novel application in the field of hybrid M&S, integrating top-down and bottom-up approaches using synthetic microanalysis, to perform simulation experiments to find natural emergent properties at certain levels as result of the interactions between the constituent parts, so far lacking in the scientific literature. Although previous researchers conducted simulation studies into the e-commerce supply chain as CAS, they all focused on applying agent-based simulation approach only. Supply chain problem has been addressed with several approaches, that’s why in [15] and [17] stands out the need for novel methods that includes tools based on complex systems approach. The dynamic of the market due to growth in internet use and changes of purchasing habits have led the supply chain professionals to find better methods. According to [32] global e- commerce went from 15% of total retail sales in 2019 to 21% and now is estimated 22% so to be focused on interactions, dynamics and emergent patterns of the systems could bring us better solutions in a different point of view. Static supply network designs can help with localization problems but to solve everyday companies’ issues is getting more complex and in consequence more specialized to solve. The rest of the paper is organized as follows: Section 2 describes the literature review on main features of CAS, M&S of CAS as well as the e-commerce supply chain conceptualized as CAS. Section 3 present a novel hybrid M&S methodology for integrating top-down and bottom- up approaches using synthetic microanalysis, of an e- commerce supply chain to perform simulation experiments to find natural emergent properties at certain levels, as result of the interactions between the constituent parts. Section 4 presents an omnichannel retail business case study. Concluding remark and future work are presented in Section 5. Diagram 1: Paper organization 2 Literature review 2.1 Complex adaptive systems Complex adaptive systems (CAS) term was first introduced by Walter Buckley in 1968. In his publication named Society as a complex adaptative system. Buckley [1] defined a system in general as a complex of elements or components directly or indirectly related in a causal network, such that at least some of the components are related to some others at any one time, the interrelations may be mutual or unidirectional, linear, non-linear, and varying in degrees of causal efficacy or priority. As Buckley [1] added, persistence or continuity of an adaptive system may require, as a necessary condition, change in its structure, the degree of change being a complex function of the internal state of the system, the state of its relevant environment, and the nature of the interchange between the two. From the cybernetic point of view [23], CAS are complex effectors organized and self-regulated to subtract themselves or one of their effects, within certain limits, from contingency, from increased entropy, or from both [24]. The cybernetic perspective of control or self-regulation of adaptive systems emphasizes the crucial role of deviation, seen in both negative and positive aspects: on the negative side, certain kinds of deviations of aspects of the system from its given structural state may be seen as negative feedback, while on the positive side, it is necessary the deviation or more generally, variety – in providing a pool of potential new transformations of process or structure that the adaptive systems might adopt in responding to goal- mismatch [1]. Another pioneer of CAS research was Prof. John Henry Holland whose seminal work on adaptation in natural and artificial systems [2] leading to the creation of genetic algorithms and eventually the fields of evolutionary computation [4] and learning classifier systems [25]. The models to understand CAS consider the rule-based structure that lets the evolutionary procedures that enable the system to adapt to its surroundings. As noted by [6], most rules can be parsed into simple condition/action rules: IF [condition true] then execute [action] On the other hand, the following are recognized in [3] as the general characteristics of a CAS, mainly related to data and information: a) Its experience can be thought of as a set of input and output data, with the inputs often including system behavior and the outputs often including effects on the system. b) The system identifies perceived regularities of certain kinds on the experience, even though sometimes regularities of those kinds are random features misidentified as regularities. A Hybrid Modelling Framework for E-Commerce Supply Chain… Informatica 47 (2023) 159–172 161 c) The perceived regularities are compressed into schema. Each schema provides, in its own way, some combination of description, prediction, and prescriptions for action. d) The results obtained by a schema in the real world then feedback to affect its standing with respect to the other schemata with which it is in competition. 2.2 Modelling and simulation of CAS In recent decades, CAS are at the heart of important contemporary problems, so the research methods and tools need to be modified with an emphasis on the role of computer-based models to increase our understanding of CAS [26]. In this direction, the purpose of modelling and simulation (M&S) of CAS is to find the macro and micro mechanisms behind the evolution, aggregate behavior, anticipation and hierarchical arrangements of boundaries and signals of CAS. The top-down approach is used to provide holistic perspective by synthetic microanalysis, in which experiments are performed to find natural emergent properties and delineate macroscopic phenomena with systemic concepts [27]. Once the system structures have been observed based on top-down perspective and the bottom has been reached, we need to analyze them in terms of the laws on their constituent parts combined with suitable idealization and approximation at the micro level, at this point, the bottom-up approach is a deductive perspective, in which experiments are performed to find natural emergent properties at certain levels as a result of the interactions between the constituent parts [27]. 2.3 E-commerce supply chain conceptualized as CAS In the literature, supply chain has been conceptualized as a CAS by many authors [11, 15, 17, 28-36]. In this direction, supply chain is constituted by large number of agents that interact in a non-linear way, could evolve, learn, and be resilient to their environment. Also, its structure and collaboration mechanism evolve over time [14]. Considering the cybernetics point of view, Figure 1 shows the receptors or sensors, the processor or homeostatic controller and the effectors of a supply chain conceptualized as CAS. Following the main characteristics of CAS, the constituent parts of a supply chain could be facilities, people, equipment, and communications involved in a supply chain or logistics network. Supply chain networks presents nonlinear behavior on products distribution, where the number of vehicles is not proportional to the number of products because of product volume, weight and even restrictions for destination traveling, that’s why behavior would not be modeled with a first order equation, without assuming or forgetting essential system properties. Figure 1: Supply chain conceptualized as CAS. On supply chain management and in business in general is normal to concentrate investment only in certain separated areas and outcome it is that constituent’s effort does not contribute adequately on system desired results. Other important property to address is that complex systems are not controlled at a central level. Most of the time, system constituents do only have communication with nearest or adjacent peers, this communication and interactions trigger emergent behavior at system level. Supply chain systems and logistics systems had been trying for years to create a single communication and management system using ERP (enterprise resource planning), this central software application have proved to help on complexity reduction, but interaction and decisions made by single constituents are always present unleashing emerging patterns that must be taken into consideration. That is why supply chain elements or agents that compose supply chain would not always check every possibility to make every decision. In a better way, every agent evaluates the result of certain action and the repeat successful one with the objective to evolve or improve its complex system. In order to identify the recent trends in the literature on the application of the CAS approach in the study of e- commerce supply chain, a bibliometric analysis was carried out using the VOSviewer TM software, which is a software tool focused on the distance-based visualization of bibliometric networks. In the visualizations provided by VOSviewer TM software, the distance between two nodes indicates the relatedness of the nodes [38]. We search on SCOPUS database the relevant papers with keywords e-commerce AND complex adaptive systems. From the results, we observed that in general, CAS approach is related to supply chain and e-commerce by their modeling tools or analysis algorithms. Figure 2 shows the interrelations found in the literature of e- commerce and CAS and agent-based modelling. Figure 3 shows the interrelations between supply chain management and e-commerce. These two subjects are always connected because of their symbiotic nature but it can be highlighted that complexity properties like self- organization along with complexity solutions including evolution models come in to light. 162 Informatica 47 (2023) 159–172 A. Nila et al. Figure 2: VOSviewer TM software visualization of the keywords network. Figure 3: VOSviewer TM software visualization of the keywords network, showing the interactions between e-commerce and supply chain management. Figure 4 indicates that in recent years CAS approach on e-commerce supply chain using agent-based models is a trend to confront everyday challenges of modeling and simulating e-commerce process. The topic supply chain management is strongly related to e-commerce of manufacturing systems, agent-based modelling also is used and selected as a tool to continue further investigation. Additionally, Figure 5 demonstrate that interdisciplinary is also included in this concept for multiple solutions. Figure 4: VOSviewer TM software visualization of the keywords network, showing the interactions among agent-based modelling, e-commerce and complex adaptive systems. Figure 5: VOSviewer TM software visualization of the keywords network, showing the interactions among agent-based modelling, supply chain complexity, e- commerce and supply chain management. 2.4 Modelling and simulation (M&S) of supply chain as CAS Supply chain problems have been addressed and confronted by different methods, but we put special attention on recognizing enough ones who helped us to maintain. The following tools act as an alternative to deterministic optimization static models to modelling and simulation of supply chain as CAS [15]: • Simulation (SD and ABMS) • Dynamic systems theory • Observation data-based models • Dynamic networks There are other methods for logistics systems modelling using a complex system approach [35], analytic method proposed by [38], game theory presented in the work of [39], dynamic systems proposed in the work of [40]. On the same way, managers look for new ideas for developing collaborated and synchronized network A Hybrid Modelling Framework for E-Commerce Supply Chain… Informatica 47 (2023) 159–172 163 structures, these networks must adapt to flexible and dynamic environments [14]. 3 A novel hybrid M&S methodology based on synthetic microanalysis In this section, we present a novel methodology for integrating top-down and bottom-up approaches using synthetic microanalysis, of an e-commerce supply chain to perform simulation experiments to find natural emergent properties at certain levels as result of the interactions between the constituent parts. The conceptual modeling and communication hybrid simulation phases are based on [41] using complexity sciences tools. Our main contribution is to adapt recognized knowledge for a complex adaptative e-commerce supply chain. On every phase, advantages of hybrid M&S and CAS approach are described and highlighted. 3.1 Phase 1: conceptual modelling On this phase, since the hybrid simulation models proposed for supply chain were conceptualized as a CAS, the main objective will be to find emerging patterns due to interactions among the components of the system. Assuming from the beginning that supply chain can be analyzed as a CAS, we took advantage of an additional complexity science theorical framework proposed by [27], but on CAS, detectors and effectors are also taken into consideration along with system interactions. Same as typical system modelling, inputs are considered to obtain certain outputs. Feedback adaptative learning loop and a system learning memory is also included. The conceptual diagram of CAS adapted from [42] is shown on Figure 6. Unlike black box system diagrams, interaction rules play a relevant role on CAS modelling, that’s why we looked for a software with enough capabilities. After the analysis of software simulation used to modelling and simulation of CAS, we selected Anylogic TM software. Anylogic TM is one of the simulation leading platforms found in the market, native Anylogic TM software’s features enables users to integrate DES, ABMS and SD on a single integrated model that can dynamically read and write data to spreadsheets or databases during a simulation run and is capable to develop spatially explicit models integrating GIS functionality [43]. Then, the possibility to build hybrid simulation models on Anylogic TM is not only possible, but it is also many times implied on software’s applications. In the e-commerce supply chain case, we took advantage of the two mentioned features: DES simulations, to incorporate time processes and indoor facilities behavior, and ABMS, for interactions and flows between facilities, including transportation network and vehicles. To give a context of what the model includes, CAS components of our proposed modelling are described below: Input is composed by typical elements incorporated on e-commerce supply chain analysis and modelling: a) Historical or forecasted demand, taken from both Enterprise Resource Systems (ERP) databases, or any other business information system. Different scenarios might be downloaded and configurated depending on required business answers. b) Objective service level, included on model data base, or stored on parameters to compare real life indicators. c) Product characteristics, tagged on every demand line of data base, useful information to interact on discrete indoor processes, or to indicate way of traveling along agent-based network paths. d) Number of facilities and location, shown on a Geographic Information System (GIS). e) Processing and traveling time, based on productivity and resources availability. Figure 6: Conceptual CAS diagram adapted for this methodology, adapted from McElroy (2000). Detectors a) The counter variables. b) The statistic Blocks. c) Time DataSet blocks and plots. d) Time histogram blocks and plots effectors. Effectors a) Agent indoor facilities with DES processes. b) Agent transportation network. Output a) End to end product system life. b) Specific time (process, travel, waiting) per agents or facility. c) Backlog indicators. 3.2 Phase 2: simulation modelling interaction rules In the simulation models, interaction rules are governed by programmed business rules and a predesigned a supply network. Every agent is created based on historical demand, from a source block and then travel to different facilities. On every facility, demand agents could change their attributes or lifetime due to DES processes, and then wait for a vehicle that match the next step or destination. Hybrid simulation models are integrated by agents as following: 164 Informatica 47 (2023) 159–172 A. Nila et al. Main agent It hosts every other agent on a GIS, it has also the duty to fill every other agent´s attributes at the start of the simulation. Here, every demand agent is created and then canceled after traveling along supply chain system. Demand agent It travels along the system following business rules. It is created with attributes or parameters that will be useful for the software to indicate logistics paths using tags to accomplish needed processes. Some support parameters are incorporated to accumulate attributes due to different situations. Facility agent Every facility has two purposes: a) Interaction with other agents. b) Hosting supply chain processes. Depending on the complexity of operations, these processes could be as simple as a delay of time followed by a queue, or even a DES complicated simulation that support resources and schedules according business capacity communicating with other agent interactions. Depending on business supply chain, different kinds of facilities could be modelled, in our case studies, facilities were commonly stores, warehouses and x-docks but this is not limited. Depending on simulation designed necessities, interactions with factories or suppliers might be taken also into consideration. Transportation agent Vehicles are created also at the beginning of the simulation based on model data base. This option gives you the opportunity to define not only origin and destination of vehicle, parameters of capacity, travel time and schedule can be also included. To obtain specific output, agent-based simulation gave the chance to communicate every state of every vehicle to other agents and then decide when to load or unload products at the start a trip fulfilling business objectives. Vehicles do not only travel based on a defined time on data base, but also could be visible on Main GIS map. GIS map road distance information was useful to simulate time travel and gives to the user a perspective of how fleet is moving along the run. Agent waiting areas Two waiting areas, one for products waiting for a vehicle to arrive in a facility and then travel to a specific destination, and inside vehicle agents, where products remain in loaded, unloaded or in transit status between a stop or travel destination. Messenger agents Created at a specific time recorded in data base, their purpose is to change values on process parameters or sending messages to some agent following programmed interactions. For example, on facilities capacity is adjusted whether on productivity or on number of resources. Even when processes or individual programming could be very simple, the combination of several number of agents that are born at the beginning of simulation along with interactions during it, result in complex behavior. The relevance of interactions and understanding of results was the next step of our proposal. 3.3 Phase 3: model communication Once DES processes agents are created, communication phase includes programming to link variables, identify interactions and then to execute model scenarios. Here is where we identified the most relevant advantage of analyzing and modelling supply chain with a complex adaptative system approach. To be aware of dynamics understanding, and analyze outputs as emerging system patterns, upgraded the results of our methodology. On the same way, synthetic micro analysis gave us the opportunity to understand the most micro level interactions that drive to model better business decisions. Linking variables and identified interactions Variables and interactions are linked mainly by demand product flows. These product flows are often a connection between DES processes and using “enters” or “exits” between facilities or vehicles living on a GIS MAP. Natural supply chain designed flows are followed to simulate real life behavior. Database driven decisions In real life and in virtual simulation models, products travel along supply chain, according to business defined rules. In real life, these decisions are chosen by systems, or human beings, but in our models, they are previously stored on a data base. Whether the product must accomplish certain process or to travel to another facility, a database query is executed to simulate real life decisions and interactions. The following diagram explains how demand agents flow through the simulation model. Figure 7: Simulation flow diagram Source. a) First, the demand is generated, where a source block is configurated with historical or forecasted demand. By using real data, dynamic and nonlinear behavior is entered into the system. Demand agents are created with input parameters that contain characteristics of at least origin and destination previously stored on database, these parameters are also used as tags for product identification and A Hybrid Modelling Framework for E-Commerce Supply Chain… Informatica 47 (2023) 159–172 165 decisions useful to consider entering or exiting processes between facilities or vehicles. During simulation run, counting variables and datasets are collected and refreshed at a specific time to understand input demand behavior. b) Second, the demand is communicated to the facilities depending on product requirements. Time on facility, depends on utilization of machines or human resources mayorly. Statistics of every process are collected and plot to understand where capacity is limited and where the agents spend more time. Facilities could be very simple, or also enabled with several complicated processes, for example Figure 8 shows a GIS map containing several facilities that host simple scheduled driven by resources DES processes. Capacity and resources could be static or dynamic, if it is needed, at any time of simulation run, a messenger agent could enter the facility to update conditions. The result of interactions and behavior of these changes, then is observed as emergent patterns of supply chain behavior. c) Third, the waiting processes of facilities and vehicles are modelled. Their purpose is not only to host a staying process for products and to accumulate time between entering a vehicle, but these processes also allow communication between facilities and vehicle agents. Communication process on simulation could be complicated, the problem is to keep products on a specific destination process until a vehicle has arrived ready to load or unload products. To accomplish this task, an “id” of arrived vehicles is kept on a data collection array and then products are allowed to enter mentioned vehicle that share the next agent destination and at the same time, ensuring choosing the right transportation type with enough left capacity. d) Finally, products travel from one to another facility or destination. According to waiting processes, every product enters on a specific vehicle depending on the destination. We named this DES processes vehicle compartments. On these agents, processes of loading and waiting inside a transportation unit are simulated. Then, it is possible to measure used capacity, and decide if the vehicle is ready to go using two criteria. The first criteria to start a trip is leaded by programmed schedules fed by departure parameters. Second criteria, to verify if transportation agent is enough loaded according to business rules and physical capacity. Vehicles are programmed as independent agents, so they born with parameters including origin and destination, together with variables recorded in accordance to departure, travel time and capacity limitations. On every step, outputs are programmed considering special attention on simulation time and different products behavior. Normally output values are shown in dynamic plots during simulation. Now that CAS behavior is programmed on simulation software, adaptative learning loop depends on user experience and iterative what-if scenarios. Every iteration stored output on computer will conform our system memory, and retro alimentation will be sustained proposing different agent network paths or capacity. Model execution and data exchange Once model and interactions are already programmed execution is very simple. After verifying that every parameter and variable is loaded on model database, next step is to execute the simulation and wait for the result. After every iteration recorded statistics and indicator calculations, are exported to a consolidated Microsoft Excel spreadsheet. The relevance of this step is not only to obtain results and record them, but objective is also to identify the influence of every interaction at micro level that are shown at macro level as emergent patterns of the complex adaptative system, in our case these emergent patterns coincide with supply chain performance indicators. Figure 8: GIS Map containing agents, DES processes and plot outputs. Then, improvement of supply chain system is implied on the influence of products flows, facilities processes and vehicles interacting with each other. Talking about our supply chain models, every facility will exchange data with every vehicle not only about the status and capacity, but it will also share information about demand dynamic behavior. The result will impact utilization of resources 166 Informatica 47 (2023) 159–172 A. Nila et al. and bottlenecks at micro level, and the result of end-to-end measured time deliver, at macro level. Evaluation of outputs The simulation software offers several options to obtain results and outputs. Statistics and datasets blocks, along with time and histogram plots were successful to understand complex behavior and led us to different scenarios. From the beginning of the run, we take information from data base, placing historical or forecasted demand. The first output is therefore the behavior of demand, where we can understand seasonality and behavior at macro level. These plots could be included by product or by any other interesting demand identification. The most common, apart from products, are related to logistics origin-destination area and required service. Then, at main agent it is possible to observe demand graphics and interesting statistics form its behavior. During simulation runs, demand behavior is compared with accumulated capacity and accumulated statistics help us to understand system performance. Scheduled resources work shifts utilization is also measured to understand everyday dynamics. Traditional analysis, assuming a typical black box system, will lead us to run several scenarios looking for answers only at macro level, but CAS approach along with synthetic micro analysis tells us that these answers at macro level must be a result of interactions at micro ones. Then, even when performance is enough for accomplishing demand requirements at macro level, interactions at micro mechanisms should be understood to get a better result. On supply chain, installed capacity relates directly to investments and in many times, it is difficult to balance the right place and more difficult to do it at the right time, resulting on money wasting. In our simulation projects, hybrid simulation opens the opportunity to integrate DES processes into agents, and to measure their performance at micro level. Figure 9: Example of simulation input analysis. The performance of every agent is collected and then analyzed to understand impact on the whole system. One of the top interests of our simulations is service time, which depends in part on the number of resources and their productivity related to real processes, that’s why backlog is measured along every facility to identify bottle necks and prove different scenarios. We measure time on a facility, but also the time between every process. By recording on every hour, the number of agents inside simulation queues, we obtained an average indicator of backlog and the period of recovery. By comparing backlog data with capacity bottlenecks, facility capability can be understood in two dimensions, first to dimension about space capacity and second to ponder if recovery time is according to business service requirements. Figure 11 shows backlog behavior and time recovery due to limited wok shift resources capacity. Simulation results gave us the opportunity to observe and measure impact of limited capacity and its dynamics depending on demand flows. Remembering that the supply chain system could be integrated by several facilities and every piece of data is analyzed after exporting information an integrated Microsoft Excel Spread Sheet. The simulation results are organized by flow volume, average backlog, and time of recovery to identify the most relevant interactions. By collecting the accumulated end to end time of every product on main agent and understanding its causes due to micro level interactions, what-if mentioned scenarios are proposed changing parameters. Methodology enables to understand the limitations of the designed supply chain and apply better options to reach business objectives, without thinking about major investments. Figure 10: Example of simulation outputs. A Hybrid Modelling Framework for E-Commerce Supply Chain… Informatica 47 (2023) 159–172 167 4 An omnichannel retail business case study This section is focused on simulation challenges of an omnichannel retail business case study. This section will be useful for the reader to recognize what is necessary to collect, understand and program to deal with a real-life problem. Omnichannel retail business Omnichannel problem includes companies who born operating brick and mortar stores, where consumers physically visit the place, and purchase their products. Due to customer behavior and growth in Internet use, companies also started an important presence on e- commerce operations. In recent times, e-commerce marketplaces are also opening physical stores, unless this is not ordinary. Because of their nature, both bricks to clicks and clicks to bricks companies, offer a hybrid way of delivery and shopping experience. Figure 11: Brick to clicks and clicks to bricks ways. 4.1 Phase 1: conceptual modelling In the omnichannel case study, customers are capable to acquire products in different ways depending on their necessities listed below. a) On store traditional buying, were the customer walk around the place to acquire their products. b) Online buying, where customer acquires products by the company web page. c) A combination of previous, where customer could choose to pick up products on store if they are available. Availability could be nearby or foreign, and in both cases, customers could buy and receive product on store or direct to their location. Depending on customer needs and location there are also different ways of home delivery. a) The customer is available to receive product in a period of certain hours and the chosen product is available on a store or warehouse nearby. b) The product could be delivered by the company x- dock in the same city. c) The product needs to follow a network path between stores and x-docks to find its destination. d) At an any network node, the product is delivered to a third-party logistics supplier. 4.2 Phase 2: simulation modelling All of the options indicated before were programed on a hybrid simulation model using historical data as an input looking for improvements by running several capacity scenarios. Before starting to describe simulation inputs and outputs, it is important to remember the relevance and advantages of our methodology, that not only implies to program a hybrid model. It is also important to recognize how these steps can be useful to describe a real life complex adaptative e-commerce supply chain system. CAS are recognized mainly by their nonlinear behavior and a large number or constituents interacting at the same time. In the case study, the constituents were modeled as agents and their interactions using DES processes, because of their nature, agents could communicate with each other increasing complexity of the system. Then stores, x-docks, warehouse and transport assets became the agents and at the same time they were incorporated with historical real measured capacity and productivity on a GIS map location. Input of real demand data, followed by programmed agent business rules, resulted on hybrid simulation outputs emerging patters. Store agents include DES processes for shelf product picking, customer in-store pick up area, product packaging, for delivery or transfer process, and last a decision block to send product direct to customer nearby or foreign employing a third-party supplier. Decision depends on the tag or parameter previously input on database. Products that must be delivered to another store by a company x-dock, are sent to the waiting area agent, where they will stay until a transportation asset has arrived. At store microlevel, relevant indicators are saved on statistics blocks, the most important were sum of products, queues backlog, resources utilization and finally whole time on store. With the analysis of this information, processes improvements were simulated and implemented, for example, by running different scenarios changing number of human resources working with an average productivity, benefits of service time were found at micro level. We validated those decisions about incrementing crew or working hours on certain season or peak of demand, could be taken based on model runs. With the aid of messenger agents, capacity or parameters were changed at any model time looking for better results. Results were not only useful at micro store level, total time macro level indicators were also measured and understood to validate business objectives. 168 Informatica 47 (2023) 159–172 A. Nila et al. Figure 12: Simulation model of omnichannel case study. 4.3 Phase 3: model communication Stores face many other challenges on real operations, main is that they are not designed to operate an outbound flow other than what is taken form the shelves aisles by customers. Taking advantage of agent’s communication, schedules about receiving product from storage warehouses and sending product direct to customers or x- dock were also simulated. On store waiting area agent, products are hold until the scheduled transport arrive and take them to the next step of simulation. Same as in reality, transportation arrive to the store and report its arrival, in our simulation model, transportation agent communicates an ID to the waiting area by printing it in a collection array. With the help of knowing ID vehicle, the decision of loading product can be made in two ways, the first is to be sure about vehicle left space capacity and the second is if destination is in conditions to receive more products. That’s how on this stage, communication between transport vehicles and facilities is emulated. In real system´s operations, it is common to hear about different kind of communications to arrange these operations, like phone calls and email messages, the result is a complex behavior induced by demand who result on micro level findings and in consequence supply chain indicators. Time on waiting area was an important indicator to be aware, but also its causes, especially the contained queue number of products waiting to be loaded on a transportation vehicle. In certain circumstances, omnichannel problem delivery could be only about leaving the store, because it’s common to use third party delivering suppliers to travel along countries and reach the last mile until customer receive their product. It could be even simpler when customers have the chance to pick their products on store, but store operations could be complex to study depending on the size of company, city or country. That’s why in our study agent facilities were placed on a main agent that includes a GIS map, allowing users to incorporate several numbers of locations. For the reasons listed below we found GIS map useful in an e-commerce supply chain hybrid simulation: a) Allows users to have a first look of their geographic coverage and number of nearby facilities. Being aware of where your facilities are located, can lead you to understand if they are placed in a correct way, even when this analysis might be inconclusive without an analytic exhaustive one, it is one of the best places to start. b) GIS maps contain information not only about localization, in our case, Anylogic TM provides a native OpenStreetmap service, who enables vehicles to follow real-time downloaded road distances observed during simulation. Combination of localization and observation of vehicles on real time, can also be considered as an emergent pattern of the system seen at macro level. Finally, GIS map was also useful to explain results and interactions between facilities to stakeholders. Before analyzing products after leaving the store, it is important to stop and interpretate what is causing bottlenecks and traduce it into real life strategies. Increasing the number of human resources might be a solution along with work hours variation, but also to compare productivity and facility space and lack of equipment. Once store variables are understood it is time for analyzing transportation logistics. There were different kind of vehicles depending on their vocation in real life on simulation model. Large capacity vehicles to deliver product from inventory warehouses to stores in synergy with omnichannel product, and local small capacity vehicles for moving product between stores to and from their local assigned x- dock. Distance and volume capacity during trip, was stored on statistics blocks for further analysis. For large capacity vehicles, every day scheduled departure time is programmed along with an average speed to simulate trips using real GIS map road distances. Then, estimated time of arrival of products can be calculated. In the case of small capacity products, delivery and collect milk run circuits were programed. At this step of simulation, we already accumulate the store and from store transportation time as a part of the total time of delivery, the rest obey to local x-dock, foreign x-dock, and their vehicle connections. Once products enter x-dock facilities, programmed decisions lead them direct to customer delivery or to travel to another facility, processing times of resources and productivity are also stored and measured along with on queues agent number content. From this point products can visit more than one x-dock and destination stores to finally reach their ending point. On last destination time along whole system is recorded and analyzed using a histogram plot. Something implied on this kind of problem simulation solution is to manage a great amount of agent interactions at the same time, this characteristic is one of the best reasons to choose this method when a supply chain is analyzed. A Hybrid Modelling Framework for E-Commerce Supply Chain… Informatica 47 (2023) 159–172 169 Figure 13: GIS Map containing agents, DES processes and plot outputs of omnichannel case study. On this kind of modelling, number of facilities and assets is only limited on computer processing time, then by adding more database lines supply chain could be simulated at any scale without extra programming time. The result of thousands of products traveling between dozens of facilities and transportation assets interacting with each other is what finally emerge at macro level of the system. End to end time results of every interaction was also divided on categories and subcategories interesting for the business. • Local deliveries including the ones from store and stores in the same city • Foreign deliveries Results show that even when facilities operate at their maximum capacity, accumulated time combinations (origin-destiny-type of service) delivery 100% on time objectives could be impossible to accomplish. Foreign times and accumulation on demand on particular season, are the main limitations of the supply chain system. Maximum limits of the system were not the only conclusion, more important was to identify offered services and estimated volume encapsulating the problem on certain geographic areas and then to decide the best impact business major investments. With the help of this novel methodology companies could simulate different scenarios to chose a better number of resources in a certain season and decide a better scenario. In our case study a retail company the chance to reduce the gap between on time deliveries in at least 3% by including third party suppliers on peak season. Unlike traditional modelling of e-commerce supply chain where data is collected and then processed using a static linear programming model, hybrid simulation modelling assuming a CAS behavior, opens the door for a better system understanding and numberless real life dynamic scenarios. The understanding of microlevel interactions and their impact at macrolevel shown as emergent performance patters, can lead business to better strategies, and to predict behavior of their decisions. In early times, size of e-commerce supply chains has caused to operate and plan in a reductionist way, assuming that, solving the problem at micro level could reflect a deterministic upgrade on business macro indicators. Simulation modelling gives not only the whys, but also gives answers when might be the correct time to take important business decisions. Benefits for e-commerce supply chain could be various, but here we resume the ones what we stand out the most: a) Be aware of the limitations of your supply chain design before commit to business objectives. b) Size impact of increasing capacity at facilities or transportation at macro level. c) Understand not only what a better solution is, but also when might be a better moment to implement it. d) Scale your analysis by running simulations of all your facilities at the same time. 5 Conclusions The change in consumer behavior has caused supply chain professionals to face more complicated challenges. In the search of alternatives to understand and manage supply chain, the experience of stakeholders has been a great help for businesses. Even when experienced managers had looked for better ways to maintain service, it is difficult to find tools and frameworks to take advantage and test before implement. By understanding e- commerce supply chain as a CAS, multiples possibilities and solutions opens. CAS conceptualization facilitates to look for solutions about non-linear demand and agent interactions, instead of trying to implement average static solutions. After being awake of what CAS understanding could do for your business, the second step will be to find somewhere to experiment and prove interaction hypothesis. Simulation has proven to be a good platform to test nonlinear behavior and try to anticipate what may happen. Is very common to find discrete event simulation on e-commerce supply chain but normally model focusses on specific processes. By incorporating agent-based modelling, a tool born for complex system understanding, hybrid modelling enhances supply chain solutions proposals. On real life case studies, we achieved to point 170 Informatica 47 (2023) 159–172 A. Nila et al. out benefits of hybrid simulation, first by demonstrating that supply chain behavior can be imitated on a computer software without numberless spreadsheets, and second taking advantage of real-life e-commerce supply chain system agents (operations human resources), who now know they are capable to prove alternatives reducing the risk of wasting inversions or time testing on the go. Future work will address not only experienced bases solution but automated taking advantage of intelligent algorithms adapted for CAS and e-commerce supply chain, the objective will to find better business answers in less time. References [1] W. Buckley. Society as Complex Adaptive System, in W. Buckley (Ed.), Modern Systems Research for the behavioral Scientist. Chicago, IL: Publishing Company, 1968. [2] J. H. Holland. Outline for a logical theory of adaptive systems, J ACM, vol. 9, no. 3, pp. 297–314, 1962. [3] M. Gell-Mann. The Quark and the Jaguar. New York: W. H. Freeman, 1994. [4] J. H. Holland. Hidden order: How adaptation builds complexity. New York: Addison-Wesley, 1995. [5] J. H. Holland. Signals and boundaries: building blocks for complex adaptive systems. Cambridge Mass: The MIT Press, 2012. [6] J. H. Holland. Complex adaptive systems, Daedalus, vol. 121, no. 1, pp.17–30, 1992, http://www.jstor.org/stable/20025416 [7] N. Boccara. Modeling complex systems. Berlín: Springer Publ, 2004. [8] E. Ahmed, A. S. Elgazzar, A. S.Hegazi. An overview of Complex Adaptive Systems, 2005, arXiv:nlin/0506059v1 [9] A. Tolk, A. Harper, and N. Mustafee. Hybrid Models as Transdisciplinary Research Enablers, European Journal of Operational Research, vol. 291, no. 3, pp.1075-1090, 2021. [10] J. Moffat, M. Bathe, L. Frewer. The hybrid war model: a complex adaptive model of complex urban conflict, Journal of Simulation, vol. 5, no. 1, pp. 58- 68, 2011. [11] A. Huerta -Barrientos and I. Flores de la Mota. Modeling the adoption of sustainable practices in the supply chain: a game theory approach, Journal of Advanced Management Science, vol. 5, no. 4, pp.250-254, 2017. [12] M. Brandenburg, K. Govindan, J. Sarkis, S. Seuring. Quantitative models for sustainable chain management: developments and directions, European Journal of Operational Research, vol. 233, pp. 299 – 312, 2014. [13] S. Seuring. A review of modelling approaches for sustainable supply chain management, Decision Support Systems, vol. 54, pp. 1513 – 1520, 2013. [14] G. Li, P. Ji, L. Y. Sun, W. B. Lee. Modeling and simulation of supply network evolution based on complex adaptive system and fitness landscape, Computers & Industrial Engineering, vol. 56, no. 3, pp. 839 – 853, 2009. [15] A. Surana, S. Kumara, M. Greaves, U. Nandini Raghavan. Supply-chain networks: a complex adaptive systems perspective, International Journal of Production Research, 2005, https://doi.org/10.1080/00207540500142274. [16] J. Dunne, U. Brose, R. Williams. Modeling food-web dynamics: Complexity-stability implications, SFI working paper 2004-07-02, 2004. [17] T. Choi, K. Dooley, M. Rungtusanatha. Supply networks and complex adaptive systems: Control versus emergence, Journal of Operations Management, vol. 19, pp. 351-366, 2001. [18] S.C. Brailsford, E. Eldabi, M. Kunc, N. Mustafee, A. F. Osorio. Hybrid simulation modelling in operational research: A state-of-the-art review, European Journal of Operational Research, vol. 278, no. 3, pp. 721-737, 2019. [19] A. Mittal and C. C. Krejci. A hybrid simulation modeling framework for regional food hubs, Journal of Simulation, vol. 13, no. 1, pp. 28-43, 2019, DOI: 10.1057/s41273-017-0063-z [20] T. Reggelin, S. Lang, S. and C. Schauf. Mesoscopic discrete-rate-based simulation models for production and logistics planning, Journal of Simulation, 2020, DOI: 10.1080/17477778.2020.1841575 [21] W. Jones and P. Gun. Train timetabling and destination selection in mining freight rail networks: A hybrid simulation methodology incorporating heuristics, Journal of Simulation, 2022, DOI: 10.1080/17477778.2022.2056536 [22] C. Barbosa, C. Malarranha, A. Azevedo, A. Carvalho and A. Barbosa-Póvoa. A hybrid simulation approach applied in sustainability performance assessment in make-to-order supply chains: The case of a commercial aircraft manufacturer, Journal of Simulation, 2021, DOI: 10.1080/17477778.2021.1931500 [23] A. Rosenblueth, N. Wiener, J. Bigelow. Behavior, Purpose and Teleology, Philosophy of Science, vol. 10, pp.18-24, 1943. [24] F. Lara-Rosano. Las Ciencias de la Complejidad en la solución de nuestros problemas sociales, Sistemas, Cibernética e Informática, vol. 13, no.2, pp.43-50, 2016. [25] J. H. Holland, K. J. Holyoak. Induction: Processes of inference, learning, and discovery. Cambridge: The MIT Press, 1989. [26] J. H. Holland. Studying complex adaptive systems, J. Syst. Sci. Complex, vol. 19, no. 1, pp. 1–8, 2006. [27] S. Auyang. Foundations of complex-system. Theories in economics, evolutionary biology, and statistical physics. Cambridge: Cambridge University Press, 1999. A Hybrid Modelling Framework for E-Commerce Supply Chain… Informatica 47 (2023) 159–172 171 [28] K. G. Dobson. Complexity science will transform logistics. United States Naval Institute, Proceedings, Annapolis Tomo 130 (4), pp. 74-76, 2004. [29] F. Nilsson, V. Darley. On complex adaptive systems and agent-based modelling for improving decision- making in manufacturing and logistics settings Experiences from a packaging company, International Journal of Operations &Production Management, vol. 26, pp. 1351-1373, 2006. [30] C. Wycisk, B. McKelvey, M. Hülsmann. Smart parts, supply networks as complex adaptive systems: analysis and implications, International Journal of Physical Distribution & Logistics Management, 2008, https://doi.org/10.1108/09600030810861198. [31] D. Ivanov, B. Sokolov. Adaptative Supply Chain Management, London: Springer-Verlag, 2010. [32] A. Nair and J. M. Vidal. Supply network topology and robustness against disruptions – an investigation using multi-agent model, International Journal of Production Research, vol. 49, pp. 1391-1404, 2011. [33] M. Haghnevis and R. G. Askin. A Modeling Framework for Engineered Complex Adaptive Systems, IEEE Systems Journal, 2012, DOI:10.1109/JSYST.2012.2190696 [34] J. Wojtusiak, T. Warden, O. Herzog. Machine learning in agent-based stochastic simulation: Inferential theory and evaluation in transportation logistics, Computers & Mathematics with Applications, vol. 64, pp. 3658 – 3665, 2012. [35] Q. Long. Three-dimensional-flow model of agent- based computational experiment for complex supply network evolution, Expert Systems with Applications, 2015, http://dx.doi.org/10.1016/j.eswa.2014.10.036. [36] R. Reyes Levalle, S. Y. Nof. Resilience in supply networks: Definition, dimensions, and levels, Annual Reviews in Control, vol. 43, 2017, doi:10.1016/j.arcontrol.2017.02.003 [37] N. J. Van Eck and L. Waltman. Visualizing bibliometric networks. In Ding, Y., Rousseau, R., & Wolfram, D. (Eds.) Measuring scholarly impact: Methods and practice, pp. 285-320, Springer, 2014. [38] A. T. Gumus, A. F. Guneri and S. Keles. Supply chain network design using an integrated neuro-fuzzy and MILP approach: A comparative study, Expert Syst. Appl., 2009. [39] S. Pathak, D. Dilts and G. Biswas. On the evolutionary dynamics of supply chain network topologies, IEEE Transactions on Engineering Management, 2007. [40] M. Özbayrak, T. Papadopoulou and M. Akgun. Systems dynamics modelling of a manufacturing supply chain system, Simul. Model. Pract. Theory, 2007. [41] T. Eldabi, A. Tako, D. Bell, A. Tolk. Tutorial on means of hybrid simulation. Proceddings of the 2019Winter Simulation Conference. December 2019, pp. 33-43, 2019. [42] M. W. McElroy. Integrating Complexity Theory, Knowledge Management, and Organizational Learning, Journal of Knowledge Management, vol.4, no. 3, pp. 195-203, 2000, DOI:10.1108/13673270010377652 [43] A. Ma, A. Zhou, A. Ali, N. Alain. An Agent Based Modelling Approach for Dynamic Risk Modelling in Emergency Response, 2021 IEEE International Conference on Emergency Science and Information Technology (ICESIT) Emergency Science and Information Technology (ICESIT), 2021 IEEE International Conference on. :290-293 Nov, 2021 DOI: 10.1109/ICESIT53460.2021.9696775 [44] https://www.morganstanley.com/ideas/global- ecommerce-growth-forecast-2022 consulted 15/03/23 172 Informatica 47 (2023) 159–172 A. Nila et al.