DEVELOPMENT OF A MULTIMODAL (RAILROAD-WATER) CHAIN OF GRAIN SUPPLY BY THE AGENT-BASED SIMULATION METHOD

Optimization of business processes of supply chains by multimodal routes refers to complex, integrated applied problems. The range of such problems is becoming increasingly relevant and grows in scale with the development and expansion of trade relations of the global economy. At the same time, one of the main problems of optimization and planning and organization of multimodal logistics processes are those related to the establishment of the optimal parameters of transport, warehouse (terminal) and handling infrastructure. The problem is that such problems, due to their scale and complexity, require a systemic approach. However, analytical methods of applied mathematics are quite limited in the optimization of the entire multimodal process of the supply chain. In addition, these scientific tools are difficult to use in assessing stochastic transportation and cargo handling flows. Computer simulation remains one of several tools for applied research into complex multimodal routes. Thus, the research aimed at the development of multimodal (railroad-water) chains of mass cargo supply, in particular, those based on the use of agent-based computer simulations, is relevant.


Introduction
Optimization of business processes of supply chains by multimodal routes refers to complex, integrated applied problems. The range of such problems is becoming increasingly relevant and grows in scale with the development and expansion of trade relations of the global economy.
At the same time, one of the main problems of optimization and planning and organization of multimodal logistics processes are those related to the establishment of the optimal parameters of transport, warehouse (terminal) and handling infrastructure. The problem is that such problems, due to their scale and complexity, require a systemic approach. However, analytical methods of applied mathematics are quite limited in the optimization of the entire multimodal process of the supply chain. In addition, these scientific tools are difficult to use in assessing stochastic transportation and cargo handling flows. Computer simulation remains one of several tools for applied research into complex multimodal routes.
Thus, the research aimed at the development of multimodal (railroad-water) chains of mass cargo supply, in particular, those based on the use of agent-based computer simulations, is relevant.

