Tabnine Logo
ServerConfiguration.configureMe
Code IndexAdd Tabnine to your IDE (free)

How to use
configureMe
method
in
org.powertac.common.interfaces.ServerConfiguration

Best Java code snippets using org.powertac.common.interfaces.ServerConfiguration.configureMe (Showing top 17 results out of 315)

origin: powertac/powertac-server

/**
 * Configures this instance from the given configuration service.
 */
public void configure (ServerConfiguration configSource)
{
 serverConfiguration = configSource;
 configSource.configureMe(this);
}
origin: powertac/powertac-server

@Override
public String
 initialize (Competition competition, List<String> completedInits)
{
 serverConfig.configureMe(this);
 if (remoteVisualizer) {
  // set up the output queue
  log.info("Remote visualizer on queue " + visualizerQueueName);
  jmsManagementService.createQueue(visualizerQueueName);
 }
 return "VisualizerProxy";
}

origin: powertac/powertac-server

/**
 * Configures this singleton when it's needed. Not called during instance
 * creation to allow testing without a full Spring setup.
 */
public void configure ()
{
 if (null == serverConfiguration) {
  serverConfiguration = (ServerConfiguration)
    SpringApplicationContext.getBean("serverPropertiesService");
 }
 if (null == serverConfiguration) {
  // should not happen outside of testing
  log.warn("Cannot find serverPropertiesService");
 }
 else {
  serverConfiguration.configureMe(this);
 }
}
origin: powertac/powertac-server

/**
 * Configures this singleton when it's needed. Not called during instance
 * creation to allow testing without a full Spring setup. This version is
 * Deprecated! Please use configure(ServerConfiguration) instead.
 */
@Deprecated
public void configure ()
{
 if (null == serverConfiguration) {
  serverConfiguration = (ServerConfiguration)
    SpringApplicationContext.getBean("serverPropertiesService");
 }
 if (null == serverConfiguration) {
  // should not happen outside of testing
  log.warn("Cannot find serverPropertiesService");
 }
 else {
  serverConfiguration.configureMe(this);
 }
}
origin: powertac/powertac-server

/**
 * Creates the instance and sets the reference to the timeService.
 */
public static void initialize (CompetitionControlService competitionControl,
                TimeService timeService)
{
 instance = new SimulationClockControl(competitionControl, timeService);
 ServerConfiguration serverConfig =
   (ServerConfiguration) SpringApplicationContext.getBean("serverPropertiesService");
 serverConfig.configureMe(instance);
}

origin: powertac/powertac-server

/**
 * Computes actual distribution and balancing costs by random selection
 */
@Override
public String initialize (Competition competition, List<String> completedInits)
{
 super.init();
 balancingCost = null;
 serverProps.configureMe(this);
 if (null == balancingCost)
   balancingCost = 0D;
 log.info("Configured BM: balancing cost = " + balancingCost
      + ", (pPlus',pMinus') = (" + pPlusPrime + "," + pMinusPrime + ")");
 serverProps.publishConfiguration(this);
 return "BalancingMarket";
}
origin: powertac/powertac-server

 return;
serverConfiguration.configureMe(this);
structures = new HashMap<>();
origin: powertac/powertac-server

@Override
public String initialize (Competition competition, List<String> completedInits)
{
 incoming.clear();
 serverProps.configureMe(this);
 brokerProxyService.registerBrokerMessageListener(this, Order.class);
 super.init();
 serverProps.publishConfiguration(this);
 return "Auctioneer";
}
origin: powertac/powertac-server

/**
 * This function called once at the beginning of each game by the server
 * initialization service. Here is where you do pre-game setup. This will read
 * the server properties file to take the competition input variables needed
 * (configuration files, days of competition), create a listener for our
 * service, in order to get the new tariff, as well as create the household
 * Consumers that will be running in the game.
 */
@Override
public String initialize (Competition competition,
             List<String> completedInits)
{
 if (!completedInits.contains("DefaultBroker")
   || !completedInits.contains("TariffMarket"))
  return null;
 super.init();
 tariffMarketService.registerNewTariffListener(this);
 configuration = new Properties();
 villageList = new ArrayList<Village>();
 serverPropertiesService.configureMe(this);
 if (configFile1 == null) {
  log.info("No Config File for VillageType1 Taken");
  configFile1 = "VillageDefault.properties";
 }
 addVillages(configFile1, "1");
 return "HouseholdCustomer";
}
origin: powertac/powertac-server

/**
 * This function called once at the beginning of each game by the server
 * initialization service. Here is where you do pre-game setup. This will read
 * the server properties file to take the competition input variables needed
 * (configuration files, days of competition), create a listener for our
 * service, in order to get the new tariff, as well as create the household
 * Consumers that will be running in the game.
 */
