The improved simulator for the simulation of temperatures inside the refrigerator/freezer at different modes of control. The simulator is integrated with advanced optimization algorithm to automatically find the optimal control-setting of an appliance.