The results of the simulation of a multi-element chain of grain supply by the rail and water multimodal route were shown. Mathematical substantiation of the optimization problem was presented. The minimum cargo delivery time was selected as the optimization criterion. The limits for the admissible use (loading) of fleets of transport units of railroad and water transport were selected as optimization constraints. The optimization model is a multi-parametric problem of stochastic programming. The objective function of the model was represented in implicit expression. The search for the solution of the optimization model was performed using experiments with the developed simulation model. The simulation model is based on the discrete-event and agent-based principles, it simulates the interaction of two railroad and one sea transport and technological lines, as well as terminal points of accumulation, storage, and reloading of cargo batches. One ton of wheat grain acts as a part of the cargo module. The simulation model was developed in AnyLogic RE (USA) and Java SE (USA) environments. The algorithm of the simulation model involves the interaction of populations of agents of transport junction points; agents of transport and technological lines; populations of agents of fleets of transport units; agents of information orders for transportation. The model was implemented using the example of the actual process of grain supply from Ukraine to Egypt. The model was studied using the integer optimization method. As a result of experiments, the optimal values of the required stock of cars, locomotives, and naval vessels were established. In addition, the required capacity of granaries at the shipping stations and seaports' terminals, as well as the necessary capacity of track development of railroad stations, were found. The established average delivery time was within 185 hours
Keywords: multimodal logistics, grain supply chain, agent-based simulation, railroad and water route and monetary measurements but also indicators of reliability, risk, and security are accepted as optimization criteria.
With the help of agent-based simulation in the MATSim environment (Germany), a number of problems of increasing the efficiency of natural observations, acquisition, and processing statistical data [1] of the general functioning of an urban transport network (on the example of Berlin) [2] were studied in different time horizons [3].
Paper [4] presented the results of the simulation of passengers' behavior, depending on the accuracy and speed of arrival of information about unpredictable failures of the urban transport operation. The result of such research are recommendations for rapid re-planning of public transport routes [5] and optimization of bus fleet management [6], which increases profits by 12 % [7]. Study [8] identifies the optimal models of passengers-cyclists interaction with other types of public transport. At the same time, the models in these works are fair only for passenger transportation and, in addition, do not take into consideration the work of passenger transport hubs.
With the help of comprehensive agent-based simulation of the automobile traffic, it was possible to establish that an increase in the informative value of actual data of motor vehicles' routes by collecting geolocation indicators [9] and mobile communication [10] leads to an increase in the efficiency of deliveries [1]. Research [11] assesses the geolocation data of personal mobile communication of passengers as the way of determining the demand for transportation, the policy of operation of transport companies, including the issues of land use. Other similar studies of the city agglomeration of Rotterdam [1] contain the tools for making logistic decisions on planning the city motor transport network. With the help of similar research [12], the algorithm of control of allowing traffic lights of urban traffic is optimized, which ensures increased fault tolerance of the entire motor transport system of the city. At the same time, these studies do not determine that these results can be applied to multi-element supply chains by different transport modes, not only road transport.
Agent-based simulation with a low abstraction level makes it possible to simulate risks of different nature (related to weather conditions, pirates, etc.) of complex sea routes [13]. Researchers successfully used the Bayesian and other statistical models to evaluate the function of "obligation" [14] and the effectiveness of the transport safety system [15]. Although, when using computer simulation methods, the results could ensure a higher level of reliability. Other researchers in their paper [16] prove the need to accumulate a database of information flows based on local agents of information systems.
However, the key in optimizing logistics processes is to establish rational parameters of relevant business processes [17]. Thus, dynamic optimization determines the distance of orders' delivery [18]. In other studies with similar tools, railroad car flows are optimized on the railroad network [19] and in developed railroad hubs [20]. The result of the research [21] is an estimation of the costs of consumers' servicing when transporting small batches of quickly spoil cargo under city conditions. Finding a decision-making tool for choosing the option of organizing container transportation within the framework of the Dutch strategic freight transport model "BasGoed" was the result of research [22]. Similar studies solved the same problem by optimizing the network of points of cargo flow concentration [23] and the location of transit seaports [24]. Based on the results of other studies, the methodology for the rational choice of the supply chain of quickly spoilt cargoes was proposed [25]. These works ensure the necessary systematicity in the studies, but the reliability of the results and the adequacy of the models may be higher when using simulation models.
Most of the above papers are the result of analytical research. Sub-processes and functional elements are considered separately, or conventionally in the unified logistics system, which adversely affects the model abstraction and results' reliability.
Another problem when using analytical mathematics during the study of logistic processes is the difficulty in considering the stochastic nature of traffic flows, moments of discrete transition between the phases of transport service, the size of cargo batches, etc. That is why these studies are aimed at the development of simulation models, which make it possible to take into consideration the systematicity and stochasticity of logistic processes and to ensure a low level of abstraction of mathematical modeling.

The aim and objectives of the study
The aim of this study is to determine the optimal parameters of the complex chain of grain supply by the multimodal (railroad-water) route. This will give an opportunity to increase the efficiency of grain supply during the organization of railroad and water communication.
To achieve the set goal, the following tasks were set: -to formalize the process of the multimodal supply chain using the optimization mathematical model; -based on the agent-based and discrete-event principles, to develop a simulation model of the multimodal supply chain by a railroad and water route; -to implement the developed simulation model of grain supply from Ukraine to Egypt.

