In district heating systems, the capacity and types of energy sources, along with their control mechanisms to meet heating demands, are intricately linked. Effective planning must consider financial constraints and system operations, especially with thermal storage. Control methods can significantly influence sizing decisions by adjusting heat production and storage rates across different equipment. Addressing these issues concurrently is essential to maximize cost savings throughout the system's lifespan. This study addresses critical research gaps, such as the lack of integrated bi-level schemes that combine evolutionary and mathematical optimizers while maintaining original non-linear problem formulations. Specifically, it puts forward a novel tri-level optimization framework aimed at minimizing the lifecycle cost (LCC) of district heating plants, powered by a mix of green (solar thermal and biomass) and conventional (gas) heat sources, along with daily thermal storage. The three levels of this scheme are: i) a particle swarm optimizer (PSO) to explore capacities of heat production and storage devices to minimize LCC; ii) an interior-point optimizer (Ipopt) to minimize annual operating costs with explicit operational constraints; and iii) a simulation layer to enhance computational efficiency. Technical suggestions regarding the initialization and early termination of Ipopt to achieve the global optimal solution with reasonable computation time are described in detail. When applied to the multi-source plant, this methodology showed successful and rapid convergence of PSO towards feasible system designs. The study achieved a minimum LCC of 36.34 million USD, corresponding to a levelized cost of heat of 0.0256 USD/kWh, by maximizing green heat sources and using moderate-volume storage. Biomass fuel (74.8%) and capital costs of biomass (8.1%) and solar (7.9%) systems were the primary LCC contributors. Thermal storage enhanced operational flexibility; without it, the gas boiler capacity increased by 112.1 times, and LCC and carbon emissions rose by 3.4% and 106.97%, respectively. In conclusion, the proposed methodology successfully demonstrated substantial cost savings and environmental benefits through strategic renewable energy use and thermal storage, laying the groundwork for its reapplication to more complex system configurations.