1. A method of preventing and detecting conflicts and errors through prognostics and diagnostics in a network having a plurality of cooperative units each configured to collaborate with other cooperative units, comprising: determining the topology of the network and the type of links therein; establishing a constraint network in which each node in the network is represented by a constraint and links between nodes represent relationships between constraints; and selecting a conflict and error prevention and detection (CEPD) algorithm from a plurality of algorithms having either centralized or decentralized CEPD logic, based on analysis of the characteristics of the CEPD algorithms and the characteristics of the constraint network.