1. The theoretical substantiation of the optimization model
The process of grain delivery by the rail and water route to foreign markets is a multimodal (intermodal) supply chain, which can be conditionally divided into the following elements ( Fig. 1): 1) accumulation of cargoes at cargo forwarding points; 2) taking cargo batches from accumulation points to concentration points; 3) concentration of cargo batches for its delivery by rail routes to a sea commercial forwarding port; 4) cargo delivery by rail routes to a sea trade forwarding port; 5) accumulation of cargo up to the norm of loading into a vessel; 6) loading and delivery of cargo to the destination port; 7) the distribution of cargo in the destination country to final destinations.
Then the total cargo delivery time will be the totality of time spent at each stage of a supply chain: deliv.
accum.deliv. local deliv. accum.rail rail.route accum.port sea deliv. , where t accum.deliv. is the average time of cargo being at railroad forwarding stations; t local deliv. is the average time of cargo transportation from forwarding stations to stations of rail-road route formation to a port; t accum.rail is the time of cargo being at the stations of railroad route formation to a port; t rail.route is the time of cargo transportation from the formation station to a sea trade port; t accum.port is the time of cargo being at a sea trade forwarding port; t sea.deliv. is the time of cargo transportation by a sea line from a forwarding port to a destination port. In turn, each component of expression (1) will depend on the parameters of the corresponding element of a logistic system of a supply chain: , , , , , : where N daily is the average intensity of grain arrival to forwarding ports. This parameter can be formalized as a random (exponential) function from average intensity (λ daily ) of arrival before forwarding grains by the і-th station: m local.locom. is the estimated number of local (freight, train) locomotives for gathering and concentration of cargo from forwarding stations to the station of railroad route formation, loc.; m accum.deliv. is the estimated composition of a pick-up goods train, cars; m car is the operating stock of cars to organize grains supply from the forwarding station to a sea trade port; S i :S N is the set of forwarding stations with corresponding sets of transport and technology characteristics -capacity of a granary, grain arrival intensity before forwarding, the distance to the station of route formation, the productivity of loading complexes, time of handling trains on departure, route speed, traveling over a railroad network; N -the number of stations.
, , where L i is the distance from the і-th forwarding station to the station of grain route formation, km; v local deliv. is the average (route) speed of motion of local trains on the section between the stations of gathering and concentration of cargo batches.
where S b is the station of formation of railroad routes to a sea trade port with corresponding transport and technical parameters: the capacity of track development, standards of a technological process; m locom. is the number of long-distance locomotives (train) for the organization of grains routes to a seaport; m rail grain train is the number of cars in a grain route.
where L rail-port is the length of a railroad direction on the station of grain route formation to the destination station that services a sea trade forwarding port; v rail-port is the average route speed of motion of grain routes on railroad direction L rail-port . , where S depart. is the sea trade port of forwarding with a set of corresponding transport and technological characteristics: the capacity of granaries, the productivity of re-loading ports; m ship. is the fleet of vessels (bulkers); m ship.capac. is the commercial (useful) capacity of a vessel.
( ) where L sea is the length of a sea line between a forwarding port and a destination port; v ship. is the average speed of motion of vessels on route L sea .
The key point in the optimization of supply chains is the time of cargo delivery, which must be made as little as possible. At the same time, the available production resources should be used rationally, and the entire logistic system should ensure an appropriate level of reliability (fault tolerance). Then expression (1) taking into consideration functional dependences (2) to (8) can be presented as an objective optimization function when the average time of grain delivery within the entire supply chain will act as the optimization criterion: ,   (10) where φ(m local.locom. ), φ(m car ), φ(m locom. ), φ(m ship ) are the average daily load of corresponding fleets of transport facilities. It is determined as an average share of use from the general operation hours within a day; ξ ratio. is the boundary of the rationality of using the selected parameters of a logistic system; ξ reliab. is the boundary of reliability of the load of the selected parameters of a logistic system.
The resulting optimization mathematical model (9) together with limitations (10) is a multi-parametric problem of stochastic programming. At the same time, the objective function (9) is represented in implicit expression, so it cannot be solved by analytical methods. One of the possible solutions to this scientific and applied problem may be a computer simulation.

