powertac / powertac-server

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

Population model tariff evaluation is crude, unrealistic #1076

Open jecollins opened 3 years ago

jecollins commented 3 years ago

When an individual model evaluates tariffs, it first decides whether to pay attention (inertia), and then whether to switch (preferences and rationality). Population models should approximate this behavior to the extent possible, but they do not. Instead, the UtilityOptimizer first sets a "chunk size" in its TariffEvaluator, than that chunk is treated as an individual for the purpose of processing inertia and switching tariffs. But then, in evaluateAlternativeTariffs(), a different chunk size (which does not appear to be configurable) is used to allocate segments of the population across tariffs.

This scheme is confusing at best, and does not appear to behave in the way laid out in the game specification.

jecollins commented 3 years ago

Here's a proposal for a new tariff-evaluation process for population models:

Given a population of size N, mapped to a set of tariffs T. For each tariff t, n_t customers are currently subscribed.

At tariff-evaluation time, some subset n_eval of N might potentially switch tariffs such that

n_eval / N ~= (1 - inertia).

Presumably that subset will be N_t,e = {(1 - inertia) * n_t} forall T.

Eval produces a set of utility values U_t

Apply rationality -- foreach n_t,e in T, determine allocations to individual tariffs. Some of these will be staying with their existing tariffs, others will be switching.

Adjust allocations to conform with minimum cluster size constraint. Some allocations will increase slightly, some will decrease, and some will be too small to carry forward.

For each cluster changing from tariff t_a to tariff t_b, carry over the scaled state from regulation and capacity-shifting decision to the new tariff environment.

jecollins commented 3 years ago

Question: Is it valid for a customer (like FrostyStorage) to be treated as INDIVIDUAL capacity types and yet evaluate tariffs as "multi-contracting"? Perhaps not. For populations under 50 (default minimum chunk size), the entire population will always be subscribed to the same tariff. If this is not what we want, the best approach might be to just reconfigure them to create a single CapacityBundle for each CapacityStructure. Alternatively we could set the chunk size to one for these models, but that will require some serious testing and might make behavior even more unrealistic. Ultimately it might be better to re-implement these as bottom-up models.

jecollins commented 3 years ago

Here is a bit of a game between TUC_TAC20 and AgentUDE17 in the master version of the server: tuc_tac-ude-wo-1076

Here is roughly the same big after applying inertia to population models by re-subscribing (1 - inertia-sized) subsets of population chunks rather than using inertia to decide whether the whole chunk gets re-subscribed: tuc_tac-ude-with-1076