1. A method for generating code and simulation information for use by a controller and a simulator, respectively, the method comprising the steps of: for at least one mechanical resource, encapsulating resource logic in a control assembly (CA); identifying at least one of the CAs corresponding to at least one resource; using the at least one identified CA instance to generate code for controlling the at least one resource; and using the at least one identified CA instance to generate simulation information.