changeset 107:a8f77957a477 working

create new model to share fish point
author sugi
date Tue, 10 Jul 2012 02:30:25 +0900
parents c84a2b4a877a
children 5f0010c13631
files .settings/org.eclipse.jdt.core.prefs scripts/fishAlpha_run.sh scripts/fishBeta_run.sh scripts/movement_run.sh src/alice/test/codesegment/local/StartCodeSegment.java src/alice/test/codesegment/local/TestCodeSegment.java src/alice/test/topology/fishmodel/alpha/CheckFishLocation.java src/alice/test/topology/fishmodel/alpha/CheckMyName.java src/alice/test/topology/fishmodel/alpha/FishMovementConfig.java src/alice/test/topology/fishmodel/alpha/FishMovementTopology.java src/alice/test/topology/fishmodel/alpha/FishPoint.java src/alice/test/topology/fishmodel/alpha/KeyInput.java src/alice/test/topology/fishmodel/alpha/KeyInputCodeSegment.java src/alice/test/topology/fishmodel/alpha/LookData.java src/alice/test/topology/fishmodel/alpha/MakeFrame.java src/alice/test/topology/fishmodel/alpha/MakeObject.java src/alice/test/topology/fishmodel/alpha/SendLocation.java src/alice/test/topology/fishmodel/alpha/StartFishMovement.java src/alice/test/topology/fishmodel/beta/AddRoutingTable.java src/alice/test/topology/fishmodel/beta/CheckMyName.java src/alice/test/topology/fishmodel/beta/FishMovementConfig.java src/alice/test/topology/fishmodel/beta/FishMovementTopology.java src/alice/test/topology/fishmodel/beta/Routing.java src/alice/test/topology/fishmodel/beta/RoutingTable.java src/alice/test/topology/fishmodel/beta/StartFishMovement.java src/alice/test/topology/movement/CheckFishLocation.java src/alice/test/topology/movement/CheckMyName.java src/alice/test/topology/movement/FishMovementConfig.java src/alice/test/topology/movement/FishMovementTopology.java src/alice/test/topology/movement/FishPoint.java src/alice/test/topology/movement/KeyInput.java src/alice/test/topology/movement/KeyInputCodeSegment.java src/alice/test/topology/movement/LookData.java src/alice/test/topology/movement/MakeFrame.java src/alice/test/topology/movement/MakeObject.java src/alice/test/topology/movement/SendLocation.java src/alice/test/topology/movement/StartFishMovement.java src/alice/test/topology/share/CheckMyName.java src/alice/test/topology/share/CheckNeedLocalUpdate.java src/alice/test/topology/share/CheckNeedParentUpdate.java src/alice/test/topology/share/CheckParentIndex.java
diffstat 41 files changed, 804 insertions(+), 551 deletions(-) [+]
line wrap: on
line diff
--- a/.settings/org.eclipse.jdt.core.prefs	Tue Jul 03 16:01:36 2012 +0900
+++ b/.settings/org.eclipse.jdt.core.prefs	Tue Jul 10 02:30:25 2012 +0900
@@ -1,4 +1,4 @@
-#Thu Dec 08 17:27:47 JST 2011
+#Thu Jun 28 04:19:22 JST 2012
 eclipse.preferences.version=1
 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
 org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
@@ -7,6 +7,90 @@
 org.eclipse.jdt.core.compiler.debug.lineNumber=generate
 org.eclipse.jdt.core.compiler.debug.localVariable=generate
 org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.doc.comment.support=enabled
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
 org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
+org.eclipse.jdt.core.compiler.problem.deadCode=warning
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
 org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
+org.eclipse.jdt.core.compiler.problem.invalidJavadoc=ignore
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=disabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=disabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=disabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=public
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
+org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag
+org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
+org.eclipse.jdt.core.compiler.problem.nullReference=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedImport=warning
+org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
+org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
+org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
 org.eclipse.jdt.core.compiler.source=1.6
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/scripts/fishAlpha_run.sh	Tue Jul 10 02:30:25 2012 +0900
@@ -0,0 +1,15 @@
+#!/bin/bash
+max=$1
+child_num=$2
+ruby ./topology/treen.rb $1 $2 > ./topology/tree.dot
+#dot -Tpng ./topology/tree.dot > ./topology/tree.png
+#open ./topology/tree.png
+java -cp ../Alice.jar alice.topology.manager.TopologyManager -p 10000 -conf ./topology/tree.dot -log ./output/manager.log -level debug > ./output/std_manager.log &
+
+cnt=0
+while [ $cnt -lt $max ]
+do
+    java -cp ../Alice.jar alice.test.topology.fishmodel.alpha.FishMovementTopology -host `hostname` -port 10000 -p `expr 20000 + $cnt` -log ./output/modelalpha${cnt}.log -level debug > ./output/std_modelalpha${cnt}.log &
+    cnt=`expr $cnt + 1`
+done
+wait
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/scripts/fishBeta_run.sh	Tue Jul 10 02:30:25 2012 +0900
@@ -0,0 +1,15 @@
+#!/bin/bash
+max=$1
+child_num=$2
+ruby ./topology/treen.rb $1 $2 > ./topology/tree.dot
+#dot -Tpng ./topology/tree.dot > ./topology/tree.png
+#open ./topology/tree.png
+java -cp ../Alice.jar alice.topology.manager.TopologyManager -p 10000 -conf ./topology/tree.dot -log ./output/manager.log -level debug > ./output/std_manager.log &
+
+cnt=0
+while [ $cnt -lt $max ]
+do
+    java -cp ../Alice.jar alice.test.topology.fishmodel.beta.FishMovementTopology -host `hostname` -port 10000 -p `expr 20000 + $cnt` -log ./output/modelbeta${cnt}.log -level debug > ./output/std_modelbeta${cnt}.log &
+    cnt=`expr $cnt + 1`
+done
+wait
--- a/scripts/movement_run.sh	Tue Jul 03 16:01:36 2012 +0900
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,15 +0,0 @@
-#!/bin/bash
-max=$1
-child_num=$2
-ruby ./topology/treen.rb $1 $2 > ./topology/tree.dot
-#dot -Tpng ./topology/tree.dot > ./topology/tree.png
-#open ./topology/tree.png
-java -cp ../Alice.jar alice.topology.manager.TopologyManager -p 10000 -conf ./topology/tree.dot -log ./output/manager.log -level debug > ./output/std_manager.log &
-
-cnt=0
-while [ $cnt -lt $max ]
-do
-    java -cp ../Alice.jar alice.test.topology.movement.FishMovementTopology -host flere210.st.ie.u-ryukyu.ac.jp -port 10000 -p `expr 20000 + $cnt` -log ./output/fishmovement${cnt}.log -level debug > ./output/std_fishmovement${cnt}.log &
-    cnt=`expr $cnt + 1`
-done
-wait
--- a/src/alice/test/codesegment/local/StartCodeSegment.java	Tue Jul 03 16:01:36 2012 +0900
+++ b/src/alice/test/codesegment/local/StartCodeSegment.java	Tue Jul 10 02:30:25 2012 +0900
@@ -1,7 +1,8 @@
 package alice.test.codesegment.local;
 
 import alice.codesegment.CodeSegment;
