This letter presents a model for coordinated optimal allocation of wind, solar, and storage in microgrids that can be applied to different generation conditions and is integrated with the Gurobi solver. The model has been developed for the purpose of dispatch optimization under four distinct operating modes: wind, photovoltaic, a hybrid of the two, and energy storage device configuration. The optimal scheduling strategy, as a result, ensures that the costs are minimized while meeting the operational requirements of the users. Furthermore, the optimal scheduling strategy guarantees that the cost is minimized while meeting the user’s operational requirements and ensures a no-power-loss outcome with the addition of a storage device of a specific size. The experimental results demonstrate a notable reduction in costs when scheduling strategy of the model is employed, as compared to alternative operational modes.