optimize/minimize linear function where each variable has "steps" that can be upgraded

21 Views Asked by At

I have used sklearn's linear regression function in Python to come up with a surrogate model to describe energy use (in GJ) of a residential house. The parameters are:

  • Air changes per hour
  • Wall Insulation R-Value
  • Roof Insulation R-Value
  • Slab Insulation R-Value
  • Basement Wall Insulation R-Value
  • Furnace Efficiency
  • Window U-Value
  • HRV Efficiency

For each of these parameters there is a baseline value, and I have 3 "levels" of retrofit upgrades that could be performed, and the associated cost. For example, the baseline furnace efficiency is 80%. The Level 1 upgrade is 5,000 dollars to get to 90% efficiency, Level 2 is 8,000 for 95% efficiency, and Level 3 is 12,000 for 98% efficiency.

I would like to optimize the best order to perform these upgrades to minimize cost per GJ saved (compared to the baseline). Each parameter can only be upgraded one level per step. For example, the answer could be:

  • Step 1: upgrade furnace to level 1
  • Step 2: upgrade furnace to level 2
  • Step 3: increase wall insulation to level 1
  • Step 4: upgrade furnace to level 3
  • Step 5: upgrade window to level 1
  • Step 6: increase wall insulation to level 2
  • etc..

I know that this could be done using brute force however I was looking for a better solution if possible. I'm wondering how I could go about setting this up. What would it be called and how could I find more info? Or, does anybody see an easier way to do this and get the same result? Any help would be much appreciated.

I was looking into linear programming but my constraints aren't inequalities? Not sure if they could be converted to them, or if thats the wrong direction for a problem like this.

Thanks!