Aggregation of heterogeneous interacting agents: the variant representative agent framework