Examples of Experiment


Examples of eu.scape_project.planning.model.Experiment

        // add empty result files where missing (only for considered
        // alternatives!)
        List<SampleObject> allRecords = p.getSampleRecordsDefinition().getRecords();
        for (Alternative alternative : p.getAlternativesDefinition().getConsideredAlternatives()) {
            Experiment exp = alternative.getExperiment();

            for (SampleObject record : allRecords) {
                DigitalObject u = exp.getResults().get(record);

                if (u == null) {
                    exp.addRecord(record);
                    u = exp.getResults().get(record);
                }
            }
        }

    }
View Full Code Here

Examples of fr.irit.halterego.jocular.Experiment

            logger_.severe(gameId_ + ": Previous move list in STOP message was not a GDL list!");
            finish();
            return;
        }
       
        Experiment exp = ExperimentManager.getExp(gameId_);
        if(exp == null)
        {
            logger_.severe("No game found for play request ID: " + gameId_);
            finish();
            return;
        }
       
        exp.getGC().setMoves((GdlList)prevMoves);
        
        ExperimentManager.endExp(gameId_);
     
        //long start= System.currentTimeMillis();
        synchronized(exp)
View Full Code Here

Examples of fr.irit.halterego.jocular.Experiment

            if ( prevExp instanceof GdlAtom == false || prevExp.equals( GameManager.getParser().TOK_NIL ) == false )
                throw new IllegalArgumentException("PLAY request doesn't have LIST and doesn't have NIL atom as prev-moves!");
            prevMoves = null; // empty prev moves
        }
       
        final Experiment exp = ExperimentManager.getExp(gameId_);
        if(exp == null)
        {
            logger_.severe("No running experiment found for play request ID: " + gameId_);
            finish();
            return;
        }
       
        logger_.info(gameId_ + ": applying moves " + prevMovesStr);
       
        if(prevMoves != null)
        {
            exp.getGC().setMoves(prevMoves);
        }
       
        new Thread()
        {
            public void run()
            {
                try
                {
                    synchronized(exp)
                    {
                        exp.getGC().setRequestHandler(PlayRequestHandler.this);
                        if(prevMoves == null)
                        {
                            exp.start();
                        }
                        else
                        {
                            exp.step();
                        }
                    }
                }
                catch(Exception e)
                {
View Full Code Here

Examples of fr.irit.halterego.jocular.Experiment

        {
            throw new IllegalArgumentException( "START request should have exactly six arguments, not "
                    + content_.getSize() );
        }
       
        final Experiment exp = ExperimentManager.createExp(gameId_);
       
        if (exp != null)
        {
            logger_.info(gameId_ + ": Experiment successfully created.");
        }
        else
        {
            logger_.severe(gameId_ + ": Could not create experiment from start message!");
        }
        
        synchronized(exp)
        {
            exp.init(content_);
        }
       
        // Tell Game Master that we're ready.
        sendAnswer("READY");
               
View Full Code Here

Examples of org.apache.airavata.model.workspace.experiment.Experiment

     * @param experimentId
     * @return
     * @throws OrchestratorException
     */
    public List<TaskDetails> createTasks(String experimentId) throws OrchestratorException {
        Experiment experiment = null;
        List<TaskDetails> tasks = new ArrayList<TaskDetails>();
        try {
            Registry newRegistry = orchestratorContext.getNewRegistry();
            experiment = (Experiment) newRegistry.get(RegistryModelType.EXPERIMENT, experimentId);

View Full Code Here

Examples of org.apache.airavata.model.workspace.experiment.Experiment

        outMessage.addParameter("echo_output", echo_out);

        jobExecutionContext.setOutMessageContext(outMessage);

        jobExecutionContext.setExperimentID("test123");
        jobExecutionContext.setExperiment(new Experiment("test123","project1","admin","testExp"));
        jobExecutionContext.setTaskData(new TaskDetails(jobExecutionContext.getExperimentID()));
        jobExecutionContext.setRegistry(new LoggingRegistryImpl());
        jobExecutionContext.setWorkflowNodeDetails(new WorkflowNodeDetails(jobExecutionContext.getExperimentID(),"none", ExecutionUnit.APPLICATION));

View Full Code Here

Examples of org.apache.airavata.model.workspace.experiment.Experiment

        exOut.add(output);

        Project project = ProjectModelUtil.createProject("project1", "admin", "test project");
        String projectId = getClient().createProject(project);

        Experiment simpleExperiment =
                ExperimentModelUtil.createSimpleExperiment(projectId, "admin", "echoExperiment", appId, appId, exInputs);
        simpleExperiment.setExperimentOutputs(exOut);

        ComputationalResourceScheduling scheduling = ExperimentModelUtil.createComputationResourceScheduling(hostId, 1, 1, 1, "normal", 1, 0, 1, "sds128");
        scheduling.setResourceHostId(hostId);
        UserConfigurationData userConfigurationData = new UserConfigurationData();
        userConfigurationData.setAiravataAutoSchedule(false);
        userConfigurationData.setOverrideManualScheduledParams(false);
        userConfigurationData.setComputationalResourceScheduling(scheduling);
        simpleExperiment.setUserConfigurationData(userConfigurationData);

        log.info("Creating experiment...");

        final String expId = createExperiment(simpleExperiment);
        log.info("Experiment Id returned : " + expId);
View Full Code Here

Examples of org.apache.airavata.model.workspace.experiment.Experiment

   * *
   *
   * @param experimentId
   */
  public boolean launchExperiment(String experimentId) throws TException {
    Experiment experiment = null;
    try {
      List<String> ids = registry.getIds(
          RegistryModelType.WORKFLOW_NODE_DETAIL,
          WorkflowNodeConstants.EXPERIMENT_ID, experimentId);
      for (String workflowNodeId : ids) {
        WorkflowNodeDetails workflowNodeDetail = (WorkflowNodeDetails) registry
            .get(RegistryModelType.WORKFLOW_NODE_DETAIL,
                workflowNodeId);
        List<Object> taskDetailList = registry.get(
            RegistryModelType.TASK_DETAIL,
            TaskDetailConstants.NODE_ID, workflowNodeId);
        for (Object o : taskDetailList) {
          TaskDetails taskID = (TaskDetails) o;
          // iterate through all the generated tasks and performs the
          // job submisssion+monitoring
          experiment = (Experiment) registry.get(
              RegistryModelType.EXPERIMENT, experimentId);
          if (experiment == null) {
            log.error("Error retrieving the Experiment by the given experimentID: "
                + experimentId);
            return false;
          }
          ExperimentStatus status = new ExperimentStatus();
          status.setExperimentState(ExperimentState.LAUNCHED);
          status.setTimeOfStateChange(Calendar.getInstance()
              .getTimeInMillis());
          experiment.setExperimentStatus(status);
          registry.update(RegistryModelType.EXPERIMENT, experiment,
              experimentId);
          // launching the experiment
          orchestrator.launchExperiment(experiment,
              workflowNodeDetail, taskID,null);
        }
      }

    } catch (Exception e) {
      // Here we really do not have to do much because only potential
      // failure can happen
      // is in gfac, if there are errors in gfac, it will handle the
      // experiment/task/job statuses
      // We might get failures in registry access before submitting the
      // jobs to gfac, in that case we
      // leave the status of these as created.
      ExperimentStatus status = new ExperimentStatus();
      status.setExperimentState(ExperimentState.FAILED);
      status.setTimeOfStateChange(Calendar.getInstance()
          .getTimeInMillis());
      experiment.setExperimentStatus(status);
      try {
        registry.update(RegistryModelType.EXPERIMENT, experiment,
            experimentId);
      } catch (RegistryException e1) {
        throw new TException(e);
View Full Code Here

Examples of org.apache.airavata.model.workspace.experiment.Experiment

            TaskDetailConstants.NODE_ID, workflowNodeId);
        for (Object o : taskDetailList) {
          TaskDetails taskID = (TaskDetails) o;
          // iterate through all the generated tasks and performs the
          // job submisssion+monitoring
          Experiment experiment = (Experiment) registry.get(
              RegistryModelType.EXPERIMENT, experimentId);
          if (experiment == null) {
            log.error("Error retrieving the Experiment by the given experimentID: "
                + experimentId);
            return false;
View Full Code Here

Examples of org.apache.airavata.model.workspace.experiment.Experiment

        }
    }

    public  void updateExperimentStatus(String experimentId, ExperimentState state) throws Exception {
        logger.info("Updating the experiment status of experiment: " + experimentId + " to " + state.toString());
      Experiment details = (Experiment)airavataRegistry.get(RegistryModelType.EXPERIMENT, experimentId);
        if(details == null) {
            details = new Experiment();
            details.setExperimentID(experimentId);
        }
        org.apache.airavata.model.workspace.experiment.ExperimentStatus status = new org.apache.airavata.model.workspace.experiment.ExperimentStatus();
        status.setExperimentState(state);
        status.setTimeOfStateChange(Calendar.getInstance().getTimeInMillis());
        details.setExperimentStatus(status);
        airavataRegistry.update(RegistryModelType.EXPERIMENT_STATUS, status, experimentId);

    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.