Cellular automata model of dyads dynamics in a pedestrian flow by rigid body approximation