Package org.jamesii.perfdb.entities

Examples of org.jamesii.perfdb.entities.IProblemInstance


  @Override
  public synchronized void simulationExecuted(ITaskRunner simRunner,
      ComputationTaskRuntimeInformation crti, boolean jobDone) {

    IProblemInstance probInstance =
        recordedProblemInstances
            .get(crti.getRunInformation().getExecutionIDs());
    if (probInstance == null) {
      return;
    }
View Full Code Here


  public synchronized void simulationInitialized(ITaskRunner simRunner,
      ComputationTaskRuntimeInformation crti) {

    // TODO revise repeatability/RNG system to allow repeatable
    // multi-threaded execution
    IProblemInstance pInstance = null;
    try {
      pInstance = registerProblemInstance(crti);
    } catch (Exception ex) {
      SimSystem.report(Level.SEVERE, null, ERR_MSG_TITLE
          + "Error while storing simulation problem.", null, ex);
    }

    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

    }

    // Generate/Re-use problem instance
    Pair<Long, String> rngSetup =
        instanceGenerator.requestNewInstance(problemDefinition);
    IProblemInstance pInst =
        perfDatabase.newProblemInstance(problemDefinition,
            rngSetup != null ? rngSetup.getFirstValue() : -1,
            rngSetup != null ? rngSetup.getSecondValue() : null);

    return pInst;
View Full Code Here

        parameters == null ? new HashMap<String, Serializable>() : parameters);

    // Generate/Re-use problem instance
    Pair<Long, String> rngSetup = instanceGenerator
        .requestNewInstance(problemDefinition);
    IProblemInstance problemInstance = database.newProblemInstance(
        problemDefinition, rngSetup != null ? rngSetup.getFirstValue() : -1,
        rngSetup != null ? rngSetup.getSecondValue() : null);

    flushIfNecessary();
    return problemInstance;
View Full Code Here

  }

  @Override
  public IProblemInstance newProblemInstance(
      IProblemDefinition problemDefinition, long randSeed, String rngFactoryName) {
    IProblemInstance pi = getProblemInstance(problemDefinition, randSeed);
    if (pi == null) {
      checkForHibernateEntities(new Object[] { problemDefinition },
          ProblemDefinition.class);
      pi = // NOSONAR:{checked_above}
          new ProblemInstance((ProblemDefinition) problemDefinition, randSeed,
View Full Code Here

    assertEquals(2, perfDB.getAllProblemDefinitions(scheme).size());
    perfDB.deleteProblemDefinition(problemDefinition1);
    assertEquals(1, perfDB.getAllProblemDefinitions(scheme).size());

    // Testing problem instances
    IProblemInstance pi =
        perfDB.newProblemInstance(problemDefinition2, 2345L, SimSystem
            .getRNGGenerator().getRNGFactory().getFactoryInstance().getClass()
            .getName());
    perfDB.newProblemInstance(problemDefinition2, 2346L, SimSystem
        .getRNGGenerator().getRNGFactory().getFactoryInstance().getClass()
View Full Code Here

   */
  public void runtimeConfigurations() throws Exception {

    IProblemDefinition problemDefinition =
        perfDB.getAllProblemDefinitions().get(0);
    IProblemInstance problemInstance =
        perfDB.newProblemInstance(problemDefinition, 123L, SimSystem
            .getRNGGenerator().getRNGFactory().getFactoryInstance().getClass()
            .getName());
    SelectionTree selectionTree = new SelectionTree(null);
    IRuntimeConfiguration runtimeConfiguration =
View Full Code Here

TOP

Related Classes of org.jamesii.perfdb.entities.IProblemInstance

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.