The main contribution of the proposed work is to minimize the capacity of the canal region and functional step for the head gate of the supply canal depending on the canal constraint. Due to the communication and interconnection over the sensors in IoT, the required decision variables are obtained for the operation of water supply scheduling. Then, the proposed model utilizes several decision variables such as start time, and discharge rate. In various sections, the decision variables change from the head of the canal to the tail, which is also to be gradually decreased as well. To overcome this constraint, the Modified Exploration-based Artificial Gorilla Troops Optimizer (ME-AGTO) algorithm is proposed in this article, where the start time, and discharge rate is efficiently optimized. The newly developed ME-AGTO algorithm is applied for the two-way water supply and acquires the optimal scheduling of the water supply. Hence, the canal capacity is considered with optimized variables at different sections throughout the head and tail parts of the canal. Thus, the schedules are created for the inflow of water with the aid of the rotation period and head gate. The performance is estimated to obtain the desired results of less conveyance loss.