model.setModified(true);
DynamicsSpecificationNode dynamics = new DynamicsSpecificationNode(
"Dynamics");
PhysicalQuantity value = new PhysicalQuantity();
value.setScalingFactor("10");
value.setUnit("ms");
value.setValue(new DoubleValue(10));
dynamics.setInitialConditions(value);
FunctionNode function = new FunctionNode("Function");
function.setExpression("y=x+2");
List<String> argumentsF = new ArrayList<String>();
argumentsF.add("1");
argumentsF.add("2");
function.setArgument(argumentsF);
dynamics.setDynamics(function);
ParameterSpecificationNode parameter = new ParameterSpecificationNode(
"Parameter");
PhysicalQuantity value1 = new PhysicalQuantity();
value1.setScalingFactor("10");
value1.setUnit("ms");
value1.setValue(new DoubleValue(10));
parameter.setValue(value1);
FunctionNode functionNode = new FunctionNode("FunctionNode");
functionNode.setExpression("y=x^2");
List<String> arguments = new ArrayList<String>();
arguments.add("1");
functionNode.setArgument(arguments);
AspectSubTreeNode visualization = new AspectSubTreeNode(
AspectTreeType.VISUALIZATION_TREE);
visualization.setModified(true);
SphereNode sphere = new SphereNode("sphere");
Point p = new Point();
p.setX(new Double(3.3));
p.setY(new Double(4));
p.setZ(new Double(-1.444));
sphere.setPosition(p);
sphere.setRadius(new Double(33));
CylinderNode cylinder = new CylinderNode("cylinder");
Point p2 = new Point();
p2.setX(new Double(6.3));
p2.setY(new Double(8));
p2.setZ(new Double(-3.999));
cylinder.setPosition(p2);
Point p3 = new Point();
p3.setX(new Double(6.3));
p3.setY(new Double(8));
p3.setZ(new Double(-3.999));
cylinder.setDistal(p3);
cylinder.setRadiusBottom(new Double(34.55));
cylinder.setRadiusTop(new Double(34.55));
CylinderNode cylinder2 = new CylinderNode("cylinder");
cylinder2.setPosition(p2);
cylinder2.setDistal(p3);
cylinder2.setRadiusBottom(new Double(34.55));
cylinder2.setRadiusTop(new Double(34.55));
CylinderNode cylinder3 = new CylinderNode("cylinder");
cylinder3.setPosition(p2);
cylinder3.setDistal(p3);
cylinder3.setRadiusBottom(new Double(34.55));
cylinder3.setRadiusTop(new Double(34.55));
CylinderNode cylinder4 = new CylinderNode("cylinder");
cylinder4.setPosition(p2);
cylinder4.setDistal(p3);
cylinder4.setRadiusBottom(new Double(34.55));
cylinder4.setRadiusTop(new Double(34.55));
CylinderNode cylinder5 = new CylinderNode("cylinder");
cylinder5.setPosition(p2);
cylinder5.setDistal(p3);
cylinder5.setRadiusBottom(new Double(34.55));
cylinder5.setRadiusTop(new Double(34.55));
CompositeNode vg = new CompositeNode("vg");
vg.addChild(sphere);
vg.addChild(cylinder);
vg.addChild(cylinder2);
vg.addChild(cylinder3);
vg.addChild(cylinder4);
vg.addChild(cylinder5);
CompositeNode vg2 = new CompositeNode("vg2");
vg2.addChild(cylinder);
vg2.addChild(cylinder2);
vg2.addChild(cylinder3);
vg2.addChild(cylinder4);
vg2.addChild(cylinder5);
vg2.addChild(sphere);
AspectSubTreeNode simulation = new AspectSubTreeNode(
AspectTreeType.WATCH_TREE);
simulation.setModified(true);
CompositeNode hhpop = new CompositeNode("hhpop[0]");
VariableNode v = new VariableNode("v");
PhysicalQuantity quantity = new PhysicalQuantity();
quantity.setValue(ValuesFactory.getDoubleValue(20d));
PhysicalQuantity quantity2 = new PhysicalQuantity();
quantity2.setValue(ValuesFactory.getDoubleValue(100d));
v.addPhysicalQuantity(quantity);
v.addPhysicalQuantity(quantity2);
ParameterNode a1 = new ParameterNode("a");