Class TariffMarketService

    • Constructor Detail

      • TariffMarketService

        public TariffMarketService()
        Default constructor
    • Method Detail

      • getMinPublicationFee

        public double getMinPublicationFee()
      • getMaxPublicationFee

        public double getMaxPublicationFee()
      • getPublicationFee

        public Double getPublicationFee()
      • getMinRevocationFee

        public double getMinRevocationFee()
      • getMaxRevocationFee

        public double getMaxRevocationFee()
      • getRevocationFee

        public Double getRevocationFee()
      • getPublicationInterval

        public int getPublicationInterval()
      • setPublicationInterval

        @ConfigurableValue(valueType="Integer",
                           description="Number of timeslots between tariff publication events. Must be at most 24.")
        public void setPublicationInterval​(int interval)
      • getPublicationOffset

        public int getPublicationOffset()
      • setPublicationOffset

        @ConfigurableValue(valueType="Integer",
                           description="Number of timeslots from the first timeslot to delay the first publication event. It does not work well to make this zero, because brokers do not have an opportunity to post tariffs in timeslot 0.")
        public void setPublicationOffset​(int offset)
      • handleMessage

        public void handleMessage​(TariffSpecification spec)
        Processes a newly-published tariff.
      • handleMessage

        public void handleMessage​(org.powertac.common.msg.TariffExpire update)
        Handles changes in tariff expiration date.
      • handleMessage

        public void handleMessage​(org.powertac.common.msg.TariffRevoke update)
        Handles tariff revocation.
      • handleMessage

        public void handleMessage​(org.powertac.common.msg.VariableRateUpdate update)
        Applies a new HourlyCharge to an existing Tariff with a variable Rate.
      • handleMessage

        public void handleMessage​(org.powertac.common.msg.EconomicControlEvent msg)
        Processes an incoming ControlEvent from a broker
      • handleMessage

        public void handleMessage​(org.powertac.common.msg.BalancingOrder msg)
        Processes an incoming BalancingOrder by storing it in the tariffRepo. Balancing orders can be used for interruptible tariffs, but not in the presence of RegulationRates. For tariffs with RegulationRates, the BalancingOrders are automatically constructed from the RRs. In other words, BalancingOrders can be used to permit up-regulation through curtailment, but not if the customer expects to be paid for the balancing events.
      • processRevokedTariffs

        public void processRevokedTariffs()
        Runs through the list of pending tariff revocations, marking the tariffs and their subscriptions.
        Specified by:
        processRevokedTariffs in interface TariffMarket
      • getDefaultTariff

        public Tariff getDefaultTariff​(org.powertac.common.enumerations.PowerType type)
        Returns the default tariff
        Specified by:
        getDefaultTariff in interface TariffMarket
      • subscribeToTariff

        public void subscribeToTariff​(Tariff tariff,
                                      CustomerInfo customer,
                                      int customerCount)
        If customerCount is positive, subscribes a block of Customers from a single Customer model to the specified Tariff, as long as the Tariff is not expired or revoked. If customerCount is negative, unsubscribes a block of customers from the specified tariff. Processing is deferred unless the customer has no subscriptions, which should only be true at the start of a boot or sim session.

        Note that you cannot unsubscribe directly from a Tariff -- you have to do that from the TariffSubscription that represents the Tariff you want to unsubscribe from.

        Specified by:
        subscribeToTariff in interface TariffMarket