We know, In MATLAB software working in two types of environment. MATLAB Coding Script and MATLAB Simulink. For optimization smart grid operation many respected authors used different types of metaheuristic algorithms to solve this problem. The maximum author chose MATLAB Code to solve metaheuristic algorithms. Now my question: is it efficient to use MATLAB Simulink to replace MATLAB code to solve metaheuristic algorithms for optimization smart grid operation?