-import alice.test.topology.movement.FishPoint;
+import alice.test.topology.fishmodel.beta.Routing;
+import alice.test.topology.fishmodel.beta.RoutingTable;
 
 public class StartCodeSegment extends CodeSegment {
 
@@ -15,10 +16,14 @@
 										  
 		*/
 		new TestCodeSegment();
+		RoutingTable RT = new RoutingTable();
+		Routing newMember = new Routing("local");
+		RT.table.add(newMember);
 		System.out.println("create TestCodeSegment");
-		
-		ods.update("local", "key1", new FishPoint()); // bind string data to datasegment local.key1
+		ods.update("local", "key1", RT);
+		//ods.update("local", "key1", new FishPoint()); // bind string data to datasegment local.key1
 													// this startup TestCodeSegment.
  	}
 
+	
 }
--- a/src/alice/test/codesegment/local/TestCodeSegment.java	Tue Jul 03 16:01:36 2012 +0900
+++ b/src/alice/test/codesegment/local/TestCodeSegment.java	Tue Jul 10 02:30:25 2012 +0900
@@ -3,7 +3,8 @@
 import alice.codesegment.CodeSegment;
 import alice.datasegment.CommandType;
 import alice.datasegment.Receiver;
-import alice.test.topology.movement.FishPoint;
+import alice.test.topology.fishmodel.beta.Routing;
+import alice.test.topology.fishmodel.beta.RoutingTable;
 
 public class TestCodeSegment extends CodeSegment {
 	
@@ -18,26 +19,32 @@
 	
 	@Override
 	public void run() {
+		RoutingTable RT = arg1.asClass(RoutingTable.class);
+		Routing newRouting = new Routing(this.arg1.from);
+		
+		RT.table.add(newRouting);
 		System.out.println("index = " + arg1.index);
 		System.out.println("data = " + arg1.val);
-		System.out.println("data = " + arg1.asClass(FishPoint.class));
 		System.out.println(arg1.val.getType());
-		/*
-		FishPoint PD = this.arg1.asClass(FishPoint.class);
 		
-		PD.setXY(PD.getX()+1,PD.getY()+1);
-		*/
+		for (Routing r : RT.table) {
+			System.out.println("name;"+r.name);
+		}
+		
+		
 		if (arg1.index == 10) {
 			System.exit(0);
 			return;
 		}
+		
 		/*
 		TestCodeSegment cs = new TestCodeSegment();
 		cs.arg1.setKey("key1", arg1.index);
 		*/
+		
 		new TestCodeSegment(arg1.index);
 		// DataSegment.get("local").update
-		ods.update("local", "key1", this.arg1.asClass(FishPoint.class));
+		ods.update("local", "key1", RT);
 	}
 
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/alice/test/topology/fishmodel/alpha/CheckFishLocation.java	Tue Jul 10 02:30:25 2012 +0900
@@ -0,0 +1,51 @@
+package alice.test.topology.fishmodel.alpha;
+
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import alice.codesegment.CodeSegment;
+import alice.datasegment.CommandType;
+import alice.datasegment.Receiver;
+
+
+public class CheckFishLocation extends CodeSegment{
+	
+	private Receiver position = ids.create(CommandType.PEEK);
+	private Receiver host = ids.create(CommandType.PEEK);
+	MakeObject obj;
+	String key;
+	Pattern pattern = Pattern.compile("^(cli)([0-9]+)$");
+	
+	public CheckFishLocation(MakeObject MO ,String key,int index){
+		this.obj = MO;
+		this.key = key;
+		this.host.setKey("local","host");
+		this.position.setKey("local",key,index);
+	}
+	
+	@Override
+	public void run(){
+		String name = host.asString();
+		Matcher matcher = pattern.matcher(name);
+		matcher.find();
+		//int num = new Integer(matcher.group(2));
+		
+		//float startX = 2*num - 3.0f;
+		//float endX = 2*num -0.9f;
+		FishPoint FP = this.position.asClass(FishPoint.class);
+		obj.setLocation(FP.getX(), FP.getY());
+		/*
+		if (startX <= FP.getX() && FP.getX() < endX){
+			obj.setLocation(FP.getX() - 2*(num-1), FP.getY());
+			if(this.position.key!="fish3X")
+				ods.update("parent", this.position.key, this.position.asInteger()+1);
+		}
+		*/	
+		new CheckFishLocation(this.obj,this.key,this.position.index);
+
+		
+						
+	}
+	
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/alice/test/topology/fishmodel/alpha/CheckMyName.java	Tue Jul 10 02:30:25 2012 +0900
@@ -0,0 +1,59 @@
+package alice.test.topology.fishmodel.alpha;
+
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import alice.codesegment.CodeSegment;
+import alice.datasegment.CommandType;
+import alice.datasegment.Receiver;
+import alice.test.topology.share.CheckLocalIndex;
+import alice.test.topology.share.CheckParentIndex;
+
+public class CheckMyName extends CodeSegment {
+	Receiver host = ids.create(CommandType.PEEK);
+	Pattern pattern = Pattern.compile("^(node|cli)([0-9]+)$");
+	String key = "fish";
+	
+	@Override
+	public void run(){
+		
+		String name = host.asString();
+		Matcher matcher = pattern.matcher(name);
+		
+		matcher.find();
+		String type = matcher.group(1);
+		int cliNum = new Integer(matcher.group(2));
+		
+		if (type.equals("cli")){
+			System.out.println("cli"+cliNum);
+			ods.update("local", key, new FishPoint(0.0f,0.0f));
+			MakeFrame frame =  new MakeFrame();
+			
+			MakeObject obj3 = new MakeObject(frame);
+			frame.register(obj3);
+			new CheckFishLocation(obj3,key,0);
+			new CheckLocalIndex(key,0);
+			new CheckParentIndex(key,0);
+			/*
+			MakeObject obj = new MakeObject(frame);
+			frame.register(obj);
+			new CheckFishLocation(obj,"fish1X");
+			*/					
+		}else if(type.equals("node")){
+			System.out.println("node0");
+			
+			ods.update("local", key, new FishPoint(0.0f,0.0f));
+			//ods.update("local", "fish1X", new FishPoint(-1.0f,0.0f));
+			if(cliNum == 0){
+				new LookData(key,0);
+			} else {
+				new CheckLocalIndex(key,0);
+				new CheckParentIndex(key,0);
+				
+			}
+			
+			
+			
+		}
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/alice/test/topology/fishmodel/alpha/FishMovementConfig.java	Tue Jul 10 02:30:25 2012 +0900
@@ -0,0 +1,12 @@
+package alice.test.topology.fishmodel.alpha;
+
+import alice.topology.node.TopologyNodeConfig;;
+
+public class FishMovementConfig extends TopologyNodeConfig {
+	
+	public FishMovementConfig(String[] args){
+		super(args);
+	} 
+	
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/alice/test/topology/fishmodel/alpha/FishMovementTopology.java	Tue Jul 10 02:30:25 2012 +0900
@@ -0,0 +1,11 @@
+package alice.test.topology.fishmodel.alpha;
+import alice.topology.node.TopologyNode;
+
+public class FishMovementTopology {
+	public static void main(String[] args){
+		FishMovementConfig conf = new FishMovementConfig(args);
+		new TopologyNode(conf, new StartFishMovement());
+		
+	}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/alice/test/topology/fishmodel/alpha/FishPoint.java	Tue Jul 10 02:30:25 2012 +0900
@@ -0,0 +1,40 @@
+package alice.test.topology.fishmodel.alpha;
+
+import org.msgpack.annotation.Message;
+
+@Message
+public class FishPoint {
+	// public fields are serialized.
+	public float x = 0;
+	public float y = 0;
+	
+	public FishPoint(){}
+	
+	public FishPoint(float x,float y){
+		this.x = x;
+		this.y = y;
+	}
+	
+	public void setX(float x){
+		this.x = x;
+	}
+	
+	public void setY(float y){
+		this.y = y;
+	}
+	
+	public void setXY(float x,float y){
+		this.x = x;
+		this.y = y;
+	}
+	public float getX(){
+		return this.x;
+	}
+	
+	public float getY(){
+		return this.y;
+	}
+	
+	
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/alice/test/topology/fishmodel/alpha/KeyInput.java	Tue Jul 10 02:30:25 2012 +0900
@@ -0,0 +1,57 @@
+package alice.test.topology.fishmodel.alpha;
+
+import java.awt.event.KeyEvent;
+import java.awt.event.KeyListener;
+
+import javax.media.j3d.Transform3D;
+import javax.media.j3d.TransformGroup;
+import javax.vecmath.Vector3f;
+
+
+public class KeyInput implements KeyListener{
+
+	int KeyCode = 0;
+	Vector3f vector;
+	Transform3D transform;
+	TransformGroup transformGroup;
+	
+	public KeyInput(){
+		transform = new Transform3D();
+		transformGroup= new TransformGroup();
+		transformGroup.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);
+		vector = new Vector3f(0.0f,0.0f,0.0f);
+			
+	}
+	@Override
+	public void keyPressed(KeyEvent event) {
+		KeyCode = event.getKeyCode();
+		switch(KeyCode)
+		{
+		case 37:
+			vector.x -= 0.1f;
+			break;
+		case 38:
+			vector.y += 0.1f;
+			break;
+		case 39:
+			vector.x += 0.1f;
+			break;
+		case 40:
+		    vector.y -= 0.1f;
+		    break;
+		}
+		transform.setTranslation(vector);
+		transformGroup.setTransform(transform);
+	}
+
+	@Override
+	public void keyReleased(KeyEvent arg0) {
+		
+	}
+
+	@Override
+	public void keyTyped(KeyEvent arg0) {
+		
+	}
+
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/alice/test/topology/fishmodel/alpha/KeyInputCodeSegment.java	Tue Jul 10 02:30:25 2012 +0900
@@ -0,0 +1,50 @@
+package alice.test.topology.fishmodel.alpha;
+
+import java.awt.event.KeyEvent;
+import java.awt.event.KeyListener;
+
+public class KeyInputCodeSegment implements KeyListener{
+	int KeyCode = 0;
+	SendLocation cs;
+	String key;
+	
+	public void setKey(){
+		
+	}
+	
+	@Override
+	public void keyPressed(KeyEvent event) {
+		KeyCode = event.getKeyCode();
+		//System.out.println("getKey" +KeyCode);
+		switch(KeyCode)
+		{
+		case 37:
+			cs = new SendLocation(-0.1f,0.0f);
+			cs.position.setKey("local", "fish");
+			break;
+		case 39:
+			cs = new SendLocation(0.1f,0.0f);
+			cs.position.setKey("local", "fish");
+			break;
+		case 40:
+			cs = new SendLocation(0.0f,-0.1f);
+			cs.position.setKey("local", "fish");
+			break;
+		case 38:
+			cs = new SendLocation(0.0f,0.1f);
+			cs.position.setKey("local", "fish");
+			break;
+		}
+	}
+
+	@Override
+	public void keyReleased(KeyEvent arg0) {
+		
+	}
+
+	@Override
+	public void keyTyped(KeyEvent arg0) {
+		
+	}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/alice/test/topology/fishmodel/alpha/LookData.java	Tue Jul 10 02:30:25 2012 +0900
@@ -0,0 +1,25 @@
+package alice.test.topology.fishmodel.alpha;
+
+import alice.codesegment.CodeSegment;
+import alice.datasegment.CommandType;
+import alice.datasegment.Receiver;
+
+
+public class LookData extends CodeSegment{
+	
+	private Receiver data = ids.create(CommandType.PEEK);
+	String key;
+	public LookData(String key,int index){
+		this.key = key;
+		this.data.setKey("local", key, index);
+	}
+	
+	@Override
+	public void run(){
+		System.out.println(data.val+";"+data.from);
+		new LookData(this.key,this.data.index);
+						
+	}
+	
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/alice/test/topology/fishmodel/alpha/MakeFrame.java	Tue Jul 10 02:30:25 2012 +0900
@@ -0,0 +1,88 @@
+package alice.test.topology.fishmodel.alpha;
+
+import java.awt.GraphicsConfiguration;
+
+import javax.media.j3d.BoundingSphere;
+import javax.media.j3d.BranchGroup;
+import javax.media.j3d.Canvas3D;
+import javax.media.j3d.DirectionalLight;
+
+import javax.swing.JFrame;
+import javax.swing.JPanel;
+import javax.vecmath.Color3f;
+import javax.vecmath.Vector3f;
+
+import com.sun.j3d.utils.universe.SimpleUniverse;
+import com.sun.j3d.utils.universe.ViewingPlatform;
+
+public class MakeFrame {
+	
+	int fSizeX = 800;
+	int fSizeY = 800;
+	private Canvas3D canvas;
+	private SimpleUniverse universe;
+	private KeyInput key;
+	private KeyInputCodeSegment KIC;
+	
+	public MakeFrame(){
+		JFrame frame = new JFrame();
+		frame.setSize(fSizeX,fSizeY);
+		frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
+		
+		JPanel cp = new JPanel();
+		cp.setLayout(null);
+		frame.add(cp);
+		
+		GraphicsConfiguration config = SimpleUniverse.getPreferredConfiguration();
+		canvas = new Canvas3D(config);
+		canvas.setBounds(0,0,fSizeX,fSizeY);
+		cp.add(canvas);
+		
+		universe = new SimpleUniverse(canvas);
+		universe.addBranchGraph(createLight());
+		/*
+		key = new KeyInput();
+		canvas.addKeyListener(key);
+		*/
+		KIC = new KeyInputCodeSegment();
+		canvas.addKeyListener(KIC);
+		frame.setVisible(true);
+		
+		ViewingPlatform camera = universe.getViewingPlatform();
+		camera.setNominalViewingTransform();
+	}
+	
+	private BranchGroup createLight(){
+		BranchGroup scene = new BranchGroup();
+		Color3f light_color  = new Color3f(1.7f,1.7f,1.7f);
+		Vector3f light_direction = new Vector3f(0.2f,-0.2f,-0.6f);
+		DirectionalLight light = new DirectionalLight(light_color,light_direction);
+		BoundingSphere bounds = new BoundingSphere();
+		light.setInfluencingBounds(bounds);
+		scene.addChild(light);
+		return scene;
+	}
+	
+	public void register(MakeObject obj){
+		BranchGroup group = obj.createBranch();
+		this.universe.addBranchGraph(group);
+	}
+	
+	public void registerKObj(MakeObject obj){
+		BranchGroup group = obj.createKeyBranch();
+		this.universe.addBranchGraph(group);
+	}
+	
+	public Canvas3D getCanvas(){
+		return this.canvas;
+	}
+	
+	public KeyInput getKey(){
+		return this.key;
+	}
+	
+	public KeyInputCodeSegment getKeySegment(){
+		return this.KIC;
+	}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/alice/test/topology/fishmodel/alpha/MakeObject.java	Tue Jul 10 02:30:25 2012 +0900
@@ -0,0 +1,89 @@
+package alice.test.topology.fishmodel.alpha;
+
+import java.awt.Image;
+import java.awt.MediaTracker;
+import java.awt.Toolkit;
+//import java.io.File;
+
+import javax.media.j3d.Appearance;
+import javax.media.j3d.BranchGroup;
+import javax.media.j3d.Canvas3D;
+import javax.media.j3d.Texture;
+import javax.media.j3d.Transform3D;
+import javax.media.j3d.TransformGroup;
+import javax.vecmath.Vector3f;
+
+import com.sun.j3d.utils.geometry.Box;
+import com.sun.j3d.utils.image.TextureLoader;
+
+public class MakeObject {
+	
+	public Vector3f vector;
+	Transform3D transform;  
+	TransformGroup transform_group;
+	Canvas3D canvas;
+	KeyInput key;
+	KeyInputCodeSegment KIC; 
+	
+	public MakeObject(MakeFrame MF){
+		this.canvas = MF.getCanvas();
+		this.key = MF.getKey();
+		this.KIC = MF.getKeySegment();
+	}
+	
+		
+	public BranchGroup createKeyBranch(){
+		BranchGroup scene = new BranchGroup();
+		Box box = new Box(0.1f,0.1f,0.0f,
+				Box.GENERATE_NORMALS|Box.GENERATE_TEXTURE_COORDS,createAppearance());
+		key.transformGroup.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);
+		key.transformGroup.addChild(box);
+		scene.addChild(key.transformGroup);
+		return scene;
+		
+	}
+	
+	public BranchGroup createBranch(){
+		BranchGroup scene = new BranchGroup();
+		Box box = new Box(0.1f,0.1f,0.0f,
+				Box.GENERATE_NORMALS|Box.GENERATE_TEXTURE_COORDS,createAppearance());	
+		transform_group = new TransformGroup();
+		transform_group.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);
+		transform_group.addChild(box);
+		scene.addChild(transform_group);
+		setLocation(-10,0);//default position
+		return scene;
+		
+	}
+	
+	private Appearance createAppearance(){
+		//System.out.println(new File(".").getAbsolutePath());
+		Appearance app = new Appearance();
+		Image image = null; 	
+		Toolkit toolkit = Toolkit.getDefaultToolkit();
+		//image = toolkit.getImage("image/fish.jpg");
+		image = toolkit.getImage("../image/fish.jpg");//jar
+		MediaTracker mt = new MediaTracker(canvas);
+		mt.addImage(image, 0);
+		mt.checkAll(true);
+		try {
+			mt.waitForID(0);
+			
+		}catch (InterruptedException e){
+			e.printStackTrace();
+			
+		}
+		Texture texture = new TextureLoader(image,canvas).getTexture();
+		app.setTexture(texture);
+		return app;
+		
+	}
+	
+	public void setLocation(float x,float y){
+		transform = new Transform3D();
+		vector = new Vector3f(x,y,0.0f);
+		transform.setTranslation(vector);
+		transform_group.setTransform(transform);
+	}
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/alice/test/topology/fishmodel/alpha/SendLocation.java	Tue Jul 10 02:30:25 2012 +0900
@@ -0,0 +1,27 @@
+package alice.test.topology.fishmodel.alpha;
+
+import alice.codesegment.CodeSegment;
+import alice.datasegment.CommandType;
+import alice.datasegment.Receiver;
+
+
+public class SendLocation extends CodeSegment {
+	
+	public Receiver position = ids.create(CommandType.PEEK);
+	float x;
+	float y;
+	
+	public SendLocation(float x,float y){
+		this.x = x;
+		this.y = y;
+	}
+	
+	@Override
+	public void run() {
+		FishPoint FP = this.position.asClass(FishPoint.class);
+		FP.setXY(FP.getX()+this.x, FP.getY()+this.y);
+		ods.update("local", "fish", FP);
+		
+	}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/alice/test/topology/fishmodel/alpha/StartFishMovement.java	Tue Jul 10 02:30:25 2012 +0900
@@ -0,0 +1,13 @@
+package alice.test.topology.fishmodel.alpha;
+
+import alice.codesegment.CodeSegment;
+
+public class StartFishMovement extends CodeSegment{
+	@Override
+	public void run(){
+		CheckMyName cs = new CheckMyName();
+		cs.host.setKey("local","host");
+	}
+	
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/alice/test/topology/fishmodel/beta/AddRoutingTable.java	Tue Jul 10 02:30:25 2012 +0900
@@ -0,0 +1,33 @@
+package alice.test.topology.fishmodel.beta;
+
+import alice.codesegment.CodeSegment;
+import alice.datasegment.CommandType;
+import alice.datasegment.Receiver;
+
+public class AddRoutingTable extends CodeSegment {
+	
+	public Receiver mail = ids.create(CommandType.PEEK);
+	RoutingTable routing;
+	
+	public AddRoutingTable(RoutingTable routing,int index){
+		this.routing = routing;
+		this.mail.setKey("local", "member",index);
+		
+	}
+
+	@Override
+	public void run() {
+		/*
+		for (Routing r : routing.table) {
+			System.out.println("name:"+r.name);
+		}
+		*/
+		routing.table.add(new Routing(this.mail.from));
+		System.out.println("add "+this.mail.from);
+		
+
+		new AddRoutingTable(this.routing,this.mail.index);
+		
+	}
+	
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/alice/test/topology/fishmodel/beta/CheckMyName.java	Tue Jul 10 02:30:25 2012 +0900
@@ -0,0 +1,44 @@
+package alice.test.topology.fishmodel.beta;
+
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import alice.codesegment.CodeSegment;
+import alice.datasegment.CommandType;
+import alice.datasegment.Receiver;
+
+
+public class CheckMyName extends CodeSegment {
+	Receiver host = ids.create(CommandType.PEEK);
+	Pattern pattern = Pattern.compile("^(node|cli)([0-9]+)$");
+	
+	@Override
+	public void run(){
+		
+		String name = host.asString();
+		Matcher matcher = pattern.matcher(name);
+		
+		matcher.find();
+		String type = matcher.group(1);
+		int cliNum = new Integer(matcher.group(2));
+		
+		RoutingTable routing = new RoutingTable();
+		
+		if (type.equals("cli")){
+			System.out.println("cli"+cliNum);
+			routing.table.add(new Routing("parent"));
+			ods.put("local", "list", routing);
+			
+			new AddRoutingTable(routing,0);
+			ods.put("parent", "member", name);
+				
+		}else if (type.equals("node")){
+			System.out.println("node"+cliNum);
+			
+			ods.put("local", "list", routing);
+			new AddRoutingTable(routing,0);
+			
+			
+		}
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/alice/test/topology/fishmodel/beta/FishMovementConfig.java	Tue Jul 10 02:30:25 2012 +0900
@@ -0,0 +1,12 @@
+package alice.test.topology.fishmodel.beta;
+
+import alice.topology.node.TopologyNodeConfig;;
+
+public class FishMovementConfig extends TopologyNodeConfig {
+	
+	public FishMovementConfig(String[] args){
+		super(args);
+	} 
+	
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/alice/test/topology/fishmodel/beta/FishMovementTopology.java	Tue Jul 10 02:30:25 2012 +0900
@@ -0,0 +1,11 @@
+package alice.test.topology.fishmodel.beta;
+import alice.topology.node.TopologyNode;
+
+public class FishMovementTopology {
+	public static void main(String[] args){
+		FishMovementConfig conf = new FishMovementConfig(args);
+		new TopologyNode(conf, new StartFishMovement());
+		
+	}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/alice/test/topology/fishmodel/beta/Routing.java	Tue Jul 10 02:30:25 2012 +0900
@@ -0,0 +1,14 @@
+package alice.test.topology.fishmodel.beta;
+
+import org.msgpack.annotation.Message;
+
+@Message
+public class Routing {
+
+	public String name;
+	public Routing(){}
+	
+	public Routing(String name){
+		this.name = name;
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/alice/test/topology/fishmodel/beta/RoutingTable.java	Tue Jul 10 02:30:25 2012 +0900
@@ -0,0 +1,12 @@
+package alice.test.topology.fishmodel.beta;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.msgpack.annotation.Message;
+
+@Message
+public class RoutingTable {
+	public List<Routing> table = new ArrayList<Routing>();
+	
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/alice/test/topology/fishmodel/beta/StartFishMovement.java	Tue Jul 10 02:30:25 2012 +0900
@@ -0,0 +1,13 @@
+package alice.test.topology.fishmodel.beta;
+
+import alice.codesegment.CodeSegment;
+
+public class StartFishMovement extends CodeSegment{
+	@Override
+	public void run(){
+		CheckMyName cs = new CheckMyName();
+		cs.host.setKey("local","host");
+	}
+	
+
+}
--- a/src/alice/test/topology/movement/CheckFishLocation.java	Tue Jul 03 16:01:36 2012 +0900
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,51 +0,0 @@
-package alice.test.topology.movement;
-
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import alice.codesegment.CodeSegment;
-import alice.datasegment.CommandType;
-import alice.datasegment.Receiver;
-
-
-public class CheckFishLocation extends CodeSegment{
-	
-	private Receiver position = ids.create(CommandType.PEEK);
-	private Receiver host = ids.create(CommandType.PEEK);
-	MakeObject obj;
-	String key;
-	Pattern pattern = Pattern.compile("^(cli)([0-9]+)$");
-	
-	public CheckFishLocation(MakeObject MO ,String key,int index){
-		this.obj = MO;
-		this.key = key;
-		this.host.setKey("local","host");
-		this.position.setKey("local",key,index);
-	}
-	
-	@Override
-	public void run(){
-		String name = host.asString();
-		Matcher matcher = pattern.matcher(name);
-		matcher.find();
-		int num = new Integer(matcher.group(2));
-		
-		float startX = 2*num - 3.0f;
-		float endX = 2*num -0.9f;
-		FishPoint FP = this.position.asClass(FishPoint.class);
-		obj.setLocation(FP.getX(), FP.getY());
-		/*
-		if (startX <= FP.getX() && FP.getX() < endX){
-			obj.setLocation(FP.getX() - 2*(num-1), FP.getY());
-			if(this.position.key!="fish3X")
-				ods.update("parent", this.position.key, this.position.asInteger()+1);
-		}
-		*/	
-		new CheckFishLocation(this.obj,this.key,this.position.index);
-
-		
-						
-	}
-	
-
-}
--- a/src/alice/test/topology/movement/CheckMyName.java	Tue Jul 03 16:01:36 2012 +0900
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,59 +0,0 @@
-package alice.test.topology.movement;
-
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import alice.codesegment.CodeSegment;
-import alice.datasegment.CommandType;
-import alice.datasegment.Receiver;
-import alice.test.topology.share.CheckLocalIndex;
-import alice.test.topology.share.CheckParentIndex;
-
-public class CheckMyName extends CodeSegment {
-	Receiver host = ids.create(CommandType.PEEK);
-	Pattern pattern = Pattern.compile("^(node|cli)([0-9]+)$");
-	String key = "fish";
-	
-	@Override
-	public void run(){
-		
-		String name = host.asString();
-		Matcher matcher = pattern.matcher(name);
-		
-		matcher.find();
-		String type = matcher.group(1);
-		int cliNum = new Integer(matcher.group(2));
-		
-		if (type.equals("cli")){
-			System.out.println("cli"+cliNum);
-			ods.update("local", key, new FishPoint(0.0f,0.0f));
-			MakeFrame frame =  new MakeFrame();
-			
-			MakeObject obj3 = new MakeObject(frame);
-			frame.register(obj3);
-			new CheckFishLocation(obj3,key,0);
-			new CheckLocalIndex(key,0);
-			new CheckParentIndex(key,0);
-			/*
-			MakeObject obj = new MakeObject(frame);
-			frame.register(obj);
-			new CheckFishLocation(obj,"fish1X");
-			*/					
-		}else if(type.equals("node")){
-			System.out.println("node0");
-			
-			ods.update("local", key, new FishPoint(0.0f,0.0f));
-			//ods.update("local", "fish1X", new FishPoint(-1.0f,0.0f));
-			if(cliNum == 0){
-				new LookData(key,0);
-			} else {
-				new CheckLocalIndex(key,0);
-				new CheckParentIndex(key,0);
-				
-			}
-			
-			
-			
-		}
-	}
-}
--- a/src/alice/test/topology/movement/FishMovementConfig.java	Tue Jul 03 16:01:36 2012 +0900
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,12 +0,0 @@
-package alice.test.topology.movement;
-
-import alice.topology.node.TopologyNodeConfig;;
-
-public class FishMovementConfig extends TopologyNodeConfig {
-	
-	public FishMovementConfig(String[] args){
-		super(args);
-	} 
-	
-
-}
--- a/src/alice/test/topology/movement/FishMovementTopology.java	Tue Jul 03 16:01:36 2012 +0900
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,11 +0,0 @@
-package alice.test.topology.movement;
-import alice.topology.node.TopologyNode;
-
-public class FishMovementTopology {
-	public static void main(String[] args){
-		FishMovementConfig conf = new FishMovementConfig(args);
-		new TopologyNode(conf, new StartFishMovement());
-		
-	}
-
-}
--- a/src/alice/test/topology/movement/FishPoint.java	Tue Jul 03 16:01:36 2012 +0900
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-package alice.test.topology.movement;
-
-import org.msgpack.annotation.Message;
-
-@Message
-public class FishPoint {
-	// public fields are serialized.
-	public float x = 0;
-	public float y = 0;
-	
-	public FishPoint(){}
-	
-	public FishPoint(float x,float y){
-		this.x = x;
-		this.y = y;
-	}
-	
-	public void setX(float x){
-		this.x = x;
-	}
-	
-	public void setY(float y){
-		this.y = y;
-	}
-	
-	public void setXY(float x,float y){
-		this.x = x;
-		this.y = y;
-	}
-	public float getX(){
-		return this.x;
-	}
-	
-	public float getY(){
-		return this.y;
-	}
-	
-	
-
-}
--- a/src/alice/test/topology/movement/KeyInput.java	Tue Jul 03 16:01:36 2012 +0900
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,57 +0,0 @@
-package alice.test.topology.movement;
-
-import java.awt.event.KeyEvent;
-import java.awt.event.KeyListener;
-
-import javax.media.j3d.Transform3D;
-import javax.media.j3d.TransformGroup;
-import javax.vecmath.Vector3f;
-
-
-public class KeyInput implements KeyListener{
-
-	int KeyCode = 0;
-	Vector3f vector;
-	Transform3D transform;
-	TransformGroup transformGroup;
-	
-	public KeyInput(){
-		transform = new Transform3D();
-		transformGroup= new TransformGroup();
-		transformGroup.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);
-		vector = new Vector3f(0.0f,0.0f,0.0f);
-			
-	}
-	@Override
-	public void keyPressed(KeyEvent event) {
-		KeyCode = event.getKeyCode();
-		switch(KeyCode)
-		{
-		case 37:
-			vector.x -= 0.1f;
-			break;
-		case 38:
-			vector.y += 0.1f;
-			break;
-		case 39:
-			vector.x += 0.1f;
-			break;
-		case 40:
-		    vector.y -= 0.1f;
-		    break;
-		}
-		transform.setTranslation(vector);
-		transformGroup.setTransform(transform);
-	}
-
-	@Override
-	public void keyReleased(KeyEvent arg0) {
-		
-	}
-
-	@Override
-	public void keyTyped(KeyEvent arg0) {
-		
-	}
-
-}
\ No newline at end of file
--- a/src/alice/test/topology/movement/KeyInputCodeSegment.java	Tue Jul 03 16:01:36 2012 +0900
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,50 +0,0 @@
-package alice.test.topology.movement;
-
-import java.awt.event.KeyEvent;
-import java.awt.event.KeyListener;
-
-public class KeyInputCodeSegment implements KeyListener{
-	int KeyCode = 0;
-	SendLocation cs;
-	String key;
-	
-	public void setKey(){
-		
-	}
-	
-	@Override
-	public void keyPressed(KeyEvent event) {
-		KeyCode = event.getKeyCode();
-		//System.out.println("getKey" +KeyCode);
-		switch(KeyCode)
-		{
-		case 37:
-			cs = new SendLocation(-0.1f,0.0f);
-			cs.position.setKey("local", "fish");
-			break;
-		case 39:
-			cs = new SendLocation(0.1f,0.0f);
-			cs.position.setKey("local", "fish");
-			break;
-		case 40:
-			cs = new SendLocation(0.0f,-0.1f);
-			cs.position.setKey("local", "fish");
-			break;
-		case 38:
-			cs = new SendLocation(0.0f,0.1f);
-			cs.position.setKey("local", "fish");
-			break;
-		}
-	}
-
-	@Override
-	public void keyReleased(KeyEvent arg0) {
-		
-	}
-
-	@Override
-	public void keyTyped(KeyEvent arg0) {
-		
-	}
-
-}
--- a/src/alice/test/topology/movement/LookData.java	Tue Jul 03 16:01:36 2012 +0900
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,25 +0,0 @@
-package alice.test.topology.movement;
-
-import alice.codesegment.CodeSegment;
-import alice.datasegment.CommandType;
-import alice.datasegment.Receiver;
-
-
-public class LookData extends CodeSegment{
-	
-	private Receiver data = ids.create(CommandType.PEEK);
-	String key;
-	public LookData(String key,int index){
-		this.key = key;
-		this.data.setKey("local", key, index);
-	}
-	
-	@Override
-	public void run(){
-		System.out.println(data.val);
-		new LookData(this.key,this.data.index);
-						
-	}
-	
-
-}
--- a/src/alice/test/topology/movement/MakeFrame.java	Tue Jul 03 16:01:36 2012 +0900
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,88 +0,0 @@
-package alice.test.topology.movement;
-
-import java.awt.GraphicsConfiguration;
-
-import javax.media.j3d.BoundingSphere;
-import javax.media.j3d.BranchGroup;
-import javax.media.j3d.Canvas3D;
-import javax.media.j3d.DirectionalLight;
-
-import javax.swing.JFrame;
-import javax.swing.JPanel;
-import javax.vecmath.Color3f;
-import javax.vecmath.Vector3f;
-
-import com.sun.j3d.utils.universe.SimpleUniverse;
-import com.sun.j3d.utils.universe.ViewingPlatform;
-
-public class MakeFrame {
-	
-	int fSizeX = 800;
-	int fSizeY = 800;
-	private Canvas3D canvas;
-	private SimpleUniverse universe;
-	private KeyInput key;
-	private KeyInputCodeSegment KIC;
-	
-	public MakeFrame(){
-		JFrame frame = new JFrame();
-		frame.setSize(fSizeX,fSizeY);
-		frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
-		
-		JPanel cp = new JPanel();
-		cp.setLayout(null);
-		frame.add(cp);
-		
-		GraphicsConfiguration config = SimpleUniverse.getPreferredConfiguration();
-		canvas = new Canvas3D(config);
-		canvas.setBounds(0,0,fSizeX,fSizeY);
-		cp.add(canvas);
-		
-		universe = new SimpleUniverse(canvas);
-		universe.addBranchGraph(createLight());
-		/*
-		key = new KeyInput();
-		canvas.addKeyListener(key);
-		*/
-		KIC = new KeyInputCodeSegment();
-		canvas.addKeyListener(KIC);
-		frame.setVisible(true);
-		
-		ViewingPlatform camera = universe.getViewingPlatform();
-		camera.setNominalViewingTransform();
-	}
-	
-	private BranchGroup createLight(){
-		BranchGroup scene = new BranchGroup();
-		Color3f light_color  = new Color3f(1.7f,1.7f,1.7f);
-		Vector3f light_direction = new Vector3f(0.2f,-0.2f,-0.6f);
-		DirectionalLight light = new DirectionalLight(light_color,light_direction);
-		BoundingSphere bounds = new BoundingSphere();
-		light.setInfluencingBounds(bounds);
-		scene.addChild(light);
-		return scene;
-	}
-	
-	public void register(MakeObject obj){
-		BranchGroup group = obj.createBranch();
-		this.universe.addBranchGraph(group);
-	}
-	
-	public void registerKObj(MakeObject obj){
-		BranchGroup group = obj.createKeyBranch();
-		this.universe.addBranchGraph(group);
-	}
-	
-	public Canvas3D getCanvas(){
-		return this.canvas;
-	}
-	
-	public KeyInput getKey(){
-		return this.key;
-	}
-	
-	public KeyInputCodeSegment getKeySegment(){
-		return this.KIC;
-	}
-
-}
--- a/src/alice/test/topology/movement/MakeObject.java	Tue Jul 03 16:01:36 2012 +0900
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,89 +0,0 @@
-package alice.test.topology.movement;
-
-import java.awt.Image;
-import java.awt.MediaTracker;
-import java.awt.Toolkit;
-import java.io.File;
-
-import javax.media.j3d.Appearance;
-import javax.media.j3d.BranchGroup;
-import javax.media.j3d.Canvas3D;
-import javax.media.j3d.Texture;
-import javax.media.j3d.Transform3D;
-import javax.media.j3d.TransformGroup;
-import javax.vecmath.Vector3f;
-
-import com.sun.j3d.utils.geometry.Box;
-import com.sun.j3d.utils.image.TextureLoader;
-
-public class MakeObject {
-	
-	public Vector3f vector;
-	Transform3D transform;  
-	TransformGroup transform_group;
-	Canvas3D canvas;
-	KeyInput key;
-	KeyInputCodeSegment KIC; 
-	
-	public MakeObject(MakeFrame MF){
-		this.canvas = MF.getCanvas();
-		this.key = MF.getKey();
-		this.KIC = MF.getKeySegment();
-	}
-	
-		
-	public BranchGroup createKeyBranch(){
-		BranchGroup scene = new BranchGroup();
-		Box box = new Box(0.1f,0.1f,0.0f,
-				Box.GENERATE_NORMALS|Box.GENERATE_TEXTURE_COORDS,createAppearance());
-		key.transformGroup.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);
-		key.transformGroup.addChild(box);
-		scene.addChild(key.transformGroup);
-		return scene;
-		
-	}
-	
-	public BranchGroup createBranch(){
-		BranchGroup scene = new BranchGroup();
-		Box box = new Box(0.1f,0.1f,0.0f,
-				Box.GENERATE_NORMALS|Box.GENERATE_TEXTURE_COORDS,createAppearance());	
-		transform_group = new TransformGroup();
-		transform_group.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);
-		transform_group.addChild(box);
-		scene.addChild(transform_group);
-		setLocation(-10,0);//default position
-		return scene;
-		
-	}
-	
-	private Appearance createAppearance(){
-		//System.out.println(new File(".").getAbsolutePath());
-		Appearance app = new Appearance();
-		Image image = null; 	
-		Toolkit toolkit = Toolkit.getDefaultToolkit();
-		//image = toolkit.getImage("image/fish.jpg");
-		image = toolkit.getImage("../image/fish.jpg");//jar
-		MediaTracker mt = new MediaTracker(canvas);
-		mt.addImage(image, 0);
-		mt.checkAll(true);
-		try {
-			mt.waitForID(0);
-			
-		}catch (InterruptedException e){
-			e.printStackTrace();
-			
-		}
-		Texture texture = new TextureLoader(image,canvas).getTexture();
-		app.setTexture(texture);
-		return app;
-		
-	}
-	
-	public void setLocation(float x,float y){
-		transform = new Transform3D();
-		vector = new Vector3f(x,y,0.0f);
-		transform.setTranslation(vector);
-		transform_group.setTransform(transform);
-	}
-}
-
--- a/src/alice/test/topology/movement/SendLocation.java	Tue Jul 03 16:01:36 2012 +0900
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-package alice.test.topology.movement;
-
-import alice.codesegment.CodeSegment;
-import alice.datasegment.CommandType;
-import alice.datasegment.Receiver;
-
-
-public class SendLocation extends CodeSegment {
-	
-	public Receiver position = ids.create(CommandType.PEEK);
-	float x;
-	float y;
-	
-	public SendLocation(float x,float y){
-		this.x = x;
-		this.y = y;
-	}
-	
-	@Override
-	public void run() {
-		FishPoint FP = this.position.asClass(FishPoint.class);
-		FP.setXY(FP.getX()+this.x, FP.getY()+this.y);
-		ods.update("local", "fish", FP);
-		
-	}
-
-}
--- a/src/alice/test/topology/movement/StartFishMovement.java	Tue Jul 03 16:01:36 2012 +0900
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,13 +0,0 @@
-package alice.test.topology.movement;
-
-import alice.codesegment.CodeSegment;
-
-public class StartFishMovement extends CodeSegment{
-	@Override
-	public void run(){
-		CheckMyName cs = new CheckMyName();
-		cs.host.setKey("local","host");
-	}
-	
-
-}
--- a/src/alice/test/topology/share/CheckMyName.java	Tue Jul 03 16:01:36 2012 +0900
+++ b/src/alice/test/topology/share/CheckMyName.java	Tue Jul 10 02:30:25 2012 +0900
@@ -6,7 +6,7 @@
 import alice.codesegment.CodeSegment;
 import alice.datasegment.CommandType;
 import alice.datasegment.Receiver;
-import alice.test.topology.movement.FishPoint;
+import alice.test.topology.fishmodel.alpha.FishPoint;
 
 public class CheckMyName extends CodeSegment {
 	Receiver host = ids.create(CommandType.PEEK);
--- a/src/alice/test/topology/share/CheckNeedLocalUpdate.java	Tue Jul 03 16:01:36 2012 +0900
+++ b/src/alice/test/topology/share/CheckNeedLocalUpdate.java	Tue Jul 10 02:30:25 2012 +0900
@@ -3,7 +3,7 @@
 import alice.codesegment.CodeSegment;
 import alice.datasegment.CommandType;
 import alice.datasegment.Receiver;
-import alice.test.topology.movement.FishPoint;
+import alice.test.topology.fishmodel.alpha.FishPoint;
 
 public class CheckNeedLocalUpdate extends CodeSegment {
 
@@ -19,9 +19,11 @@
 
 	@Override
 	public void run() {
+		System.out.println(this.local.from);
 		if (this.parent.index > this.local.index){
 			System.out.println("local is updated");
 			ods.update("local", this.key, this.parent.asClass(FishPoint.class));
+	
 		}
 		new CheckParentIndex(this.key ,this.parent.index);
 		
--- a/src/alice/test/topology/share/CheckNeedParentUpdate.java	Tue Jul 03 16:01:36 2012 +0900
+++ b/src/alice/test/topology/share/CheckNeedParentUpdate.java	Tue Jul 10 02:30:25 2012 +0900
@@ -3,7 +3,7 @@
 import alice.codesegment.CodeSegment;
 import alice.datasegment.CommandType;
 import alice.datasegment.Receiver;
-import alice.test.topology.movement.FishPoint;
+import alice.test.topology.fishmodel.alpha.FishPoint;
 
 public class CheckNeedParentUpdate extends CodeSegment {
 
--- a/src/alice/test/topology/share/CheckParentIndex.java	Tue Jul 03 16:01:36 2012 +0900
+++ b/src/alice/test/topology/share/CheckParentIndex.java	Tue Jul 10 02:30:25 2012 +0900
@@ -16,6 +16,7 @@
 	
 	@Override
 	public void run() {
+		//System.out.println(this.parent.from);
 		new CheckNeedLocalUpdate(this.key, parent);
 	}