1. A method for generating a simulation model of a cyber-physical system that performs control functionality in software to actuate and/or manipulate a defined industrial system, the method for generating the closed-loop simulation model based on a defined functional model of the cyber-physical system, the method comprising: by a processor, identifying input flows and output flows of a function included in the defined functional model of the cyber-physical system; by the processor, identifying as secondary flows those input flows and output flows of the function that are not essential flows required by the function; by the processor, using the secondary flows to determine a specific context for the mechanism of the function; by the processor, using the specific context determined by the secondary flows, selecting a simulation model component that maps to the function of the functional model by referring to a context tree having a root node corresponding to the function of the functional model and selecting the simulation model component with the least number of equations and the least number of statements; and repeating the above operations on additional functions included in the defined functional model to incorporate additional simulation model components into the simulation model; forming a resulting system simulation model of the industrial system; executing the resulting simulation model based upon industrial system input flows supplied by a user; displaying simulation results in the form of industrial system output flows on a computer terminal display associated with the user; and actuating and/or manipulating the defined industrial system based upon the simulation results.