## 3 The Model of Freight Unit Flow at a Container Terminal
Graph method theory is used in many fields such as engineering, computer science, social sciences, and economics. Examples of applications of this method include the optimization of transport routes, management of telecommunications networks, optimization of production processes, and analysis of social networks. The use of graph method theory has many advantages, including the following [49]:  
* problem simplification: this method allows complex problems to be presented in the form of a graph, which makes them easier to understand and solve. Graphs allow visualization and analysis of relationships between elements to be performed, which makes it easier to identify problems and search for solutions;
* flexibility: graph method theory is used in various fields, which shows its flexibility and universality. It can be used to analyze and solve problems in many fields, such as engineering, computer science, social sciences, and economics;
* optimization: graph method theory enables the optimization of processes and activities. For example, the Minimum Spanning Tree allows finding the cheapest path between points in a graph, which can be used in the optimization of transport routes or telecommunications networks;
* automation: using IT tools, graph method theory can be employed in the automation of processes and activities, which speeds up the decision-making process and improves work. Based on these arguments, the authors decided to apply this approach to modeling the flow of cargo units in a container terminal. A transport task within a terminal starts with a machine operator reporting a need to handle cargo. The time from the request until arriving at the cargo pick-up place is the waiting time for task execution. During the waiting time, the task can be modified, which is also possible using the graph model. After the cargo is picked up, it is transported to the destination. If executing the transport task requires translocating the container above it, such translocation is classified as unproductive manipulation. Because container translocation is also a separate task, yet necessary to complete the primary task, it does not proceed to the end of the order queue, but is executed immediately. The translocated container proceeds to the first available (free) position. The paper also presents a method for implementing the model in a computing environment and a set of information that should be recorded as part of the data collection process. Because the complete description of the model is exhaustive, the paper presents only one of many operations outlined in the graph model. The computations take into account all request streams from all determined container handling zones:  
* means of transport unloading,
* means of transport loading
* orders to place a container between storage yard zones,
* orders to translocate a container within the same storage yard sections (unproductive manipulations). The authors assume that all cargo is stored, at least temporarily, and there are no direct reloading operations between means of transport. The scope of the analysis also does not include long-term storage, the so-called depot. A container flow graph in the road-rail direction is shown in Figure 1, while that in the rail-road direction is presented in Figure 2. The model distinguishes between only these system states that characterize processes involving handling machines. If system analysis requires conducting operations not related to handling machines, such a model can be modified to the desired form. In Figure 1, the containers appear at the terminal via road transport. They are then subjected to a technical inspection (including unloading from the vehicle and weighing). Next, after the technical inspection and depending on the needs, the container is transported to customs, the repair point, buffer zone at the road entrance. In the last zone, the container can be translocated (unproductive manipulations).