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​(TariffExpire update)
        Handles changes in tariff expiration date.
      • handleMessage

        public void handleMessage​(TariffRevoke update)
        Handles tariff revocation.
      • handleMessage

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

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

        public void handleMessage​(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
      • activate

        public void activate​(org.joda.time.Instant time,
                             int phase)
        Description copied from class: TimeslotPhaseProcessor
        This method gets called once during each timeslot. To get called, the module must first call the register(phaseNumber) method on CompetitionControl. The call will give the current simulation time and phase number in the arguments.
        Specified by:
        activate in class TimeslotPhaseProcessor
      • getActiveTariffList

        public List<Tariff> getActiveTariffList​(PowerType type)
        Description copied from interface: TariffMarket
        Returns the list of currently active tariffs for the given PowerType. The list contains only non-expired tariffs that cover the given type.
        Specified by:
        getActiveTariffList in interface TariffMarket
      • setDefaultTariff

        public boolean setDefaultTariff​(TariffSpecification newSpec)
        Description copied from interface: TariffMarket
        Convenience method to set the default tariff at the beginning of the game. Returns true just in case the tariff was valid and was successfully saved.
        Specified by:
        setDefaultTariff 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