2. Development of a simulation model
To solve the set optimization task effectively, it is necessary to determine additional constraints and assumptions: 1) throughput capacity of railroad transport systems and the port infrastructure is sufficient and does not significantly affect the time of cargo delivery on the chosen logistics route; 2) incoming cargo flows to forwarding stations are in the Poisson form; 3) all queues of orders (rolling stock, service channels, service facilities) are serviced by the FIFO principle ("first-in, first-out")the order (facility) that is the first in line is serviced first; 4) supply of only one cargo type is organized, thus, all rolling stock is unified for it.
The simulation model will be a simulation of the logistic process presented in Fig. 1. Since the entire supply chain is the interaction of separate logistic subsystems, globally, the simulation model will rely on the agency-based principle. In addition, each of the sub-processes of logistic subsystems can be presented as a discrete flow of transitions of the state of elements of these processes. Each subprocess is clearly regulated in time, with conditional boundaries (moments of time) of the beginning and the end of the duration of corresponding operations. Thus, such subprocesses are discrete and will be simulated by the discrete-event principle.
The simulation model is developed in AnyLogic Research Edition 8.6 environment and the built-in Java SE software compiler.
The process simulation begins with the population of agents of CargoStationPoint (Table 1), where the source unit simulates the discrete and event proves of orders arrival cargoModule (cargo, grains, tons) at grain accumulation granaries (Accumulation unit) (Fig. 2).
In Accumulation unit, when each order cargoModule arrives at it from the source unit, the algorithm is realized with the use of Java -code: if (Accumulation.size()>=carsInTrain){ for (int i=0; i < carsInTrain; i++) Accumulation.stopDelay(Accumulation.get(i)); Order order=new Order( this ); send (order, main.distribution); } timeCargoStationAccum.add(time() -agent.timeSource); that controls the process of cargo weight accumulation. When cargo weight reaches the norm of the cargo batch established for the forwarding (variable carsInTrain), an appropriate agent-information Order is sent to the Distribution agent.
This algorithm simulates the sending of an informational message about readiness to send the necessary batch of cargo. The relevant information order is transferred from the cargo forwarding (accumulation) stations to the dispatch center of the car and locomotive stock control.
Upon the arrival through the enter unit, each information order Order gets to the seizeCars unit (of Seize Table 1 Characteristic of agents of the simulation model type) to the Distribution agent, where it gets in the service queue (Fig. 3). For each order to be serviced by the seizeCars unit, the necessary amount of available resources is taken: 1) agents Car -empty cars -grain carriers. The car stock is controlled by the rp_Cars unit; 2) agents LocomDistrib -freight local locomotives. The car stock is controlled by the rp_DistrLocoms unit.
The Order cannot be serviced and waits until a sufficient amount of available Car and LocomDistrib resources appear.
After seizing resources by the seizeCars unit, the moveTo unit implements the discrete-event subprocess of traveling of the freight locomotive with empty cars to the station of forwarding of the corresponding (to Order) cargo batch.
Upon arrival at the departure station, the loading process is simulated by the q_L and Loading units. The q_L unit (type Queue) simulates a queue for car loading. The Loading unit is a multichannel process of cars loading at granaries of a cargo forwarding station.
After loading, a train with cargo follows to the station of railroad routes formation (moveTo1 unit). Upon arrival, the freight locomotive is exempt from the operation, undergoes appropriate maintenance (lokomServise and rTE units), and returns to the DistrLocomos unit, where it waits for a new Order of service.
The cargo itself (Order) in cars (agents Car) is accumulated to the required amount of grain route formation -waitDelivery unit. When it is accumulated to the norm of the weight of a grain route, an information order for the composition of a grain route that is ready to be forwarded is generated to the source unit of the second subprocess of the Distribution agent, using the source.inject(1) function (Fig. 4). The second subprocess simulates the formation and departure of grain routes to a sea trade port.
After receiving an order for a route forwarding, a process that is similar to the first subprocess (Fig. 3) -seizing the available resource, the main locomotive (LocomMain), the stock of which is controlled by the rp_LocomMain unit -is realized. After unloading in the port terminal (Unloading), an empty route (locomotive and cars) return (turnBig units, Fig. 3, and moveTo3, Fig. 4) to the station of grain route formation. Then the appropriate locomotive and cars, after maintenance, go into a state of waiting for subsequent production orders for transportation to be serviced.
In unit sink1 (Fig. 4), when each cargo batch arrives along the railroad grain route, using the Java -code: (1); cargoInSeaTerminal -= main.cargoInShip; } the algorithm of accumulation up to the vessel's (bulker's) load norm is realized. When the required batch (cargoInShip parameter) is accumulated, sending of information order to the following process of the supply chain -a sea technological line -is simulated with the help of the source.inject (1) procedure (Fig. 5).
This process is identical to the second business subprocess of the Distribution agent (Fig. 4). A fleet of vessels (populations of Ship agents), controlled by the rp_ Ship unit, is used as an available resource.  Table 2. Table 2 Source data of simulation of the grain supply chain In Ukraine: 1) region of cargo production and forwarding: Zhytomyr oblast, stations of Novograd-Volynskyi, Yablunets, Kurne, Horbashi, Nova Borova, Korosten, Berdychiv; 2) the station of accumulation, formation, and forwarding of grain routes -Zhytomyr; 3) sea trade forwarding port -Mykolaiv. In Egypt: sea trade destination port -Alexandria.

