A computer code oriented to S.I. engine control and powertrain simulation is presented. The model, developed in Matlab-Simulink® environment, predicts engine and driveline states, taking into account the dynamics of air and fuel flows into the intake manifold and the transient response of crankshaft, transmission gearing and vehicle. The model, derived from the code O.D.E.C.S. for the optimal design of engine control strategies now in use at Magneti Marelli, is suitable both for simulation analysis and to achieve optimal engine control strategies for minimum consumption with constraints on exhaust emissions and driveability via mathematical programming techniques. The model is structured as an object oriented modular framework and has been tested for simulating powertrain system and control performance with respect to any given transient and control strategy. The adoption of a hierarchical structure based on different classes of models, ranging from black-box Neural Network to grey-box mean value dynamic models, allows a satisfactory accuracy with limited computational demand which makes it suitable for the optimization of engine control strategies. In the paper the whole model framework is described together with simulation results obtained for different transient manouevres and control strategies.