Package agents.policy

Class SupportPolicy

  • All Implemented Interfaces:
    de.dlr.gitlab.fame.agent.AgentAbility

    public class SupportPolicy
    extends de.dlr.gitlab.fame.agent.Agent
    Coordinates various different support policies - distributes according information and assigns support pay-outs.
    Author:
    Johannes Kochems, Christoph Schimeczek, Felix Nitsch, Farzad Sarfarazi, Kristina Nienhaus
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  SupportPolicy.EnergyCarrier
      Available energy carriers eligible for support - and "Other"
      static class  SupportPolicy.Products
      Products of SupportPolicy
      • Nested classes/interfaces inherited from class de.dlr.gitlab.fame.agent.Agent

        de.dlr.gitlab.fame.agent.Agent.WarmUpStatus
    • Field Summary

      • Fields inherited from class de.dlr.gitlab.fame.agent.Agent

        contractManager, ERR_MESSAGES_MISSING, ERR_NO_ACTION, ERR_UNHANDLED_MESSAGE, INFO_NO_FOLLOW_UP, LOG_EXECUTION, logger
    • Constructor Summary

      Constructors 
      Constructor Description
      SupportPolicy​(de.dlr.gitlab.fame.agent.input.DataProvider dataProvider)
      Creates a SupportPolicy
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static de.dlr.gitlab.fame.time.TimePeriod extractAccountingPeriod​(de.dlr.gitlab.fame.time.TimeStamp time, de.dlr.gitlab.fame.communication.Contract contract, long stepsToShift)
      Extract the accounting period for support schemes from contract duration and shift it by given steps
      • Methods inherited from class de.dlr.gitlab.fame.agent.Agent

        addContract, call, closeChannel, executeActions, executeWarmUp, fulfilNext, fulfilNext, getId, getNextRandomNumberGenerator, getPostOffice, handleMessage, now, openChannel, publish, receive, sendMessageTo, sendMessageTo, store, store, toString, warmUp
    • Constructor Detail

      • SupportPolicy

        public SupportPolicy​(de.dlr.gitlab.fame.agent.input.DataProvider dataProvider)
                      throws de.dlr.gitlab.fame.agent.input.ParameterData.MissingDataException
        Creates a SupportPolicy
        Parameters:
        dataProvider - provides input from config
        Throws:
        de.dlr.gitlab.fame.agent.input.ParameterData.MissingDataException - if any required data is not provided
    • Method Detail

      • extractAccountingPeriod

        public static de.dlr.gitlab.fame.time.TimePeriod extractAccountingPeriod​(de.dlr.gitlab.fame.time.TimeStamp time,
                                                                                 de.dlr.gitlab.fame.communication.Contract contract,
                                                                                 long stepsToShift)
        Extract the accounting period for support schemes from contract duration and shift it by given steps
        Parameters:
        time - to start the search for next delivery time
        contract - to create the accounting period from
        stepsToShift - seconds to shift the time: positive values shift towards the future, negative ones towards the past
        Returns:
        a TimePeriod matching next delivery period of given contract shifted by given time steps