The purpose of the study is to solve the problem of design of daily load profiles for optimal control of an environmentally friendly commercial and industrial microgrid (CIM) (power is generated only by renewable energy sources) connected to the power system by a power transmission line. This goal is achieved by adjusting the planned daily load profiles of consumers located on the territory of the CIM. The adjustment means shifting power consumption to another time of the day in question (power consumption is delayed). The problem of the delayed power allocation is represented as an optimization multiple knapsack problem that adapts to the problem-solving process. The proposed algorithm was tested on a 6-node system according to the scenario that involved adjustment of the load profile in the CIM to ensure that the power flow from the power system remains within specified limits. Compliance with the limits guarantees uninterrupted power supply from the power system, which is a fundamental requirement when developing load profiles. Experiments were carried out to evaluate the delivery of uninterrupted power supply to CIM consumers depending on the initial data. The findings indicate that the disruptions in power supply to CIM consumers are completely eliminated if the load can be divided to shift it to other hours of the day and when the load of 0.151 MW is disconnected in operating state 7. The total load should be divided into at least three parts. Disconnection of 0.151 MW is performed to prevent disconnection of the commercial and industrial microgrid from the power system, which would result in a power deficit of 4.652 MW.