This report discusses an algorithm for the determination of the composition of survey instruments in terms of modules in the context of integrated systems of social surveys. It is organised in three sections. In section 2 we discuss some preliminary issues concerning the instrument composition, such as harmonising the variables, how the different frequencies by which modules may be surveyed may be embedded in a common framework, and also issues related to horizontal and vertical dependencies across modules, which have consequences on their (joint) inclusion in instruments. Their sequencing within an instrument is also discussed. In section 3 we discuss the elements of the optimisation problem, i.e. the constraints to be respected (precision-sample size, presence of mandatory crossings) and the objective or cost function to be minimised. In section 4 we propose an implementation of a stochastic search algorithm, known as “Simulated Annealing”, as a way to cope with our highly non-linear optimisation problem: in seeking the optimal composition, one starts with some initial composition, which is then randomly perturbed at each step. This results in a Markov-chain, which converges to the global minimum of the cost function after sufficiently many steps.