GENERAL: Automatic generation of min-weighted persistent formations