## 1 Introduction  
Primarily, Industry 4.0 focuses on replacing or improving the existing structure of industries with advanced digital equipment so that all the components can exchange data with each other and coordinate with other devices uninterruptedly. By keeping this in view, Industry 4.0 can simply be interpreted as the digital integration of machines, work pieces, systems, and complete infrastructure through which intelligent networks could be developed along the entire value chain. Considering the core concepts of Industry 4.0, this research took place at the Laboratory of Computer Integrated Manufacturing, Industrial Engineering Department, King Saud University, Saudi Arabia. The system is presented in Figure 1. There are yogurt and flavor tanks from which cups of required volumes can be filled. At the placement point, the sensor senses the glass, and it then moves towards the yogurt filling point. The solenoid valve opens for a time in which the glass is filled with yogurt of the required volume. A glass filled with yogurt then moves towards the flavor filling point, and it is then filled with the required volume of flavor. After the flavor is mixed with the yogurt, the filled glass then moves towards the leaving point and leaves the system. During the filling of yogurt and flavor, the cups are held stationary by the system while the conveyor belt moves to carry cups from one point to another. Only one flavor is mixed with the yogurt as demanded by the customers. The total volume of a cup and the volumes of yogurt and flavor varies as demanded by the customer. Moreover, the industry can be operated in two types of markets: one in which the cups have standard volumes and the other where the cups have make-to-order volumes. Customer order comprises the total volume of a cup, the number of cups of required volume, the volumes of yogurt and flavor in a total volume of the cup, and the waiting time for an order. In this paper, a mathematical model was also developed for Industry 4.0 based yogurt filling machines with the main objective of maximizing the speed of the conveyor belt and hence the throughput. Overall system integration is shown in Figure 2a,b. The orders received from customers for different volumes of yogurt and flavors in a required volume of the cup are processed through the machine optimally by using the proposed mathematical model. The results of the model are used as input for the one-dimensional rules to evaluate the performance measure of interest. Moreover, the effects of changes in the feed rate of flavor valve and length of the conveyor belt on the feed rate of flavor valve, speed of conveyor belt, waiting and processing times, and on different performance measures were investigated. Although the problem still poses challenges in practice, by solving real-life cases, the proposed model provides a benchmark for the filling process of cups of different volumes. It was found that by implementing the proposed model, significant improvements in terms of optimizing the filling process was achieved. Figure 1: The automatic yogurt filling system. There is a set of constraints that must be considered in the filling process of the cups, which will be described later in Section 4. These constraints are relevant to the maximum speed of the conveyor belt, maximum feed rate of yogurt and flavor valves, fulfilling a demand on or before the waiting time of customers, and equal filling time of yogurt and flavor in a cup. As shown in Figure 2, the Industry 4.0 laboratory consists of a fully automated yogurt filling machine that is equipped with real-time data capturing technologies such as smart sensors, Radio Frequency Identification (RFID) system, machine computer of the robot arm, controller of air compressor, and conveyor motor. These technologies are supposed to be the main real-time data enablers of the industry 4.0 system.