Package org.jamesii.core.parameters

Examples of org.jamesii.core.parameters.ParameterBlock


   */
  private void createParameterizationTrees(
      Map<Class<? extends Factory<?>>, List<QuantitativeBaseVariable<?>>> variables) {
    Set<Class<? extends Factory<?>>> foundFactories = new HashSet<>();
    for (ParameterBlock defaultConfiguration : defaultConfigurations) {
      ParameterBlock pbCopy = defaultConfiguration.getCopy();
      ParameterizationTree paramTree = new ParameterizationTree(pbCopy,
          variables);
      paramTrees.put(pbCopy, paramTree);
      parameterizationTrees.add(paramTree);
      paramsToTreeParams.put(defaultConfiguration, pbCopy);
View Full Code Here


  @Override
  public ParameterBlock getRandomNeighbour(ParameterBlock simConfig,
      int positionToChange) {
    // Get neighbor
    ParameterBlock neighbor = configSamplingRules.getNeighbor(simConfig,
        getTreeForConfig(simConfig), positionToChange);

    // Store neighbor in mapping
    paramsToTreeParams.put(neighbor, paramsToTreeParams.get(simConfig));
    return neighbor;
View Full Code Here

    // Get neighborhood
    List<ParameterBlock> neighborhood = configSamplingRules.getNeighborhood(
        simConfig, getTreeForConfig(simConfig));

    // Store neighborhood in mapping
    ParameterBlock originalTreeParameters = paramsToTreeParams.get(simConfig);
    for (ParameterBlock config : neighborhood) {
      paramsToTreeParams.put(config, originalTreeParameters);
    }
    return neighborhood;
  }
View Full Code Here

      exp.setDefaultSimStopTime(SimulationProblemDefinition
          .getSimStopTime(problem));
      exp.setFixedModelParameters(new HashMap<String, Object>(problem
          .getSchemeParameters()));
      exp.setTaskRunnerFactory(new ParameterizedFactory<TaskRunnerFactory>(
          new AdaptiveTaskRunnerFactory(), (new ParameterBlock())
              .addSubBl(AdaptiveTaskRunnerFactory.PORTFOLIO,
                  new ArrayList<>(job.getConfigs().values()))
              .addSubBl(AdaptiveTaskRunnerFactory.POLICY,
                  policyFactory.getClass().getName())
              .addSubBl(ParallelComputationTaskRunnerFactory.NUM_CORES,
View Full Code Here

    List<String> subBlockNames =
        new ArrayList<>(configuration.getSubBlocks().keySet());
    Collections.sort(subBlockNames);

    for (String subBlockName : subBlockNames) {
      ParameterBlock subBlock = configuration.getSubBlock(subBlockName);
      Object subBlockValue = subBlock.getValue();
      if (factoryParametersMap.containsKey(subBlockValue)) {
        addParameterVertexForFactory(parent, subBlock, (String) subBlockValue,
            factoryParametersMap);
      } else {
        createTreeRecursively(subBlock, factoryParametersMap, parent);
View Full Code Here

        SimSystem.report(Level.WARNING, "In parameter block '"
            + factoryParamBlock + "' for factory '" + factoryClass.getName()
            + "' there is no parameter '" + parameterName
            + "' defined --- adding it with default value of the variable: "
            + parameter.getValue());
        ParameterBlock newParameterSubBlock =
            factoryParamBlock.addSubBlock(parameterName, parameter.getValue());
        vertex.addParameter(parameter, newParameterSubBlock);
      }
    }
  }
View Full Code Here

   * @param args
   *          first argument is source file, second argument is destination file
   */
  public static void main(String[] args) {
    try {
      PerformanceTuples.convertToConfigDataFile(new ParameterBlock(args[0],
          XMLImportManagerFactory.RESULT_FILE), args[1]);
    } catch (Exception ex) {
      SimSystem.report(Level.SEVERE, "Conversion failed", ex);
    }
  }
View Full Code Here

      performanceDatabase =
          SimSystem
              .getRegistry()
              .getFactory(AbstractPerfDBFactory.class, null)
              .create(
                  new ParameterBlock(connectionData,
                      PerfDBFactory.CONNECTION_DATA), SimSystem.getRegistry().createContext());

      performanceDatabase.open();

      // This is necessary in case the Hibernate driver removes all
View Full Code Here

  @Override
  public IFeature newFeature(IApplication app, IFeatureType featureType,
      IFeatureExtractor<ParameterBlock> extractor) {
    return newFeature(app, featureType,
        extractor.extractFeatures(new ParameterBlock(app,
            FeatureExtractorFactory.PROBLEM_REPRESENTATION)));
  }
View Full Code Here

      Class<AF> afClass, ParameterBlock parameterBlock,
      IParameter topLevelParameter, SelTreeSetVertex currentRoot)
      throws ClassNotFoundException {

    // Retrieve sets of suitable factories and their parameters
    ParameterBlock paramBlock =
        augmenter.augment(parameterBlock, this, currentRoot, topLevelParameter);
    List<F> fList = SimSystem.getRegistry().getFactoryList(afClass, paramBlock);

    List<F> factoryList = filterToAvoidCycle(fList, currentRoot);
    List<IPluginData> pluginData = SimSystem.getRegistry().getPlugins(afClass);
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.