Package org.datacontract.schemas._2004._07.LINQ2Entities

Examples of org.datacontract.schemas._2004._07.LINQ2Entities.Manipulation


            String manpId = se.createAndRunSeregenttiSubFoodweb(nodeList, "sg10Test27",0, 1, true);
            System.out.println("manpId:"+manpId);
           
            List<ManipulatingNode> nodes = new ArrayList<ManipulatingNode>();
            ManipulatingNode node = new ManipulatingNode();
            node.setTimestepIdx(1);
            node.setManipulationActionType(ManipulationActionType.SPECIES_PROLIFERATION.getManipulationActionType()); // proliferation
            node.setModelType(ModelType.CASCADE_MODEL.getModelType()); // cascading model
            node.setNodeIdx(4);
            node.setBeginingBiomass(2500);
            node.setHasLinks(false);
            nodes.add(node);


            node = new ManipulatingNode();
            node.setTimestepIdx(1);
            node.setManipulationActionType(ManipulationActionType.SPECIES_PROLIFERATION.getManipulationActionType()); // proliferation
            node.setModelType(ModelType.CASCADE_MODEL.getModelType()); // cascading model
            node.setNodeIdx(5);
            node.setBeginingBiomass(2500);
            node.setHasLinks(false);
            nodes.add(node);
           
/*           
            node = new ManipulatingNode();
            node.setTimestepIdx(1);
            node.setManipulationActionType(ManipulationActionType.SPECIES_PROLIFERATION.getManipulationActionType()); // proliferation
            node.setModelType(ModelType.CASCADE_MODEL.getModelType()); // cascading model
            node.setNodeIdx(73);
            node.setBeginingBiomass(100);
            node.setHasLinks(false);
            nodes.add(node);           
*/
           
            node = new ManipulatingNode();
            node.setTimestepIdx(1);
            node.setManipulationActionType(ManipulationActionType.SPECIES_INVASION.getManipulationActionType()); // invasion
            node.setModelType(ModelType.CASCADE_MODEL.getModelType()); // cascading model
            node.setNodeIdx(80);
            node.setBeginingBiomass(5);
            node.setHasLinks(false);
            node.setGameMode(true);           
            node.setOriginFoodwebId("74B9B375-1729-4516-A231-AE8A6114AACF");           
            nodes.add(node);                  
           
           
            List<ManipulatingParameter> sParams = new ArrayList<ManipulatingParameter>();
//            se.setNodeParameter(80, ManipulatingParameterName.r.getManipulatingParameterIndex(), 0.8, sParams);       
View Full Code Here


            String manpId = se.createAndRunSeregenttiSubFoodweb(nodeList, "sg10Test27",0, 1, true);
            System.out.println("manpId:"+manpId);
           
            List<ManipulatingNode> nodes = new ArrayList<ManipulatingNode>();
            ManipulatingNode node = new ManipulatingNode();
            node.setTimestepIdx(1);
            node.setManipulationActionType(ManipulationActionType.SPECIES_PROLIFERATION.getManipulationActionType()); // proliferation
            node.setModelType(ModelType.CASCADE_MODEL.getModelType()); // cascading model
            node.setNodeIdx(4);
            node.setBeginingBiomass(2500);
            node.setHasLinks(false);
            nodes.add(node);


            node = new ManipulatingNode();
            node.setTimestepIdx(1);
            node.setManipulationActionType(ManipulationActionType.SPECIES_PROLIFERATION.getManipulationActionType()); // proliferation
            node.setModelType(ModelType.CASCADE_MODEL.getModelType()); // cascading model
            node.setNodeIdx(5);
            node.setBeginingBiomass(2500);
            node.setHasLinks(false);
            nodes.add(node);
           
/*           
            node = new ManipulatingNode();
            node.setTimestepIdx(1);
            node.setManipulationActionType(ManipulationActionType.SPECIES_PROLIFERATION.getManipulationActionType()); // proliferation
            node.setModelType(ModelType.CASCADE_MODEL.getModelType()); // cascading model
            node.setNodeIdx(73);
            node.setBeginingBiomass(100);
            node.setHasLinks(false);
            nodes.add(node);           
*/
           
            node = new ManipulatingNode();
            node.setTimestepIdx(1);
            node.setManipulationActionType(ManipulationActionType.SPECIES_INVASION.getManipulationActionType()); // invasion
            node.setModelType(ModelType.CASCADE_MODEL.getModelType()); // cascading model
            node.setNodeIdx(80);
            node.setBeginingBiomass(5);
            node.setHasLinks(false);
            node.setGameMode(true);           
            node.setOriginFoodwebId("74B9B375-1729-4516-A231-AE8A6114AACF");           
            nodes.add(node);                  
           
           
            List<ManipulatingParameter> sParams = new ArrayList<ManipulatingParameter>();
