{
int nodeList[] = {1,8};
String manpId = se.createAndRunSeregenttiSubFoodweb(nodeList, "testInsectWeb", 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(8);
node.setBeginingBiomass(2);
node.setHasLinks(false);
nodes.add(node);
List<ManipulatingParameter> sParams = new ArrayList<ManipulatingParameter>();
se.setNodeParameter(1, ManipulatingParameterName.k.getManipulatingParameterIndex(), 8000, sParams);
se.setNodeParameter(8, 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);
se.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(2);
node.setBeginingBiomass(2000);
node.setHasLinks(false);
node.setGameMode(true);
node.setOriginFoodwebId(se.getProperties().getProperty("serengetiNetworkId"));
nodes.add(node);
sParams = new ArrayList<ManipulatingParameter>();
se.setNodeParameter(2, ManipulatingParameterName.k.getManipulatingParameterIndex(), 4000, 2, sParams);
// se.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);
se.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(9);
node.setBeginingBiomass(2);
node.setHasLinks(false);
node.setGameMode(true);
node.setOriginFoodwebId(se.getProperties().getProperty("serengetiNetworkId"));
nodes.add(node);
sParams = new ArrayList<ManipulatingParameter>();
se.updateSystemParameters(3, false, manpId, sParams, nodes);
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(12);
node.setBeginingBiomass(1.5);
node.setHasLinks(false);
node.setGameMode(true);
node.setOriginFoodwebId(se.getProperties().getProperty("serengetiNetworkId"));
nodes.add(node);
sParams = new ArrayList<ManipulatingParameter>();
se.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(5);
node.setBeginingBiomass(2000);
node.setHasLinks(false);
node.setGameMode(true);
node.setOriginFoodwebId(se.getProperties().getProperty("serengetiNetworkId"));
nodes.add(node);
sParams = new ArrayList<ManipulatingParameter>();
se.setNodeParameter(5, ManipulatingParameterName.k.getManipulatingParameterIndex(), 4000, 5, sParams);
se.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(14);
node.setBeginingBiomass(3);
node.setHasLinks(false);
node.setGameMode(true);
node.setOriginFoodwebId(se.getProperties().getProperty("serengetiNetworkId"));
nodes.add(node);
sParams = new ArrayList<ManipulatingParameter>();
se.updateSystemParameters(6, false, manpId, sParams, nodes);
nodes = new ArrayList<ManipulatingNode>();
node = new ManipulatingNode();
node.setTimestepIdx(7);
node.setManipulationActionType(ManipulationActionType.SPECIES_INVASION.getManipulationActionType()); // invasion
node.setModelType(ModelType.CASCADE_MODEL.getModelType()); // cascading model
node.setNodeIdx(7);
node.setBeginingBiomass(2000);
node.setHasLinks(false);
node.setGameMode(true);
node.setOriginFoodwebId(se.getProperties().getProperty("serengetiNetworkId"));
nodes.add(node);
sParams = new ArrayList<ManipulatingParameter>();
se.setNodeParameter(7, ManipulatingParameterName.k.getManipulatingParameterIndex(), 4000, 7, sParams);
se.updateSystemParameters(7, false, manpId, sParams, nodes);
nodes = new ArrayList<ManipulatingNode>();
node = new ManipulatingNode();
node.setTimestepIdx(8);
node.setManipulationActionType(ManipulationActionType.SPECIES_INVASION.getManipulationActionType()); // invasion
node.setModelType(ModelType.CASCADE_MODEL.getModelType()); // cascading model
node.setNodeIdx(16);
node.setBeginingBiomass(1.3);
node.setHasLinks(false);
node.setGameMode(true);
node.setOriginFoodwebId(se.getProperties().getProperty("serengetiNetworkId"));
nodes.add(node);
sParams = new ArrayList<ManipulatingParameter>();
se.updateSystemParameters(8, false, manpId, sParams, nodes);
nodes = new ArrayList<ManipulatingNode>();
node = new ManipulatingNode();
node.setTimestepIdx(9);
node.setManipulationActionType(ManipulationActionType.SPECIES_INVASION.getManipulationActionType()); // invasion
node.setModelType(ModelType.CASCADE_MODEL.getModelType()); // cascading model
node.setNodeIdx(20);
node.setBeginingBiomass(1.2);
node.setHasLinks(false);
node.setGameMode(true);
node.setOriginFoodwebId(se.getProperties().getProperty("serengetiNetworkId"));
nodes.add(node);
sParams = new ArrayList<ManipulatingParameter>();
se.updateSystemParameters(9, false, manpId, sParams, nodes);
se.run(10, 20, manpId, false);
nodes = new ArrayList<ManipulatingNode>();
node = new ManipulatingNode();
node.setTimestepIdx(30);
node.setManipulationActionType(ManipulationActionType.SPECIES_PROLIFERATION.getManipulationActionType()); // proliferation
node.setModelType(ModelType.CASCADE_MODEL.getModelType()); // cascading model
node.setNodeIdx(1);
node.setBeginingBiomass(8000);
node.setHasLinks(false);
nodes.add(node);
sParams = new ArrayList<ManipulatingParameter>();
se.updateSystemParameters(30, false, manpId, sParams, nodes);