Skip to main content

8.7) PV Installation Decision


The final procedure we have to define is the calculate-balance-and-decide procedure. From the ODD you see that PV is installed if the generation costs per kWh of electricity (depending on PV output, costs, subsidies per m2, and interest rate) are lower than the avoided costs (grid costs expected to increase) plus the feed-in tariff (subsidies per kWh expected). We start with a simplified version of this, where we leave aside subsidies, interest rates and increasing grid costs for now. In section 3.6 we will implement these parameter and experiment with them.

To start with the procedure we code a skeleton which is an if statement checking whether the generation costs are actually lower than the avoided costs per kWh, and if yes set PV variable true, colour the turtle and set the age to 0.

Insert in the calculate-balance-and-decide procedure the following code:

to calculate-balance-and-decide
   if generation-cost-per-kWh < avoided-cost-per-kwh [
      set PV true
      set color red
      set PV-age 0
   ]
end

If you hit the check button you will get an error message since we have not defined generation-cost-per-kWh and avoided-cost-per-kwh yet.