The CUBES instrument model and simulation tools