Virtual Force-Based Routing of Modular Agents on a Graph