Package org.jamesii.core.parameters

Examples of org.jamesii.core.parameters.ParameterBlock


   *          the problem representation
   */
  public <P> void storeFeatures(IApplication application,
      P problemRepresentation) {

    ParameterBlock parameters = new ParameterBlock(problemRepresentation,
        FeatureExtractorFactory.PROBLEM_REPRESENTATION);

    List<FeatureExtractorFactory> suitableFactories = SimSystem.getRegistry()
        .getFactoryOrEmptyList(AbstractFeatureExtractorFactory.class,
            parameters);
View Full Code Here


   *          the application at hand
   * @return list of {@link FeatureExtractorFactory} instances
   */
  public static List<FeatureExtractorFactory> getFeatureExtractorsForApplication(
      IApplication app) {
    ParameterBlock fep =
        new ParameterBlock(app, FeatureExtractorFactory.PROBLEM_REPRESENTATION);
    List<FeatureExtractorFactory> feFactories = null;
    try {
      feFactories =
          SimSystem.getRegistry().getFactoryList(
              AbstractFeatureExtractorFactory.class, fep);
View Full Code Here

  public void finish(IWizard wizard) {
    BaseExperiment exp = wizard.getValue(ExperimentSetup.EXPERIMENT);

    // add data sink setup
    DataStorageFactory dsf = wizard.getValue(DataSinkSetup.DATASINK_FACTORY);
    ParameterBlock block = wizard.getValue(DataSinkSetup.DATASINK_PARAMETERS);
    if (dsf != null) {
      exp.setDataStorageFactory(new ParameterizedFactory<>(
          dsf, block));
    }

    ModelInstrumenterFactory mf =
        wizard.getValue(InstrumenterSetup.MODEL_INSTRUMENTER_FACTORY);
    ComputationInstrumenterFactory sf =
        wizard.getValue(InstrumenterSetup.SIMULATION_INSTRUMENTER_FACTORY);
    // read already selected parameters
    ParameterBlock mBlock =
        wizard.getValue(InstrumenterSetup.MODEL_INSTRUMENTER_PARAMETERS);
    ParameterBlock sBlock =
        wizard.getValue(InstrumenterSetup.SIMULATION_INSTRUMENTER_PARAMETERS);

    if (sf != null) {
      exp.setComputationInstrumenterFactory(new ParameterizedFactory<>(
          sf, sBlock));
View Full Code Here

   * Gets the default exec param block.
   *
   * @return the default exec param block
   */
  public static ParameterBlock getDefaultExecParamBlock() {
    ParameterBlock execParams = new ParameterBlock();
    execParams.addSubBlock(COPY_AT_ONCE, false);
    execParams.addSubBlock(INTERACTIVE, false);
    execParams.addSubBlock(LOG_TIME, false);
    execParams.addSubBlock(MONITORING_ENABLED, false);
    execParams.addSubBlock(RESILIENT, false);
    execParams.addSubBlock(SILENT, false);
    execParams.addSubBlock(MASTER_SERVER_NAME, "");
    execParams.addSubBlock(SIM_START_TIME, 0.0);
    execParams.addSubBlock(SIM_STOP_TIME, Double.POSITIVE_INFINITY);
    execParams.addSubBlock(INTER_STEP_DELAY, 0L);
    execParams.addSubBl(START_PAUSED, false);
    execParams.addSubBl(SIM_RESOURCE_ALLOCATION, new ParameterBlock(
        ConstantResourceAllocatorFactory.class.getCanonicalName()));

    return execParams;
  }
View Full Code Here

  public SimpleSimulationAlgorithmSetup(IModel model) {
    super("Select preferred Simulation Algorithm: ", false);

    // determine the processor factories for the model
    ParameterBlock block =
        new ParameterBlock(new AbstractExecutablePartition(model, null, null),
            AbstractProcessorFactory.PARTITION);

    try {
      factories =
          SimSystem.getRegistry().getFactoryList(
View Full Code Here

    experiment.setComputationTaskStopPolicyFactory(simRunStopSetup
        .getSimRunStopPolicy());
    experiment.setComputationTaskStopPolicyParameters(simRunStopSetup
        .getSimRunStopPolicyParameters());

    ParameterBlock block =
        new ParameterBlock(simAlgoSetup.getSelectedFactory().getClass()
            .getName(), simAlgoSetup.getSelectedParameters().getSubBlocks());
    experiment.setProcessorFactoryParameters(block);

    ParameterizedFactory<TaskRunnerFactory> factory =
        simRunnerSetup.getFactory();
View Full Code Here

        .getComputationTaskStopFactory());

    repCritSetup.setReplicationCriteria(experiment
        .getReplicationCriterionFactory());

    ParameterBlock b =
        experiment.getParameters().getParameterBlock()
            .getSubBlock(ProcessorFactory.class.getName());

    if (b != null) {
      simAlgoSetup.setAlgoFactory((ProcessorFactory) SimSystem.getRegistry()
          .getFactory((String) b.getValue()), b);
    }

    simRunnerSetup.setTaskRunner(experiment.getTaskRunnerFactory());
  }
View Full Code Here

              dialog.getFactoryParameter(SwingUtilities.getWindowAncestor(page));
          if (parameters != null) {
            IModel oldModel = model;
            try {
              // try to load model
              ParameterBlock readerParams =
                  new ParameterBlock(parameters.getFirstValue()
                      .getSubBlockValue(IURIHandling.URI), IURIHandling.URI);
              IModelReader reader =
                  parameters.getSecondValue().create(readerParams, SimSystem.getRegistry().createContext());
              model =
                  reader.read((URI) parameters.getFirstValue()
View Full Code Here

   * able to provide model locations and appropriate reader factories. Those are
   * used as selection option for models.
   */
  @SuppressWarnings("unchecked")
  private void initModelSelectionOptions() {
    ParameterBlock params =
        FactoryParameterDialogParameter.getParameterBlock(
            ModelReaderFactory.class, null);

    selectionDialogs = new ArrayList<>();

View Full Code Here

   *          the block
   */
  protected void setFactories(List<F> factories, F selected,
      ParameterBlock block) {
    List<F> facs = factories;
    ParameterBlock bl = block;
    if (facs == null) {
      facs = new ArrayList<>();
    }
    if (bl == null) {
      bl = new ParameterBlock();
    }

    panel = new ConfigureFactoryPanel<>(facs, title, selected, bl, allowNull);

    removeAll();
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.