powertac / powertac-server

Power TAC simulation server
www.powertac.org
Apache License 2.0
44 stars 35 forks source link

factored-customer needs to support RegulationRates #1065

Open jecollins opened 3 years ago

jecollins commented 3 years ago

Currently, the factored-customer models cannot deal correctly with tariffs containing RegulationRates, because they do not report their regulation capacity to the balancing market. Once this support is available, it may be possible to add new customer types to the existing factored-customer structure, such as electric vehicles (see #1064).

jecollins commented 3 years ago

FrostyStorage is indeed a THERMAL_STORAGE_CONSUMPTION customer. It subscribes to the storage tariff issued by the Sample broker, and in one test game one of the three instances subscribed to the default STORAGE tariff. So why does it subscribe to the default CONSUMPTION tariff, which has the same flat consumption rate in addition to a RegulationRate?

jecollins commented 3 years ago

TariffRepo.getDefaultTariff() returns the incorrect type for STORAGE customers. Easily fixed by making the generic type of THERMAL_STORAGE_CONSUMPTION be STORAGE.

jecollins commented 3 years ago

FrostyStorage does indeed support RegulationRates.

jecollins commented 3 years ago

Test cases for storage customer FrostyStorage do not test regulation rates, and test config for curtailmentShifts don't add up to 1.0.

jecollins commented 3 years ago

In DefaultCapacityOriginator.addRegCapacityMaybe(), we see the following bit of code that reports per-timeslot regulation capacity:

      // compute regulation capacity before handling curtailment shifts
      upReg = Math.max(0.0, (adjustedCapacity - capacityStructure.getUpRegulationLimit()));
      downReg = Math.min(0.0, (adjustedCapacity - capacityStructure.getDownRegulationLimit()));

So the reported up-regulation capacity is the capacity the model plans to use, less the upRegulationLimit. In other words, the upRegulationLimit (1000 kWh) is the minimum energy quantity the model must keep for itself, the rest could be curtailed. Similarly, the reported down-regulation capacity is maximum energy the model could be asked to consume in the current timeslot as constrained by the downRegulationLimit (2000 kWh). This is a very crude model of regulation, which is unlikely to be effective for an EV model. It's also not clear how these numbers align with the capacityBundle values of controllableKW = -500, upRegulationKW = 0, downRegulationKW = 500, and storageCapacity = 750. It does not appear that these values are used at all.

jecollins commented 2 years ago

I've decided against attempting to represent EV chargers with factored-customer. It really doesn't fit the model.

jecollins commented 2 years ago

I made extensive notes while attempting to represent EV chargers in factored-customer. Perhaps they will be useful in the future.