Add generator class and weights on graph