In most configurations of modular structures, products are assumed to have a unique modular structure. However, it is well known that alternatives for constructing modular structures may exist in any level of abstraction. Explicit considerations of alternative structures invoke changes in the number of module instances so that lower costs, more independency of structures and higher efficiency can be achieved. Relatively few research papers were found in the literature that deal with the optimization of modular structures problem with alternative assembly combinations aiming at minimization of module investments. First, this paper proposes an optimization model which helps users to change their dedicated systems gradually into modular ones. The optimization is achieved through appropriately selecting the subsets of module instances from given sets. The proposed optimization model is general in the sense that products can have any number of modules and alternatives of assemblies. Secondly, the paper presents an adapted Discrete Particle Swarm Optimization algorithm (DPSO), which is applied in the aforementioned problem. Comparisons with Genetic Algorithm, Simulated Annealing and total enumeration are presented. Finally performance comparisons using a set of large scale problems (for which the optimal solution is unknown) between the proposed algorithm (DPSO) and the other optimization techniques, are presented and discussed.