Distributed optimization for cooperative agents: application to formation flight | Synapse