This article describes a simulation for resource allocation. As a particular case, it describes how would be the assignment in an ad hoc network. We present the results of a simulation allocating resources from one system (communications network) to another system (agent collections). In the description of the model first shows the behavior of the allocation of resources towards the nodes depending on the usefulness of the network and the satisfaction of the agents. Based on the mathematical model of the tragedy of the commons, the behavior of the system is shown. The usefulness and satisfaction of the system are measured. Resource allocation is modeled as an interaction. The computational model Interaction Nets is used as the basis of the simulation.