In this paper, a class of distributed algorithms are proposed for resource allocation optimization problem. The allocation decisions are made to minimize the sum of all the agents' local objective functions while satisfying both the global network resource constraint and the local allocation feasibility constraints. Here, the data corresponding to each agent in the considered separable optimization problem, such as the network resources, the local allocation feasibility constraint, and the local objective function, is only accessible to individual agent and cannot be shared with others, rendering a novel distributed optimization problem. In this regard, we propose a category of projection-based continuous-time algorithms to solve this distributed optimization problem in an initialization-free and scalable manner. Thus, no re-initialization is required even if operation environment or network configuration is changed, making it possible to achieve a "plug-and-play" optimal operation of networked heterogeneous agents. The algorithm convergence is established for strictly convex objective functions, and the exponential convergence is proved for strongly convex functions. The proposed algorithm is applied to the distributed economic dispatch problem in a power grid, illustrating that it can adaptively achieve global optimum in a scalable way, even if the generation cost, system load, or network configuration is varying. The application primarily demonstrates the promising implications of the proposed algorithm.