Optimal Resource Assignment through Negotiation in a Multi-agent Manufacturing System