3. 2. Model adequacy, software code validation, and evaluation of the reliability of results
Software code validation was carried out step by step with the compilation of the Java-code of all agents separately. When compiling both separate agents and the model as a whole, no software errors were detected.
Reliability of the obtained results was ensured by determining the minimum number of replications and the minimum required simulation time. The level of reliability of results of not less than 95 % (with an error probability of not more than 5 %) will be achieved at least at four replications and five years of simulation time.
The adequacy of the model was tested by comparing the results of the basic experiment with the normative and actual ones. When running the model with different sizes of the transport fleet, delivery time ranges from 180 to 400 hours. This range corresponds to the existing actual and normative values of the time of cargo delivery by multimodal railroad and water routes at the distance of 1,500-3,000 km [26].

3. 3. Conducting the basic experiment and gathering statistics of simulation results
When running the basic model, the following results of the experiment were measured, acquired, and systematized: 1. The structure of cargo delivery time at the entire stage of the supply chain was determined as the mathematical expectation of the whole statistical sample of experimental data.
2. The average load of the transport fleet: cars, freight locomotives, grain route locomotives, vessels. It was determined as a result of the utilization() function of the corresponding units of the "ResourcePool" tyle (that is "resource") of Distribution and SeaPort agents.
3. The maximum amount of cargo that is accumulated at forwarding stations and the station of grain route formation was determined by setting the maximum value of the variable of the actual amount of cargoes being at the points of accumulation of business processes of the Distribution and SeaPort agents using the Java-code: where accum is the variable that determines the amount of cargo in the accumulation of the batch required to be forwarded, tons; wait is the variable that determined the amount of cargo waiting to be forwarded from the corresponding logistic sub-system.

3. Optimization experiments
To determine the optimal value of cargo delivery time (9) with the established criteria (10), an optimization experiment was implemented with the change of integer parameters of the number of transport units (10).
The lower boundary (rationality) is accepted as ξ ratio. =0.5, the upper boundary (reliability) is ξ reliab .=0.75. As a result of the experiment, no option that satisfies conditions (10) was found, due to unacceptable loading of the locomotives' stock of organization of grain routes (Fig. 6, 7): Taking into consideration the principle that in the absence of a variant of the source parameters, which provided conditions for limiting optimization (10), the option that violates the lower boundary -the rationality boundary -is accepted. That is why for the basic scenario, two locomotives of grain route organization are accepted.
The optimization experiments gave the following results of the parameters of a grain supply chain from Ukraine to Egypt (Table 3). All transport stocks are loaded optimally, except for locomotives of grain routes. This situation is quite normal for discrete (integer) problems.
The maximum recorded volume required in the capacity of the warehouse and transport infrastructure (Fig. 8, 9) indicates a slight exceedance of this indicator of the rate of loading the relevant transport units, which indicates a sufficiently high level of logistic fault tolerance of the entire supply chain. The structure of the delivery time is given in Table 4.  Major part of the time the entire supply chain accounts for the sea line (70.3 % of total time), which is due to the considerable time to accumulate the batch required to be sent (25,000 tons) and the largest time consumption for direct cargo operations and transportation.

