The paper presents a method based on algebraic-logical meta-model for solving flow-shop scheduling problem with time limits, the quality control, removing of manufacturing defects on an additional repairing machine and re-treatment of job in technological route. The appearance of the defect is unexpected event and would influence the total job processing time when the schedule is executed. Since a priori quality control results are unknown we deal with stochastic uncertainties. To be exact, the job processing time is stochastic. Flow shop scheduling problems are NP-hard and tend to become more complex when unexpected events are taken into consideration. The presented method is called a switching of algebraic-logical models. The switching method allows to present a problem by using models of subproblems and switching function. The switching function specifies the rules of using models of subproblems and these models are simplest then a model of initial problem. This method allows to solve dynamical nondeterministic problems.