Examples of ManipulationResponse


Examples of org.datacontract.schemas._2004._07.WCFService_Portal.ManipulationResponse

            SpeciesZoneType szt1 = new SpeciesZoneType(propertiesConfig.getProperty("defaultSpecies1Name"), 5, Integer.valueOf(propertiesConfig.getProperty("defaultSpecies1SpeciesCount")), Double.valueOf(propertiesConfig.getProperty("defaultSpecies1PerSpeciesBiomass")), 0.0, SpeciesTypeEnum.PLANT);
            SpeciesZoneType szt2 = new SpeciesZoneType(propertiesConfig.getProperty("defaultSpecies2Name"), 88, Integer.valueOf(propertiesConfig.getProperty("defaultSpecies2SpeciesCount")), Double.valueOf(propertiesConfig.getProperty("defaultSpecies2PerSpeciesBiomass")), 0.0, SpeciesTypeEnum.ANIMAL);
            speciesList.add(szt1);
            speciesList.add(szt2);           
            //Increasing carrying capacity of grass
            ManipulationResponse mResponse = modifyManipulatingParameters(speciesList, timestepIdx , true, response.getNetworkId());
           
            if(mResponse == null)
                return null;
            String manipulationId = mResponse.getManipulationId();
            String oldNetworkId = mResponse.getNetworksId();
//            deleteNetwork(response.getNetworkId()); // deleting old network made by NetworkCreationRequest
            //Increasing carrying capacity of buffalo
//            mResponse = modifyManipulatingParameters(szt2, timestepIdx, false, manipulationId);
//            deleteNetwork(oldNetworkId);  // deleting old network made by previous manipulation           
           
View Full Code Here

Examples of org.datacontract.schemas._2004._07.WCFService_Portal.ManipulationResponse

        smr.setNodeProperties(nps);
        smr.setSysParams(sysParams);
        smr.setDescription(" " + propertiesConfig.getProperty("addNewSpeciesTypeDescription"));
        smr.setSaveLastTimestepOnly(false);

        ManipulationResponse response = new ManipulationResponse();
        try {
            response = (ManipulationResponse) svc.executeManipulationRequest(smr);
            //TODO: Write web service call to database
        } catch (RemoteException e) {
            e.printStackTrace();
        }
        logTime("Total Time (Add Multiple Species Type): " + Math.round((System.currentTimeMillis() - milliseconds) / 10.0) / 100.0 + " seconds");
        String errMsg = response.getMessage();
        if (errMsg != null) {
            throw new SimulationException("Error (addMultipleSpeciesType): " + errMsg);
        }
        return response.getManipulationId();
    }   
View Full Code Here

Examples of org.datacontract.schemas._2004._07.WCFService_Portal.ManipulationResponse

        smr.setNodeProperties(nps);
        smr.setSysParams(sysParams);
        smr.setDescription(species.getName() + " " + propertiesConfig.getProperty("addNewSpeciesTypeDescription"));
        smr.setSaveLastTimestepOnly(false);

        ManipulationResponse response = new ManipulationResponse();
        try {
            response = (ManipulationResponse) svc.executeManipulationRequest(smr);
            //TODO: Write web service call to database
        } catch (RemoteException e) {
            e.printStackTrace();
        }
        String errMsg = response.getMessage();
        if (errMsg != null) {
            System.out.println("Error (addNewSpeciesType): " + errMsg);
            return null;
        } else {
            logTime("Total Time (Add New Species Type): " + Math.round((System.currentTimeMillis() - milliseconds) / 10.0) / 100.0 + " seconds");
            System.out.println("Adding: [" + species.getNodeIndex() + "] " + species.getName() + " " + species.getCurrentBiomass());
        }
        return response.getManipulationId();
    }
View Full Code Here

Examples of org.datacontract.schemas._2004._07.WCFService_Portal.ManipulationResponse

      smr.setManipulationId(networkOrManipulationId);     
    smr.setTimestepsToRun(Integer.valueOf(propertiesConfig.getProperty("timestepsToRunDefault")));
    smr.setManipulationModelNodes(nodes);
    smr.setDescription(species.getSpeciesCount() + " " + propertiesConfig.getProperty("addMoreSpeciesToExistingTypeDescription") + " " + species.getName());

    ManipulationResponse response = null;
    try
    {
      response = (ManipulationResponse) svc.executeManipulationRequest(smr);
      //TODO: Write web service call to database
    }
    catch (RemoteException e)
    {
      e.printStackTrace();
    }
    String errMsg = response.getMessage();
    if (errMsg != null)
    {
      System.err.println("Error:" + errMsg);
      return null;
    }
               
    return response.getManipulationId();
  }
View Full Code Here