//            se.setNodeParameter(80, ManipulatingParameterName.r.getManipulatingParameterIndex(), 0.8, sParams);                       
View Full Code Here

            // Fruits and nectar, Grains and seeds, Grass and herbs,  Trees and shrubs, Leopard, Lion, Topi, Buffalo, Southern eland, Nile crocodile
            String manpId = this.createAndRunSeregenttiSubFoodweb(nodeList, "sg10Test27",0, 1, true);
            System.out.println("manpId:"+manpId);
           
            List<ManipulatingNode> nodes = new ArrayList<ManipulatingNode>();
            ManipulatingNode node = new ManipulatingNode();
            node.setTimestepIdx(1);
            node.setManipulationActionType(ManipulationActionType.SPECIES_PROLIFERATION.getManipulationActionType()); // proliferation
            node.setModelType(ModelType.CASCADE_MODEL.getModelType()); // cascading model
            node.setNodeIdx(4);
            node.setBeginingBiomass(500);
            node.setHasLinks(false);
            nodes.add(node);


            node = new ManipulatingNode();
            node.setTimestepIdx(1);
            node.setManipulationActionType(ManipulationActionType.SPECIES_PROLIFERATION.getManipulationActionType()); // proliferation
            node.setModelType(ModelType.CASCADE_MODEL.getModelType()); // cascading model
            node.setNodeIdx(5);
            node.setBeginingBiomass(500);
            node.setHasLinks(false);
            nodes.add(node);
           

           
            node = new ManipulatingNode();
            node.setTimestepIdx(1);
            node.setManipulationActionType(ManipulationActionType.SPECIES_INVASION.getManipulationActionType()); // invasion
            node.setModelType(ModelType.CASCADE_MODEL.getModelType()); // cascading model
            node.setNodeIdx(80);
            node.setBeginingBiomass(30);
            node.setHasLinks(false);
            node.setGameMode(true);           
            node.setOriginFoodwebId(propertiesConfig.getProperty("serengetiNetworkId"));           
            nodes.add(node);                  
           
           
            List<ManipulatingParameter> sParams = new ArrayList<ManipulatingParameter>();
            this.setNodeParameter(5, ManipulatingParameterName.k.getManipulatingParameterIndex(), 1000, sParams);
View Full Code Here

            String manpId = this.createAndRunSeregenttiSubFoodweb(nodeList, "sg10Test27",0, 1, true);
            System.out.println("manpId:"+manpId);
           
            List<ManipulatingNode> nodes = new ArrayList<ManipulatingNode>();
            ManipulatingNode node = new ManipulatingNode();
            node.setTimestepIdx(1);
            node.setManipulationActionType(ManipulationActionType.SPECIES_PROLIFERATION.getManipulationActionType()); // proliferation
            node.setModelType(ModelType.CASCADE_MODEL.getModelType()); // cascading model
            node.setNodeIdx(4);
            node.setBeginingBiomass(2500);
            node.setHasLinks(false);
            nodes.add(node);


            node = new ManipulatingNode();
            node.setTimestepIdx(1);
            node.setManipulationActionType(ManipulationActionType.SPECIES_PROLIFERATION.getManipulationActionType()); // proliferation
            node.setModelType(ModelType.CASCADE_MODEL.getModelType()); // cascading model
            node.setNodeIdx(5);
            node.setBeginingBiomass(2500);
            node.setHasLinks(false);
            nodes.add(node);
           
           
            node = new ManipulatingNode();
            node.setTimestepIdx(1);
            node.setManipulationActionType(ManipulationActionType.SPECIES_PROLIFERATION.getManipulationActionType()); // proliferation
            node.setModelType(ModelType.CASCADE_MODEL.getModelType()); // cascading model
            node.setNodeIdx(73);
            node.setBeginingBiomass(80);
            node.setHasLinks(false);
            nodes.add(node);           

