The resource allocation problem in a distributed multi-agent system is considered in this study. First, the authors develop a predefined-time distributed algorithm and analyse its convergence analysis using the Lyapunov stability theory, in which the local constraint is ensured by a differential projection operator. Thus, a predefined time is obtained by a time-varying time-based generator. Second, to reduce the communication consumption between agents, the authors develop a static as well as a dynamic-based event-triggered control scheme, where the information broadcast only occurs at some discrete time instants. Moreover, the three proposed algorithms converge precisely to the global optimal solution. Besides, the Zeno behaviour is excluded in the above static and dynamic eventtriggered mechanisms. Finally, the authors test the proposed algorithms' efficiency based on the provided numerical examples.This is an open access article under the terms of the Creative Commons Attribution License, which permits use, distribution and reproduction in any medium, provided the original work is properly cited.