@Override
public String initialize (Competition competition,
             List<String> completedInits)
{
 if (!completedInits.contains("DefaultBroker")
   || !completedInits.contains("TariffMarket"))
  return null;
 super.init();
 configuration = new Properties();
 officeComplexList = new ArrayList<OfficeComplex>();
 tariffMarketService.registerNewTariffListener(this);
 serverPropertiesService.configureMe(this);
 //tariffMarketService.registerNewTariffListener(this);
 if (configFile1 == null) {
  log.info("No Config File for OfficeComplexType1 Taken");
  configFile1 = "OfficeComplexDefault.properties";
 }
 addOfficeComplexes(configFile1, "1");
 return "OfficeComplexCustomer";
}
origin: powertac/powertac-server

public void start ()
{
 // pull down configuration - this will later change when configuration
 // available from web-app
 serverPropertiesService.configureMe(this);
 if (isServingJms()) {
  startProvider();
 }
 initializeClientInterface();
}
origin: powertac/powertac-server

@Override
public String initialize (Competition competition, List<String> completedInits)
{
 pendingTransactions.clear();
 pendingMarketTransactions.clear();
 super.init();
 bankInterest = null;
 serverProps.configureMe(this);
 RandomSeed random =
   randomSeedService.getRandomSeed("AccountingService",
                   0l, "interest");
 if (bankInterest == null) {
  // interest will be non-null in case it was overridden in the config
  bankInterest = (minInterest +
             (random.nextDouble() *
               (maxInterest - minInterest)));
  log.info("bank interest: " + bankInterest);
 }
 serverProps.publishConfiguration(this);
 return "AccountingService";
}
origin: powertac/powertac-server

@Override
public String initialize (Competition competition, List<String> completedInits)
{
 super.init();
 aheadDays = new CopyOnWriteArrayList<DateTime>();
 serverProps.configureMe(this);
 weatherReqInterval = Math.min(24, weatherReqInterval);
 simulationBaseTime = competition.getSimulationBaseTime().toDateTime();
 if (weatherData != null
   && (weatherData.endsWith(".xml") || weatherData.endsWith(".state"))) {
  log.info("read from file in blocking mode");
  blocking = true;
 }
 if (!blocking) {
  DateTime dateTime = timeslotRepo.currentTimeslot().getStartTime();
  // Get the first 3 days of weather, blocking!
  for (int i = 0; i < daysAhead; i++) {
   WeatherRequester weatherRequester = new WeatherRequester(dateTime);
   weatherRequester.run();
   dateTime = dateTime.plusDays(1);
  }
 }
 return "WeatherService";
}
origin: powertac/powertac-server

lastRevokeProcess = new Instant(0l);
serverProps.configureMe(this);
origin: powertac/powertac-server

int seedId = 0;
serverConfig.configureMe(this);
serverConfig.configureMe(buyer);
brokerRepo.add(buyer);
gencos.add(buyer);
 serverConfig.configureMe(cpGenco);
 cpGenco.init(brokerProxyService, seedId++, randomSeedRepo, timeslotRepo);
 brokerRepo.add(cpGenco);
 serverConfig.configureMe(misoBuyer);
 misoBuyer.init(brokerProxyService, seedId++, this);
 brokerRepo.add(misoBuyer);
origin: powertac/powertac-server

distributionFee = null;
serverProps.configureMe(this);
origin: powertac/powertac-server

serverPropertiesService.configureMe(this);
org.powertac.common.interfacesServerConfigurationconfigureMe

Javadoc

Configures a target object by matching configuration clauses with org.powertac.common.config.ConfigurableValue annotations on the target object. This is typically called in the initialize() method.

Popular methods of ServerConfiguration

  • configureInstances
    Creates and configures potentially multiple instances of a target class annotated as org.powertac.co
  • publishConfiguration
    Gathers public configuration data for publication to brokers. Data is gathered from org.powertac.com
  • saveBootstrapState
    Gathers state information at the end of a boot session to be restored in a subsequent sim session. D
  • configureNamedInstances
    Configures a set of named instances that have already been created. This is useful for restoring ins

Popular in Java

  • Making http post requests using okhttp
  • runOnUiThread (Activity)
  • setContentView (Activity)
  • getResourceAsStream (ClassLoader)
  • Color (java.awt)
    The Color class is used to encapsulate colors in the default sRGB color space or colors in arbitrary
  • BitSet (java.util)
    The BitSet class implements abit array [http://en.wikipedia.org/wiki/Bit_array]. Each element is eit
  • HashSet (java.util)
    HashSet is an implementation of a Set. All optional operations (adding and removing) are supported.
  • BlockingQueue (java.util.concurrent)
    A java.util.Queue that additionally supports operations that wait for the queue to become non-empty
  • JList (javax.swing)
  • Logger (org.slf4j)
    The org.slf4j.Logger interface is the main user entry point of SLF4J API. It is expected that loggin
  • Best plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now