Designing energy systems becomes more and more important as distributed and renewable energy production gains attention. As distributed systems have quite different challenges than centralized ones, novel solution methods are in demand and have been proposed. Sustainability is an ever increasingly important factor for decision makers. The aim is to utilize renewable energy sources like wood, grass, manure, etc., while keeping in mind that their transportation for long distances is impractical. Revitalization of local and regional economy is also a priority. Previous work applied the P-Graph methodology to design an energy system based on biomass in a rural region. A more recent extension of the P-Graph framework is the utilization of operating units with flexible input materials, which makes more accurate equipment models possible. This flexibility is important because certain operating units can tolerate some change in the ratio of their input materials and others cannot. In this work, a method is proposed to design an energy system in a rural area. The notion of flexible operating units is applied to a case study, giving us the possibility to identify optimal composition of biomass feeds and plant size. Our model includes the collection and transportation of local renewable resources, fermenters and combined heat and power (CHP) plants, in order to optimize profit from generated heat and electricity. The case study shows that this modeling technique results in 31% more profit with a considerably lower computational effort.