/*           
            node = new ManipulatingNode();
            node.setTimestepIdx(1);
View Full Code Here

        {
            int nodeList[] = {1,9};
            String manpId = createAndRunSeregenttiSubFoodweb(nodeList, "testNode4and73", 0, 1, true);
                   
           List<ManipulatingNode> nodes = new ArrayList<ManipulatingNode>();
            ManipulatingNode node = new ManipulatingNode();
            node.setTimestepIdx(1);
            node.setManipulationActionType(ManipulationActionType.SPECIES_PROLIFERATION.getManipulationActionType()); // proliferation
            node.setModelType(ModelType.CASCADE_MODEL.getModelType()); // cascading model
            node.setNodeIdx(1);
            node.setBeginingBiomass(2000);
            node.setHasLinks(false);
            nodes.add(node);


            node = new ManipulatingNode();
            node.setTimestepIdx(1);
            node.setManipulationActionType(ManipulationActionType.SPECIES_PROLIFERATION.getManipulationActionType()); // proliferation
            node.setModelType(ModelType.CASCADE_MODEL.getModelType()); // cascading model
            node.setNodeIdx(9);
            node.setBeginingBiomass(10);
            node.setHasLinks(false);
            nodes.add(node);

           
            List<ManipulatingParameter> sParams = new ArrayList<ManipulatingParameter>();
            this.setNodeParameter(1, ManipulatingParameterName.k.getManipulatingParameterIndex(), 4000, sParams);
            this.setNodeParameter(9, ManipulatingParameterName.x.getManipulatingParameterIndex(), 0.75, 1, sParams);           
//            this.setNodeParameter(12, ManipulatingParameterName.x.getManipulatingParameterIndex(), 0.9, sParams);                       
//            this.setNodeParameter(5, ManipulatingParameterName.k.getManipulatingParameterIndex(), 5000, sParams);           
//            this.setNodeParameter(4, ManipulatingParameterName.r.getManipulatingParameterIndex(), , sParams);
//            this.setNodeParameter(5, ManipulatingParameterName.r.getManipulatingParameterIndex(), 0.333, sParams);           

//            this.setLinkParameter(73, 4, ManipulatingParameterName.a.getManipulatingParameterIndex(), 0.6, 1, sParams);           
//            this.setLinkParameter(73, 5, ManipulatingParameterName.a.getManipulatingParameterIndex(), 0.4, 1, sParams);                       
            updateSystemParameters(1, false, manpId, sParams, nodes);

///            testParameters(manpId, sParams);
//            run(2, 8, manpId, false);                       

          
            nodes = new ArrayList<ManipulatingNode>();
            node = new ManipulatingNode();
            node.setTimestepIdx(2);
            node.setManipulationActionType(ManipulationActionType.SPECIES_INVASION.getManipulationActionType()); // invasion
            node.setModelType(ModelType.CASCADE_MODEL.getModelType()); // cascading model
            node.setNodeIdx(12);
            node.setBeginingBiomass(10);
            node.setHasLinks(false);
            node.setGameMode(true);           
            node.setOriginFoodwebId(propertiesConfig.getProperty("serengetiNetworkId"));           
            nodes.add(node);            
           
            sParams = new ArrayList<ManipulatingParameter>();
            this.setNodeParameter(12, ManipulatingParameterName.x.getManipulatingParameterIndex(), 0.85, 2, sParams);                       
//            this.setLinkParameter(9, 1, ManipulatingParameterName.a.getManipulatingParameterIndex(), 0.05, 1, sParams);           
//            this.setLinkParameter(9, 9, ManipulatingParameterName.a.getManipulatingParameterIndex(), 0.3, 1, sParams);                       
//            this.setLinkParameter(9, 12, ManipulatingParameterName.a.getManipulatingParameterIndex(), 0.65, 1, sParams);                       
           
//            this.setLinkParameter(73, 4, ManipulatingParameterName.d.getManipulatingParameterIndex(), 1, 3, sParams);
//            this.setNodeParameter(73, ManipulatingParameterName.x.getManipulatingParameterIndex(), 0.9, sParams);
//            this.setNodeParameter(5, ManipulatingParameterName.r.getManipulatingParameterIndex(), 0.333, sParams);           
            updateSystemParameters(2, false, manpId, sParams, nodes);  
//            run(3, 27, manpId, false);                         
           

            nodes = new ArrayList<ManipulatingNode>();
            node = new ManipulatingNode();
            node.setTimestepIdx(3);
            node.setManipulationActionType(ManipulationActionType.SPECIES_INVASION.getManipulationActionType()); // invasion
            node.setModelType(ModelType.CASCADE_MODEL.getModelType()); // cascading model
            node.setNodeIdx(20);
            node.setBeginingBiomass(4);
            node.setHasLinks(false);
            node.setGameMode(true);           
            node.setOriginFoodwebId(propertiesConfig.getProperty("serengetiNetworkId"));           
            nodes.add(node);            

            node = new ManipulatingNode();
            node.setTimestepIdx(3);
            node.setManipulationActionType(ManipulationActionType.SPECIES_INVASION.getManipulationActionType()); // invasion
            node.setModelType(ModelType.CASCADE_MODEL.getModelType()); // cascading model
            node.setNodeIdx(25);
            node.setBeginingBiomass(5);
            node.setHasLinks(false);
            node.setGameMode(true);           
            node.setOriginFoodwebId(propertiesConfig.getProperty("serengetiNetworkId"));           
            nodes.add(node);            
           
            node = new ManipulatingNode();
            node.setTimestepIdx(3);
            node.setManipulationActionType(ManipulationActionType.SPECIES_PROLIFERATION.getManipulationActionType()); // proliferation
            node.setModelType(ModelType.CASCADE_MODEL.getModelType()); // cascading model
            node.setNodeIdx(1);
            node.setBeginingBiomass(2000);
            node.setHasLinks(false);
            nodes.add(node);           
           
            sParams = new ArrayList<ManipulatingParameter>();
            this.setNodeParameter(20, ManipulatingParameterName.x.getManipulatingParameterIndex(), 0.65, 3, sParams);             
//            this.setLinkParameter(73, 4, ManipulatingParameterName.a.getManipulatingParameterIndex(), 0.6, 1, sParams);           
           
            updateSystemParameters(3, false, manpId, sParams, nodes);  
//            run(4, 22, manpId, false);                       
           
           
          
            nodes = new ArrayList<ManipulatingNode>();
            node = new ManipulatingNode();
            node.setTimestepIdx(4);
            node.setManipulationActionType(ManipulationActionType.SPECIES_INVASION.getManipulationActionType()); // invasion
            node.setModelType(ModelType.CASCADE_MODEL.getModelType()); // cascading model
            node.setNodeIdx(75);
            node.setBeginingBiomass(10);
            node.setHasLinks(false);
            node.setGameMode(true);           
            node.setOriginFoodwebId(propertiesConfig.getProperty("serengetiNetworkId"));           
            nodes.add(node);            

           
            node = new ManipulatingNode();
            node.setTimestepIdx(4);
            node.setManipulationActionType(ManipulationActionType.SPECIES_INVASION.getManipulationActionType()); // invasion
            node.setModelType(ModelType.CASCADE_MODEL.getModelType()); // cascading model
            node.setNodeIdx(5);
            node.setBeginingBiomass(3000);
            node.setHasLinks(false);
            node.setGameMode(true);           
            node.setOriginFoodwebId(propertiesConfig.getProperty("serengetiNetworkId"));           
            nodes.add(node);            
           
           
           
            sParams = new ArrayList<ManipulatingParameter>();
            this.setNodeParameter(5, ManipulatingParameterName.k.getManipulatingParameterIndex(), 4000, sParams);           
            this.setNodeParameter(75, ManipulatingParameterName.x.getManipulatingParameterIndex(), 0.4, 4, sParams);             
            updateSystemParameters(4, false, manpId, sParams, nodes);  
           

           
            nodes = new ArrayList<ManipulatingNode>();
            node = new ManipulatingNode();
            node.setTimestepIdx(5);
            node.setManipulationActionType(ManipulationActionType.SPECIES_INVASION.getManipulationActionType()); // invasion
            node.setModelType(ModelType.CASCADE_MODEL.getModelType()); // cascading model
            node.setNodeIdx(57);
            node.setBeginingBiomass(10);
            node.setHasLinks(false);
            node.setGameMode(true);           
            node.setOriginFoodwebId(propertiesConfig.getProperty("serengetiNetworkId"));           
            nodes.add(node);            
           
            node = new ManipulatingNode();
            node.setTimestepIdx(5);
            node.setManipulationActionType(ManipulationActionType.SPECIES_PROLIFERATION.getManipulationActionType()); // proliferation
            node.setModelType(ModelType.CASCADE_MODEL.getModelType()); // cascading model
            node.setNodeIdx(1);
            node.setBeginingBiomass(2000);
            node.setHasLinks(false);
            nodes.add(node);           
            node = new ManipulatingNode();
            node.setTimestepIdx(5);
            node.setManipulationActionType(ManipulationActionType.SPECIES_PROLIFERATION.getManipulationActionType()); // proliferation
            node.setModelType(ModelType.CASCADE_MODEL.getModelType()); // cascading model
            node.setNodeIdx(5);
            node.setBeginingBiomass(2000);
            node.setHasLinks(false);
            node.setOriginFoodwebId(propertiesConfig.getProperty("serengetiNetworkId"));           
            nodes.add(node);            

           
           
            sParams = new ArrayList<ManipulatingParameter>();
            this.setNodeParameter(57, ManipulatingParameterName.x.getManipulatingParameterIndex(), 0.35, 5, sParams);             
            updateSystemParameters(5, false, manpId, sParams, nodes);  
           

            nodes = new ArrayList<ManipulatingNode>();
            node = new ManipulatingNode();
            node.setTimestepIdx(6);
            node.setManipulationActionType(ManipulationActionType.SPECIES_INVASION.getManipulationActionType()); // invasion
            node.setModelType(ModelType.CASCADE_MODEL.getModelType()); // cascading model
            node.setNodeIdx(49);
            node.setBeginingBiomass(10);
            node.setHasLinks(false);
            node.setGameMode(true);           
            node.setOriginFoodwebId(propertiesConfig.getProperty("serengetiNetworkId"));           
            nodes.add(node);            

            sParams = new ArrayList<ManipulatingParameter>();
            this.setNodeParameter(49, ManipulatingParameterName.x.getManipulatingParameterIndex(), 0.3, 6, sParams);             
            updateSystemParameters(6, false, manpId, sParams, nodes);  
           
           

            nodes = new ArrayList<ManipulatingNode>();
            node = new ManipulatingNode();
            node.setTimestepIdx(7);
            node.setManipulationActionType(ManipulationActionType.SPECIES_PROLIFERATION.getManipulationActionType()); // proliferation
            node.setModelType(ModelType.CASCADE_MODEL.getModelType()); // cascading model
            node.setNodeIdx(1);
            node.setBeginingBiomass(2000);
            node.setHasLinks(false);
            nodes.add(node);           
            sParams = new ArrayList<ManipulatingParameter>();
            node = new ManipulatingNode();
            node.setTimestepIdx(7);
            node.setManipulationActionType(ManipulationActionType.SPECIES_PROLIFERATION.getManipulationActionType()); // proliferation
            node.setModelType(ModelType.CASCADE_MODEL.getModelType()); // cascading model
            node.setNodeIdx(5);
            node.setBeginingBiomass(2000);
            node.setHasLinks(false);
            node.setOriginFoodwebId(propertiesConfig.getProperty("serengetiNetworkId"));           
            nodes.add(node);            
           
           
            updateSystemParameters(7, false, manpId, sParams, nodes);  
           

            run(8, 1, manpId, false);
            nodes = new ArrayList<ManipulatingNode>();
            node = new ManipulatingNode();
            node.setTimestepIdx(9);
            node.setManipulationActionType(ManipulationActionType.SPECIES_PROLIFERATION.getManipulationActionType()); // proliferation
            node.setModelType(ModelType.CASCADE_MODEL.getModelType()); // cascading model
            node.setNodeIdx(1);
            node.setBeginingBiomass(2000);
            node.setHasLinks(false);
            nodes.add(node);    
            node = new ManipulatingNode();
            node.setTimestepIdx(9);
            node.setManipulationActionType(ManipulationActionType.SPECIES_PROLIFERATION.getManipulationActionType()); // proliferation
            node.setModelType(ModelType.CASCADE_MODEL.getModelType()); // cascading model
            node.setNodeIdx(5);
            node.setBeginingBiomass(2000);
            node.setHasLinks(false);
            node.setOriginFoodwebId(propertiesConfig.getProperty("serengetiNetworkId"));           
            nodes.add(node);            
           
            sParams = new ArrayList<ManipulatingParameter>();
            updateSystemParameters(9, false, manpId, sParams, nodes);  
           
           
            run(10, 1, manpId, false);
            nodes = new ArrayList<ManipulatingNode>();
            node = new ManipulatingNode();
            node.setTimestepIdx(11);
            node.setManipulationActionType(ManipulationActionType.SPECIES_PROLIFERATION.getManipulationActionType()); // proliferation
            node.setModelType(ModelType.CASCADE_MODEL.getModelType()); // cascading model
            node.setNodeIdx(1);
            node.setBeginingBiomass(2000);
            node.setHasLinks(false);
            nodes.add(node);    
            node = new ManipulatingNode();
            node.setTimestepIdx(11);
            node.setManipulationActionType(ManipulationActionType.SPECIES_PROLIFERATION.getManipulationActionType()); // proliferation
            node.setModelType(ModelType.CASCADE_MODEL.getModelType()); // cascading model
            node.setNodeIdx(5);
            node.setBeginingBiomass(2000);
            node.setHasLinks(false);
            node.setOriginFoodwebId(propertiesConfig.getProperty("serengetiNetworkId"));           
            nodes.add(node);            
           
            sParams = new ArrayList<ManipulatingParameter>();
            updateSystemParameters(11, false, manpId, sParams, nodes);  
           
           
            run(12, 1, manpId, false);
            nodes = new ArrayList<ManipulatingNode>();
            node = new ManipulatingNode();
            node.setTimestepIdx(13);
            node.setManipulationActionType(ManipulationActionType.SPECIES_PROLIFERATION.getManipulationActionType()); // proliferation
            node.setModelType(ModelType.CASCADE_MODEL.getModelType()); // cascading model
            node.setNodeIdx(1);
            node.setBeginingBiomass(2000);
            node.setHasLinks(false);
            nodes.add(node);     
            node = new ManipulatingNode();
            node.setTimestepIdx(13);
            node.setManipulationActionType(ManipulationActionType.SPECIES_PROLIFERATION.getManipulationActionType()); // proliferation
            node.setModelType(ModelType.CASCADE_MODEL.getModelType()); // cascading model
            node.setNodeIdx(5);
            node.setBeginingBiomass(2000);
            node.setHasLinks(false);
            node.setOriginFoodwebId(propertiesConfig.getProperty("serengetiNetworkId"));           
            nodes.add(node);            
           
            sParams = new ArrayList<ManipulatingParameter>();
            updateSystemParameters(13, false, manpId, sParams, nodes);              

           
            run(14, 1, manpId, false);
            nodes = new ArrayList<ManipulatingNode>();
            node = new ManipulatingNode();
            node.setTimestepIdx(15);
            node.setManipulationActionType(ManipulationActionType.SPECIES_PROLIFERATION.getManipulationActionType()); // proliferation
            node.setModelType(ModelType.CASCADE_MODEL.getModelType()); // cascading model
            node.setNodeIdx(1);
            node.setBeginingBiomass(2000);
            node.setHasLinks(false);
            nodes.add(node);     
            node = new ManipulatingNode();
            node.setTimestepIdx(15);
            node.setManipulationActionType(ManipulationActionType.SPECIES_PROLIFERATION.getManipulationActionType()); // proliferation
            node.setModelType(ModelType.CASCADE_MODEL.getModelType()); // cascading model
            node.setNodeIdx(5);
            node.setBeginingBiomass(2000);
            node.setHasLinks(false);
            node.setOriginFoodwebId(propertiesConfig.getProperty("serengetiNetworkId"));           
            nodes.add(node);            
           
            sParams = new ArrayList<ManipulatingParameter>();
            updateSystemParameters(15, false, manpId, sParams, nodes);              

            run(16, 1, manpId, false);
            nodes = new ArrayList<ManipulatingNode>();
            node = new ManipulatingNode();
            node.setTimestepIdx(17);
            node.setManipulationActionType(ManipulationActionType.SPECIES_PROLIFERATION.getManipulationActionType()); // proliferation
            node.setModelType(ModelType.CASCADE_MODEL.getModelType()); // cascading model
            node.setNodeIdx(1);
            node.setBeginingBiomass(2000);
            node.setHasLinks(false);
            nodes.add(node);    
            node = new ManipulatingNode();
            node.setTimestepIdx(17);
            node.setManipulationActionType(ManipulationActionType.SPECIES_PROLIFERATION.getManipulationActionType()); // proliferation
            node.setModelType(ModelType.CASCADE_MODEL.getModelType()); // cascading model
            node.setNodeIdx(5);
            node.setBeginingBiomass(2000);
            node.setHasLinks(false);
            node.setOriginFoodwebId(propertiesConfig.getProperty("serengetiNetworkId"));           
            nodes.add(node);            
           
            sParams = new ArrayList<ManipulatingParameter>();
            updateSystemParameters(17, false, manpId, sParams, nodes);              

            run(18, 1, manpId, false);
            nodes = new ArrayList<ManipulatingNode>();
            node = new ManipulatingNode();
            node.setTimestepIdx(19);
            node.setManipulationActionType(ManipulationActionType.SPECIES_PROLIFERATION.getManipulationActionType()); // proliferation
            node.setModelType(ModelType.CASCADE_MODEL.getModelType()); // cascading model
            node.setNodeIdx(1);
            node.setBeginingBiomass(2000);
            node.setHasLinks(false);
            nodes.add(node);     
            node = new ManipulatingNode();
            node.setTimestepIdx(19);
            node.setManipulationActionType(ManipulationActionType.SPECIES_PROLIFERATION.getManipulationActionType()); // proliferation
            node.setModelType(ModelType.CASCADE_MODEL.getModelType()); // cascading model
            node.setNodeIdx(5);
            node.setBeginingBiomass(2000);
            node.setHasLinks(false);
            node.setOriginFoodwebId(propertiesConfig.getProperty("serengetiNetworkId"));           
            nodes.add(node);            
           
            sParams = new ArrayList<ManipulatingParameter>();
            updateSystemParameters(19, false, manpId, sParams, nodes);              
View Full Code Here

            node.setNodeName(species.getName()); // set node name           
            node.setOriginFoodwebId(propertiesConfig.getProperty("serengetiNetworkId"));           
            nodes[i++] = node;
           
            //Connectance
            ManipulatingNodeProperty mnp = new ManipulatingNodeProperty();
            mnp.setNodeIdx(species.getNodeIndex());           
            mnp.setNodePropertyName(ManipulatingNodePropertyName.Connectance.name());
            mnp.setNodePropertyValue(Double.valueOf(propertiesConfig.getProperty("connectanceDefault")));
            lManipulatingNodeProperty.add(mnp);
            //Probability
            mnp = new ManipulatingNodeProperty();
            mnp.setNodeIdx(species.getNodeIndex());           
            mnp.setNodePropertyName(ManipulatingNodePropertyName.Probability.name());
            mnp.setNodePropertyValue(Double.valueOf(propertiesConfig.getProperty("probabilityDefault"))); // if this value is low, invasion may fail.
            lManipulatingNodeProperty.add(mnp);
            //SpeciesZoneType count
            mnp = new ManipulatingNodeProperty();
            mnp.setNodeIdx(species.getNodeIndex());           
            mnp.setNodePropertyName(ManipulatingNodePropertyName.SpeciesCount.name());
            mnp.setNodePropertyValue(species.getSpeciesCount());
            lManipulatingNodeProperty.add(mnp);
           
            List<ManipulatingParameter> params = this.getSystemParameter(species, timestep);           
            sysParamList.addAll(params);
View Full Code Here

        nodes[0] = node;               


        List<ManipulatingNodeProperty> lManipulatingNodeProperty = new ArrayList<ManipulatingNodeProperty>();
        //Connectance
        ManipulatingNodeProperty mnp = new ManipulatingNodeProperty();
        mnp.setNodePropertyName(ManipulatingNodePropertyName.Connectance.name());
        mnp.setNodePropertyValue(Double.valueOf(propertiesConfig.getProperty("connectanceDefault")));
        lManipulatingNodeProperty.add(mnp);
        //Probability
        mnp = new ManipulatingNodeProperty();
        mnp.setNodePropertyName(ManipulatingNodePropertyName.Probability.name());
        mnp.setNodePropertyValue(Double.valueOf(propertiesConfig.getProperty("probabilityDefault"))); // if this value is low, invasion may fail.
        lManipulatingNodeProperty.add(mnp);
        //SpeciesZoneType count
        mnp = new ManipulatingNodeProperty();
        mnp.setNodePropertyName(ManipulatingNodePropertyName.SpeciesCount.name());
        mnp.setNodePropertyValue(species.getSpeciesCount());
        lManipulatingNodeProperty.add(mnp);

        List<ManipulatingParameter> params = this.getSystemParameter(species, timestep);
       
        ManipulatingNodeProperty[] nps = (ManipulatingNodeProperty[]) lManipulatingNodeProperty.toArray(new ManipulatingNodeProperty[0]);       
View Full Code Here

        return null;
    }   
   
   public String setLinkParameter(int predIdx, int preyIdx, int paramIdx, double paramValue, int tsIdx, List<ManipulatingParameter> sParams )
    {
        ManipulatingParameter param = new ManipulatingParameter();       
       
        if(paramIdx == ManipulatingParameterName.e.getManipulatingParameterIndex())
        {
            if(paramValue < 0 || paramValue > 1)
                return "Assimilation efficiency rate should be between 0 and 1";
            param.setParamType(ManipulatingParameterName.e.getManipulatingParameterType());
            param.setParamName(ManipulatingParameterName.e.name());
            param.setParamIdx(ManipulatingParameterName.e.getManipulatingParameterIndex());           
            param.setPredIdx(predIdx);
            param.setPreyIdx(preyIdx);
            param.setTimestepIdx(tsIdx);
            param.setParamValue(paramValue);           
        }
        else if(paramIdx == ManipulatingParameterName.a.getManipulatingParameterIndex())
        {
            if(paramValue < 0 || paramValue > 1)
                return "Relative Half Saturation Density should be between 0 and 1";
            param.setParamType(ManipulatingParameterName.a.getManipulatingParameterType());
            param.setParamName(ManipulatingParameterName.a.name());
            param.setParamIdx(ManipulatingParameterName.a.getManipulatingParameterIndex());           
            param.setPredIdx(predIdx);
            param.setPreyIdx(preyIdx);
            param.setParamValue(paramValue);           
            param.setTimestepIdx(tsIdx);           
        }
        else if(paramIdx == ManipulatingParameterName.q.getManipulatingParameterIndex())
        {
            param.setParamType(ManipulatingParameterName.q.getManipulatingParameterType());
            param.setParamName(ManipulatingParameterName.q.name());
            param.setParamIdx(ManipulatingParameterName.q.getManipulatingParameterIndex());           
            param.setPredIdx(predIdx);
            param.setPreyIdx(preyIdx);
            param.setParamValue(paramValue);           
            param.setTimestepIdx(tsIdx);           
        }
        else if(paramIdx == ManipulatingParameterName.d.getManipulatingParameterIndex())
        {
            param.setParamType(ManipulatingParameterName.d.getManipulatingParameterType());
            param.setParamName(ManipulatingParameterName.d.name());
            param.setParamIdx(ManipulatingParameterName.d.getManipulatingParameterIndex());           
            param.setPredIdx(predIdx);
            param.setPreyIdx(preyIdx);
            param.setParamValue(paramValue);           
            param.setTimestepIdx(tsIdx);
        }
        else if(paramIdx == ManipulatingParameterName.b0.getManipulatingParameterIndex())
        {
            param.setParamType(ManipulatingParameterName.b0.getManipulatingParameterType());
            param.setParamName(ManipulatingParameterName.b0.name());
            param.setParamIdx(ManipulatingParameterName.b0.getManipulatingParameterIndex());           
            param.setPredIdx(predIdx);
            param.setPreyIdx(preyIdx);
            param.setParamValue(paramValue);           
            param.setTimestepIdx(tsIdx);
        }       
       
        else
        {
            return "that type of link parameter is not supported yet";
View Full Code Here

            // for example, if carrying capacity is 10, maximum biomass of species is 10.
            // Higher growth rate means that species with higher growth rate will gain biomass faster.
            // Metabolic rate (x) are effective for both animals and plants
            // higher metabolic rate means that biomass of species will decrease compared to other species

            ManipulatingParameter param = new ManipulatingParameter();
            param.setParamType(ManipulatingParameterName.k.getManipulatingParameterType());
            param.setParamName(ManipulatingParameterName.k.name());
            param.setNodeIdx(nodeIdx);
            param.setParamIdx(ManipulatingParameterName.k.getManipulatingParameterIndex());
               // parameter k, r, x can't have negative value. if they have negative value, it means that data is not assigned yet.)
            double paramKVal = species.getParamK();
            if(paramKVal < 0)
                param.setParamValue(Double.valueOf(propertiesConfig.getProperty("carryingCapacityDefault")));
            else
                param.setParamValue(paramKVal);           

            param.setTimestepIdx(timestepIdx);                   
            sParams.add(param);

            param = new ManipulatingParameter();
            param.setParamType(ManipulatingParameterName.r.getManipulatingParameterType());
            param.setParamName(ManipulatingParameterName.r.name());
            param.setNodeIdx(nodeIdx);
            param.setParamIdx(ManipulatingParameterName.r.getManipulatingParameterIndex());
            double paramRVal = species.getParamR();
            if(paramRVal < 0)
                param.setParamValue(Double.valueOf(propertiesConfig.getProperty("growthRateDefault")));
            else
                param.setParamValue(paramRVal);                       
            param.setTimestepIdx(timestepIdx);                   
            sParams.add(param);
           
            param = new ManipulatingParameter();
            param.setParamType(ManipulatingParameterName.x.getManipulatingParameterType());
            param.setParamName(ManipulatingParameterName.x.name());
            param.setNodeIdx(nodeIdx);
            param.setParamIdx(ManipulatingParameterName.x.getManipulatingParameterIndex());
            double paramXVal = species.getParamR();
            if(paramXVal < 0)
                param.setParamValue(Double.valueOf(propertiesConfig.getProperty("metabolicRateDefault")));
            else
                param.setParamValue(paramXVal);           
            param.setTimestepIdx(timestepIdx);                   
            sParams.add(param);           
        }
        else if(type == SpeciesTypeEnum.ANIMAL)
        {

            // Metabolic rate (x) are effective for both animals and plants           
            // higher metabolic rate means that biomass of species will decrease compared to other species           
            // Assimilation efficiency (e) is only available for animals.
            // higher assimilation efficiency means that biomass of species will increase.
           
            ManipulatingParameter param = new ManipulatingParameter();
            param.setParamType(ManipulatingParameterName.x.getManipulatingParameterType());
            param.setParamName(ManipulatingParameterName.x.name());
            param.setNodeIdx(nodeIdx);
            param.setParamIdx(ManipulatingParameterName.x.getManipulatingParameterIndex());
            double paramXVal = species.getParamR();
            if(paramXVal < 0)
                param.setParamValue(Double.valueOf(propertiesConfig.getProperty("metabolicRateDefault")));
            else
                param.setParamValue(paramXVal);           
            param.setTimestepIdx(timestepIdx);                   
            sParams.add(param);
           
            List<Integer> preys = species.getlPreyIndex();
            if(preys != null)
            {
                for(Integer prey: preys)
                {
                    param = new ManipulatingParameter();
                    param.setParamType(ManipulatingParameterName.e.getManipulatingParameterType());
                    param.setParamName(ManipulatingParameterName.e.name());
                    param.setPredIdx(nodeIdx);
                    param.setPreyIdx(prey);
                    param.setParamIdx(ManipulatingParameterName.e.getManipulatingParameterIndex());
                    if(species.getParamE() != null && species.getParamE(prey) != null)
                        param.setParamValue(species.getParamE(prey).getParamValue());                           
                    else
                        param.setParamValue(Double.valueOf(propertiesConfig.getProperty("assimilationEfficiencyDefault")));
                    param.setTimestepIdx(timestepIdx);                   
                    sParams.add(param);
                }

                for(Integer prey: preys)
                {
                    param = new ManipulatingParameter();
                    param.setParamType(ManipulatingParameterName.a.getManipulatingParameterType());
                    param.setParamName(ManipulatingParameterName.a.name());
                    param.setPredIdx(nodeIdx);
                    param.setPreyIdx(prey);
                    param.setParamIdx(ManipulatingParameterName.a.getManipulatingParameterIndex());
                    if(species.getParamA() != null && species.getParamA(prey) != null)
                        param.setParamValue(species.getParamA(prey).getParamValue());                           
                    else
                        param.setParamValue(Double.valueOf(propertiesConfig.getProperty("relativeHalfSaturationDensityDefault")));
                    param.setTimestepIdx(timestepIdx);                   
                    sParams.add(param);
                }
           
                for(Integer prey: preys)
                {
                    param = new ManipulatingParameter();
                    param.setParamType(ManipulatingParameterName.q.getManipulatingParameterType());
                    param.setParamName(ManipulatingParameterName.q.name());
                    param.setPredIdx(nodeIdx);
                    param.setPreyIdx(prey);
                    param.setParamIdx(ManipulatingParameterName.q.getManipulatingParameterIndex());
                    if(species.getParamQ() != null && species.getParamQ(prey) != null)
                        param.setParamValue(species.getParamQ(prey).getParamValue());                           
                    else
                        param.setParamValue(Double.valueOf(propertiesConfig.getProperty("functionalResponseControlParameterDefault")));
                    param.setTimestepIdx(timestepIdx);                   
                    sParams.add(param);
                }           
           
                for(Integer prey: preys)
                {
                    param = new ManipulatingParameter();
                    param.setParamType(ManipulatingParameterName.d.getManipulatingParameterType());
                    param.setParamName(ManipulatingParameterName.d.name());
                    param.setPredIdx(nodeIdx);
                    param.setPreyIdx(prey);
                    param.setParamIdx(ManipulatingParameterName.d.getManipulatingParameterIndex());
                    if(species.getParamD() != null && species.getParamD(prey) != null)
                        param.setParamValue(species.getParamD(prey).getParamValue());                           
                    else
                        param.setParamValue(Double.valueOf(propertiesConfig.getProperty("predatorInterferenceDefault")));
                    param.setTimestepIdx(timestepIdx);                   
                    sParams.add(param);
                }
            }
        }       
       
View Full Code Here

    }
   
   
   public String setNodeParameter(int nodeIdx, int paramIdx, double paramValue, int timestep, List<ManipulatingParameter> sParams )
    {
        ManipulatingParameter param = new ManipulatingParameter();       
       
        if(paramIdx == ManipulatingParameterName.k.getManipulatingParameterIndex())
        {
            if(paramValue <= 0)
                return "Carrying capacity should be bigger than 0";
            param.setParamType(ManipulatingParameterName.k.getManipulatingParameterType());
            param.setParamName(ManipulatingParameterName.k.name());
            param.setParamIdx(ManipulatingParameterName.k.getManipulatingParameterIndex());           
            param.setNodeIdx(nodeIdx);
            param.setTimestepIdx(timestep);
            param.setParamValue(paramValue);           
        }
        else if(paramIdx == ManipulatingParameterName.x.getManipulatingParameterIndex())
        {
            if(paramValue < 0 || paramValue > 1)
                return "Metabolic rate should be between 0 and 1";
            param.setParamType(ManipulatingParameterName.x.getManipulatingParameterType());
            param.setParamName(ManipulatingParameterName.x.name());
            param.setParamIdx(ManipulatingParameterName.x.getManipulatingParameterIndex());           
            param.setNodeIdx(nodeIdx);
            param.setTimestepIdx(timestep);           
            param.setParamValue(paramValue);           
        }
        else if(paramIdx == ManipulatingParameterName.r.getManipulatingParameterIndex())
        {
            if(paramValue < 0 || paramValue > 1)
                return "Plant growth rate should be between 0 and 1";
            param.setParamType(ManipulatingParameterName.r.getManipulatingParameterType());
            param.setParamName(ManipulatingParameterName.r.name());
            param.setParamIdx(ManipulatingParameterName.r.getManipulatingParameterIndex());           
            param.setNodeIdx(nodeIdx);
            param.setTimestepIdx(timestep);           
            param.setParamValue(paramValue);           
        }
        else
        {
            return "that type of node parameter is not supported yet";
        }
View Full Code Here

TOP

Related Classes of org.datacontract.schemas._2004._07.LINQ2Entities.Manipulation

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.