Discussion of the results of simulation of the multimodal grain supply chain
The obtained results of modeling quite logically explain the essence of multimodal processes of supply chains. The reliability of the entire process, in general, is ensured by rhythmic functioning at each delivery stage. It is each chain in a unified technological system that forms the incoming flow for each subsequent chain in order. Therefore, the time of cargo staying at some transportation stage will depend not only on the transport and technological parameters of this subsystem but also on the parameters of all previous subsystems (1), Fig. 1.
Thus, the systemic approach implemented in the agentbased simulation of the presented model made it possible to establish the optimal stock sizes simultaneously in all three transport subsystems (Table 3) and, as a result, to ensure acceptable delivery time (Table 4). In addition, the systemic approach allows the optimization of the volume of warehouse stocks in transit points of accumulation of cargo batches. The capacity of the track development of the station of railroad route formation and granaries of the forwarding port does not exceed 30 % of the estimated capacity of the respective transport units (Fig. 9, Table 2).
However, the relatively large capacity of accumulation granaries at forwarding stations quite clearly highlights the drawback of the simulation model presented in this work ( Table 2, Fig. 8). And this drawback lies not in the formalization of the process of gathering grain at the railroad sections between stations (2), (4), but in the simulation of the corresponding process of the simulation model (the algorithm presented in Fig. 3). The situation can be explained by the fact that at an extensive network of railroads (Fig. 1, element "Set of forwarding stations", Table 2 point "Annual volume of forwarding, thousands of tons per year"), a local (freight) locomotive services only one station by one trip. Although in reality, it can transport cars to other railroad stations, which are within this route. This assumption in the development of the algorithm of the model will lead to over-travel of freight locomotives and, as a result, their sufficiently high loading at relatively low efficiency. This drawback may be the direction of improve-ment of the algorithm of the presented simulation model in the future.

Conclusions
1. The logistic process of grain supply by multimodal (rail and water) route was formalized as an optimization model of the total cargo delivery time with constraints of the rational and reliable (fault-tolerant) loading of transport fleets. The optimization model takes into consideration the stochastic arrival of traffic flows, the duration of technological operations and consistency of supply schedules within each of the supply chains. The model is presented in an implicit expression, so the set scientific and applied task can be solved only experimentally. This approach makes it possible to implement the systemic approach when optimizing the entire grain supply chain on the railroad and water routes.
2. The developed simulation model is a simulation of the interaction between the agents of the logistic (transport and warehouse) infrastructure -seven agents of railroad forwarding station, one agent of the railroad station of grain route formation, one agent of the forwarding seaport of and one agent of the destination seaport.
Together with the agents of the transport infrastructure, the model simulates the interaction of populations of transport fleet agents (cars, local locomotives, grain route locomotives, vessels) and information orders for transportation. The number of agents in each population is the source parameter of simulation, allowing doing integer optimization experiments with the developed model.
To simulate the corresponding business processes, the discrete-event principle of the simulation was applied. This approach enables simulating delays in cargo transportation within supply chains.
3. The simulation model was implemented in Java SE and AnyLogic RE environment. By doing the optimization experiment, it was possible to find the optimal set of the composition of transport fleet units, according to which the load duration ranges from 0.4-0.68.
Most of the cargo delivery time within the entire supply chain falls on the sea technological line (70.3 %), which is quite natural due to the highest cargo capacity of each vessel and the transportation distance.
The required volumes of granaries' capacity for each of the supply chains were established. The value of these volumes does not exceed 100 % of the capacity of corresponding transport units. This indicates an acceptable level of fault tolerance of the entire logistic system.