Package org.jamesii.core.experiments.tasks

Examples of org.jamesii.core.experiments.tasks.ComputationTaskIDObject


   */
  @Override
  public synchronized void setResilienceInformation(
      ResilienceSimulationInformation data) {
    boolean store = true;
    ComputationTaskIDObject dataid = null;
    Double time = 0.0;

    if (data.getSimulation() == null) {
      SimSystem.report(Level.SEVERE, "No simulation given.");
      store = false;
View Full Code Here


        }
      } else {
        storage = getDataStorage(config);
      }

      return new ComputationTaskIDObject(storage);
    }
    return new ComputationTaskIDObject();
  }
View Full Code Here

   *         simulation run
   */
  private IInitializedComputationTask init() {

    if (runConfig == null) {
      ComputationTaskIDObject computationTaskID =
          runner.getComputationTaskID(config);
      runConfig = createRunConfiguration(computationTaskID);
    }

    if (cancel) {
View Full Code Here

   *
   * @return the initialised computation task
   */
  private IInitializedComputationTask init(TaskConfiguration taskConfig) {

    ComputationTaskIDObject id = this.getComputationTaskID(taskConfig);
    IComputationTaskConfiguration compTaskConfig =
        taskConfig.newComputationTaskConfiguration(id);

    if (isStopping()) {
      return new InitializedComputationTask(null, new RunInformation(
View Full Code Here

  @Override
  public JamesSimDataProvider<String> getTestObject() {
    IComputationTaskConfiguration simRunConfig =
        (new TaskConfiguration())
            .newComputationTaskConfiguration(new ComputationTaskIDObject(2L));
    RunInformation runInfo = new RunInformation(simRunConfig);
    runInfo.setExpID(UniqueIDGenerator.createUniqueID());
    runInfo.setDataStorageFactory(DummyDataStorageFactory.class);
    runInfo.setDataStorageParams(new ParameterBlock());
    return new MyJamesSimDataProvider(runInfo);
View Full Code Here

  public void testInitComputationTask() {
    TaskConfiguration config = new TaskConfiguration();
    IInitializedComputationTask initSim = null;
    SimulationRunConfiguration srConfig =
        (SimulationRunConfiguration) config
            .newComputationTaskConfiguration(new ComputationTaskIDObject());
    initSim =
        ComputationTaskHandler.initComputationTask(srConfig, null,
            new RunInformation(srConfig), null);
    assertNotNull(initSim);
  }
View Full Code Here

  public void testRunComputationTask() {
    TaskConfiguration config = new TaskConfiguration();
    IInitializedComputationTask initSim = null;
    SimulationRunConfiguration srConfig =
        (SimulationRunConfiguration) config
            .newComputationTaskConfiguration(new ComputationTaskIDObject());
    initSim =
        ComputationTaskHandler.initComputationTask(srConfig, null,
            new RunInformation(srConfig), null);
    assertNotNull(initSim);
View Full Code Here

  @Override
  public SimulationRunConfiguration getTestObject() throws Exception {
    return (SimulationRunConfiguration) new SimulationConfigurationSerializationTest()
        .getTestObject().newComputationTaskConfiguration(
            new ComputationTaskIDObject());
  }
View Full Code Here

      } else { // if we don't use a server we create a simulation on our own
        TaskConfiguration config =
            new TaskConfiguration(1, null, null, parameters.getParameterBlock());
        SimulationRunConfiguration srConfig =
            (SimulationRunConfiguration) config
                .newComputationTaskConfiguration(new ComputationTaskIDObject());
        simulation = new SimulationRun("SimRun", model, srConfig, null);
      }
      if (simulation == null) {
        SimSystem.report(Level.SEVERE, "Simulation creation failed!!!");
      }
View Full Code Here

    pb.addSubBlock(SimTimeStopFactory.SIMEND, stopTime);
    config
        .setComputationTaskStopFactory(new ParameterizedFactory<ComputationTaskStopPolicyFactory<?>>(
            new SimTimeStopFactory(), pb));
    return config
        .newComputationTaskConfiguration(new ComputationTaskIDObject());
  }
View Full Code Here

TOP

Related Classes of org.jamesii.core.experiments.tasks.ComputationTaskIDObject

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.