Package org.jamesii.core.parameters

Examples of org.jamesii.core.parameters.ParameterBlock


  @Override
  public ITaskRunner create(ParameterBlock params, Context context) {
    AdaptiveComputationTaskRunner asr = null;
    try {
      ParameterBlock policyParameters =
          ParameterBlocks.getSBOrDefault(params, POLICY,
              IntEstimDecFactory.class.getName());
      MinBanditPolicyFactory mbFac =
          SimSystem.getRegistry().getFactory(
              AbstractMinBanditPolicyFactory.class, policyParameters);
View Full Code Here


   */
  public static Set<IParamBlockUpdate> generateUpdates(Double simEndTime,
      ParameterBlock parameterBlock) {
    Set<IParamBlockUpdate> result = generateUpdates(parameterBlock);
    result.add(new SingularParamBlockUpdate(new String[] {},
        ParameterUtils.SIM_STOP_TIME, new ParameterBlock(simEndTime)));
    return result;
  }
View Full Code Here

   * Explore the performance space.
   *
   * @return the variables assignment to configure the exploration
   */
  private VariablesAssignment explorePerformanceSpace() {
    ParameterBlock config = nextConfigToExplore();
    if (nextProblem()) {
      return newProblemExploration();
    }
    // If this is null, the exploration is finished
    if (config == null) {
View Full Code Here

  @Override
  public ParameterBlock getExperimentParameters() {
    // Change the predefined runtime only if calibrator is set
    if (calibrator == null) {
      return new ParameterBlock();
    }
    return configureSimStopping(this.currentSimStopTime,
        this.currentMaxWallClockTime);
  }
View Full Code Here

   *          the max wall clock time (in ms)
   * @return the parameter block that configures simulation stopping
   */
  public static ParameterBlock configureSimStopping(Double simStopTime,
      Long maxWallClockTime) {
    ParameterBlock expParameters = new ParameterBlock();
    expParameters.addSubBlock(ExperimentVariables.STOP_TIME_FACTORY,
        DisjunctiveSimRunStopPolicyFactory.configureStoppingWithUpperLimit(
            simStopTime, maxWallClockTime));
    return expParameters;
  }
View Full Code Here

    if (pInstance != null) {
      // TODO this late setting of the seed does not work with randomly created
      // models (see above)
      SimSystem.getRNGGenerator().setSeed(pInstance.getRandomSeed());
      SimSystem.getRNGGenerator().setRNGFactory(
          new ParameterizedFactory<RandomGeneratorFactory>(new ParameterBlock(
              pInstance.getRNGFactoryName())));
      recordedProblemInstances.put(crti.getRunInformation().getExecutionIDs(),
          pInstance);
    }
  }
View Full Code Here

    for (IPerformanceType perfMeasure : perfDatabase.getAllPerformanceTypes()) {
      factoryMapping.put(perfMeasure.getPerformanceMeasurerFactory(),
          perfMeasure);
    }

    ParameterBlock perfMeasurerParams =
        (new ParameterBlock()).addSubBl(
            PerformanceMeasurerFactory.PERFORMANCE_DATA, rtConfig);

    List<PerformanceMeasurerFactory> suitableFactories =
        SimSystem.getRegistry().getFactoryOrEmptyList(
            AbstractPerformanceMeasurerFactory.class, perfMeasurerParams);
View Full Code Here

      return getFactoryWithTolerance(abstractFactoryClass, parameters);
    }

    SelectorEnsemble ensemble =
        absFactoryRTD.getAdditionalData(SelectorEnsemble.DATA_ID);
    ParameterBlock selectedParameters =
        ensemble.select(parameters, getDataStorage().getFailureTolerance());

    // If no selection could be made, return to default behaviour
    if (selectedParameters == null) {
      return getFactoryWithTolerance(abstractFactoryClass, parameters);
    }

    // Only select sub-block that corresponds to given task
    String baseFactoryName =
        getBaseFactoryForAbstractFactory(abstractFactoryClass).getName();
    if (selectedParameters.hasSubBlock(baseFactoryName)) {
      // Setting the value to null is important in case the user messed up a
      // factory name, i.e. it is non-null but does not result in a selection
      // Otherwise the value of selectedParameters will not be copied (infinite
      // loop)
      parameters.setValue(null);
      copyValues(parameters, selectedParameters.getSubBlock(baseFactoryName));
    }

    return getFactory(abstractFactoryClass, parameters);
  }
View Full Code Here

   *          the task configuration
   */
  protected void adaptConfiguration(TaskConfiguration taskConf) {
    selection = repInfo.getNextOption();
    String facName = ProcessorFactory.class.getName();
    ParameterBlock execParameters =
        repInfo.getOriginalExecParameters().getCopy();
    ParameterBlock procParams =
        execParameters.hasSubBlock(facName) ? execParameters
            .getSubBlock(facName) : execParameters.addSubBlock(facName,
            (Object) null);
    execParameters.addSubBlock(facName, ParameterBlocks.mergeOnTopLevel(
        procParams, ParameterBlocks.hasSubBlock(selection.getSecondValue(),
View Full Code Here

    for (IPerformanceType perfMeasure : database.getAllPerformanceTypes()) {
      factoryMapping.put(perfMeasure.getPerformanceMeasurerFactory(),
          perfMeasure);
    }

    ParameterBlock perfMeasurerParams = performanceMeasurerParams.getCopy();
    perfMeasurerParams.addSubBl(PerformanceMeasurerFactory.PERFORMANCE_DATA,
        performanceData);
    perfMeasurerParams.addSubBl(PerformanceMeasurerFactory.PROBLEM_PARAMETERS,
        problemParameters);

    Map<PerformanceMeasurerFactory, Double> performances = applySuitablePerformanceMeasures(
        performanceData, application, factoryMapping, perfMeasurerParams);
View Full Code Here

TOP

Related Classes of org.jamesii.core.parameters.ParameterBlock

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.