Technological Modelling for Graphical Models: An Approach Based on Genetic Algorithms