Smart manufacturing in the so-called Industry 4.0 age pushes the research and development of laboratory-scale proof of concepts before its deployment in pilots and real-size equipment. As such, we present a cyber-physical system (CPS) demonstration in the mining industry field engineered to autonomously manage the handling of solids flowing in a conveyor-belt that drops materials in containers, forming multiple stockpiles per belt. The CPS operates to control multiple stockpiles' inventories using mixed-integer optimization that minimizes the square deviation of the measured inventory to their targets (heights). Within the sensing-optimizing-actuating (SOA) cycle, the CPS demonstration is performed as follows. First, the sensing (data measurement, data processing, and system evaluation) uses a deep neural network in real-time to assess the level of materials stored in transparent containers. Second, the optimizing (mathematical programming, optimization techniques, and decision-making capabilities) is performed using a flowsheet network formulation called unit-operation-port-state superstructure (UOPSS) that permits a fast solution for the position-idle-time-varying discrete manipulated variables as operational schedules. Third, the actuating (cyber-physical integration) implements a physical actuation solution through an integrated CPS environment. According to the findings of our experimentation, stockpiling process control in a smart manufacturing context has enormous potentials to control multiple stockpiles' inventory autonomously.