Examples of org.datacontract.schemas._2004._07.WCFService_Portal.ManipulationResponse

      smr.setManipulationId(networkOrManipulationId);     
    smr.setTimestepsToRun(Integer.valueOf(propertiesConfig.getProperty("timestepsToRunDefault")));
    smr.setManipulationModelNodes(nodes);
    smr.setDescription(species.getSpeciesCount() + " " + propertiesConfig.getProperty("reduceSpeciesOfExistingTypeDescription") + " " + species.getName());

    ManipulationResponse response = null;
    try
    {
      response = (ManipulationResponse) svc.executeManipulationRequest(smr);
      //TODO: Write web service call to database
    }
    catch (RemoteException e)
    {
      e.printStackTrace();
    }
    String errMsg = response.getMessage();
    if (errMsg != null)
    {
      System.err.println("Error:" + errMsg);
      return null;
    }
    return response.getManipulationId();
  }
View Full Code Here

Examples of org.datacontract.schemas._2004._07.WCFService_Portal.ManipulationResponse

      smr.setManipulationId(networkOrManipulationId);     
    smr.setTimestepsToRun(Integer.valueOf(propertiesConfig.getProperty("timestepsToRunDefault")));
    smr.setManipulationModelNodes(nodes);
    smr.setDescription(species.getName() + " " + propertiesConfig.getProperty("removeSpeciesTypeDescription"));

    ManipulationResponse response = null;
    try
    {
      response = (ManipulationResponse) svc.executeManipulationRequest(smr);
      //TODO: Write web service call to database
    }
    catch (RemoteException e)
    {
      e.printStackTrace();
    }
    String errMsg = response.getMessage();
    if (errMsg != null)
    {
      System.err.println("Error:" + errMsg);
      return null;
    }
    return response.getManipulationId();
  }
View Full Code Here

Examples of org.datacontract.schemas._2004._07.WCFService_Portal.ManipulationResponse

        NodeBiomass nba[] = (NodeBiomass[]) lNodeBiomass.toArray(new NodeBiomass[0]);
        smr.setNodeBiomasses(nba);
        smr.setDescription(propertiesConfig.getProperty("updateBiomassDescription"));
        smr.setSaveLastTimestepOnly(false);

        ManipulationResponse response = null;
        try {
            response = (ManipulationResponse) svc.executeManipulationRequest(smr);
            //TODO: Write web service call to database
        } catch (Exception e) {
            e.printStackTrace();
        }

        logTime("Total Time (Update Biomass): " + Math.round((System.currentTimeMillis() - milliseconds) / 10.0) / 100.0 + " seconds");
        String errMsg = response.getMessage();
        if (errMsg != null) {
            throw new SimulationException("Error (updateBiomass): " + errMsg);
        }
    }
View Full Code Here

Examples of org.datacontract.schemas._2004._07.WCFService_Portal.ManipulationResponse

        smr.setDescription( "updateSystemParameters");
        smr.setSaveLastTimestepOnly(false);
        if(nodes != null)
            smr.setManipulationModelNodes(nodes.toArray(new ManipulatingNode[]{} ));

        ManipulationResponse response = null;
        try {
            response = (ManipulationResponse) svc.executeManipulationRequest(smr);
            //TODO: Write web service call to database
        } catch (RemoteException e) {
            e.printStackTrace();
        }
        String errMsg = response.getMessage();
        if (errMsg != null) {
            System.out.println("Error (updateSystemParameters): " + errMsg);
            return null;
        }
       
View Full Code Here

Examples of org.datacontract.schemas._2004._07.WCFService_Portal.ManipulationResponse

//        smr.setSysParams(this.CopySystemParameter(sParams));       
//        smr.setSysParams((ManipulatingParameter[])sParams.toArray());
        smr.setDescription( " " + propertiesConfig.getProperty("increaseCarryingCapacityDescription") + " " + propertiesConfig.getProperty("carryingCapacityDefault"));
        smr.setSaveLastTimestepOnly(false);

        ManipulationResponse response = null;
        try {
            response = (ManipulationResponse) svc.executeManipulationRequest(smr);
            //TODO: Write web service call to database
        } catch (RemoteException e) {
            e.printStackTrace();
        }
        String errMsg = response.getMessage();
        if (errMsg != null) {
            System.out.println("Error (modifyingManipulatingParameters): " + errMsg);
            return null;
        }
        return response;
View Full Code Here

Examples of org.datacontract.schemas._2004._07.WCFService_Portal.ManipulationResponse

        smr.setTimestepsToRun(timestepsToRun);
        smr.setDescription("Serengetti sub foodweb stability test - netId:" + netId);
        smr.setSaveLastTimestepOnly(false);
//        smr.setSysParams(sysParams);

        ManipulationResponse response = null;
        try {
            response = (ManipulationResponse) svc.executeManipulationRequest(smr);
        } catch (RemoteException e) {
            e.printStackTrace();
        }

        logTime("Total Time (Run): " + Math.round((System.currentTimeMillis() - milliseconds) / 10.0) / 100.0 + " seconds");

        String errMsg = response.getMessage();
        if (errMsg != null) {
            System.out.println("Error (run): " + errMsg);
            return null;
        } else {
            System.out.println("manpId:" + response.getManipulationId());
        }

        return response;
    }
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.