changeset 134:53aff28cde6b working

change package
author sugi
date Wed, 15 Aug 2012 17:11:57 +0900
parents 26b4b18c51fa
children 2f401fd70311
files src/alice/test/codesegment/local/StartCodeSegment.java src/alice/test/codesegment/local/TestCodeSegment.java src/alice/test/topology/aquarium/AddRoutingTable.java src/alice/test/topology/aquarium/AutoIncrement.java src/alice/test/topology/aquarium/CheckLocalIndex.java src/alice/test/topology/aquarium/CheckMyName.java src/alice/test/topology/aquarium/FishMovementConfig.java src/alice/test/topology/aquarium/FishMovementTopology.java src/alice/test/topology/aquarium/FishPoint.java src/alice/test/topology/aquarium/KeyInput.java src/alice/test/topology/aquarium/KeyInputCodeSegment.java src/alice/test/topology/aquarium/MakeFrame.java src/alice/test/topology/aquarium/MakeObject.java src/alice/test/topology/aquarium/Routing.java src/alice/test/topology/aquarium/RoutingTable.java src/alice/test/topology/aquarium/SendLocation.java src/alice/test/topology/aquarium/SetLocation.java src/alice/test/topology/aquarium/StartFishMovement.java src/alice/test/topology/aquarium/Update.java src/alice/test/topology/fishmodel/alpha/AutoIncrement.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/MakeFrame.java src/alice/test/topology/fishmodel/alpha/MakeObject.java src/alice/test/topology/fishmodel/alpha/SendLocation.java src/alice/test/topology/fishmodel/alpha/SetLocation.java src/alice/test/topology/fishmodel/beta/AddRoutingTable.java src/alice/test/topology/fishmodel/beta/CheckLocalIndex.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/fishmodel/beta/Update.java src/alice/test/topology/share/CheckMyName.java src/alice/test/topology/share/CheckNeedLocalUpdate.java src/alice/test/topology/share/CheckNeedParentUpdate.java
diffstat 39 files changed, 733 insertions(+), 738 deletions(-) [+]
line wrap: on
line diff
--- a/src/alice/test/codesegment/local/StartCodeSegment.java	Tue Aug 14 21:02:11 2012 +0900
+++ b/src/alice/test/codesegment/local/StartCodeSegment.java	Wed Aug 15 17:11:57 2012 +0900
@@ -1,7 +1,7 @@
 package alice.test.codesegment.local;
 
 import alice.codesegment.CodeSegment;
-import alice.test.topology.fishmodel.alpha.FishPoint;
+import alice.test.topology.aquarium.FishPoint;
 
 public class StartCodeSegment extends CodeSegment {
 
--- a/src/alice/test/codesegment/local/TestCodeSegment.java	Tue Aug 14 21:02:11 2012 +0900
+++ b/src/alice/test/codesegment/local/TestCodeSegment.java	Wed Aug 15 17:11:57 2012 +0900
@@ -3,7 +3,7 @@
 import alice.codesegment.CodeSegment;
 import alice.datasegment.CommandType;
 import alice.datasegment.Receiver;
-import alice.test.topology.fishmodel.alpha.FishPoint;
+import alice.test.topology.aquarium.FishPoint;
 
 public class TestCodeSegment extends CodeSegment {
 	
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/alice/test/topology/aquarium/AddRoutingTable.java	Wed Aug 15 17:11:57 2012 +0900
@@ -0,0 +1,28 @@
+package alice.test.topology.aquarium;
+
+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() {
+		System.out.println("add "+this.mail.from);
+		routing.table.add(new Routing(this.mail.from));
+		
+		ods.update("local", "list", this.routing);
+		new AddRoutingTable(this.routing,this.mail.index);
+		
+	}
+	
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/alice/test/topology/aquarium/AutoIncrement.java	Wed Aug 15 17:11:57 2012 +0900
@@ -0,0 +1,47 @@
+package alice.test.topology.aquarium;
+
+import alice.codesegment.CodeSegment;
+import alice.datasegment.CommandType;
+import alice.datasegment.Receiver;
+
+public class AutoIncrement extends CodeSegment {
+	
+	public Receiver position = ids.create(CommandType.PEEK);	
+	String key;
+	float max = 3.3f;
+	float min = -1.3f;
+	
+	public AutoIncrement(String key,int index){
+		this.key = key;
+		this.position.setKey("local", key,index);
+	}
+
+	@Override
+	public void run() {
+		FishPoint fp = this.position.asClass(FishPoint.class);
+		if (fp.getX()+0.01>max){
+			fp.setXY(min, fp.getY());
+		} else if (fp.getX()+0.01< min){
+			fp.setXY(max, fp.getY());
+		}
+		else {
+			fp.setXY(fp.getX()+0.01f, fp.getY());
+		}
+		
+		ods.update("local", key, fp);
+		synchronized(this){
+			try {
+				// TODO
+				// Waiting should be done in Alice kernel
+				// ids.create(CommandType.WAIT);
+			 
+				wait(10);
+			} catch (InterruptedException e) {
+				e.printStackTrace();
+			}
+		}
+		
+		new AutoIncrement(this.key,this.position.index);
+	}
+	
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/alice/test/topology/aquarium/CheckLocalIndex.java	Wed Aug 15 17:11:57 2012 +0900
@@ -0,0 +1,23 @@
+package alice.test.topology.aquarium;
+
+import alice.codesegment.CodeSegment;
+import alice.datasegment.CommandType;
+import alice.datasegment.Receiver;
+
+public class CheckLocalIndex extends CodeSegment {
+
+	private Receiver data = ids.create(CommandType.PEEK);
+	String key;
+	
+	public CheckLocalIndex(String key, int index){
+		this.key = key;
+		this.data.setKey("local", this.key, index);
+	}
+	
+	@Override
+	public void run() {
+		new Update(this.key, this.data);
+		
+	}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/alice/test/topology/aquarium/CheckMyName.java	Wed Aug 15 17:11:57 2012 +0900
@@ -0,0 +1,78 @@
+package alice.test.topology.aquarium;
+
+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]+)$");
+	String key = "fish";
+	
+	@Override
+	public void run(){
+		
+		String name = host.asString();
+		Matcher matcher = pattern.matcher(name);
+		
+		matcher.find();
+		String type = matcher.group(1);
+		int num = new Integer(matcher.group(2));
+		/*
+		ods.put("local", "myMax", num);
+		if (type.equals("cli")){
+			ods.put("parent", "check", num);
+		}else if (type.equals("node")){
+			if (num !=0){
+				ods.put("parent", "check", num);
+			} else {
+				
+			}
+		}
+		*/
+		
+		MakeFrame frame =  new MakeFrame(name);
+		RoutingTable routing = new RoutingTable();
+		/*
+		ods.put("local", "max", num);
+		new CheckLocalIndex(key,1);
+		*/
+		if (type.equals("cli")){
+			System.out.println("cli"+num);
+			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"+num);
+			if (num != 0){
+				routing.table.add(new Routing("parent"));
+				ods.put("parent", "member", name);
+				
+			}
+			ods.put("local", "list", routing);
+			new AddRoutingTable(routing,0);
+			
+		}
+		
+		ods.update("local", key, new FishPoint(-0.1f,-0.1f));
+		new SetLocation(new MakeObject(frame),key,0,num);
+		new CheckLocalIndex(key,1);
+		
+		for (int i = 0;i < 3 ; i++){
+			key = "fish"+i;
+			if (num == 0) new AutoIncrement(key,0);
+			ods.update("local", key, new FishPoint(0.2f*i,0.2f*i));
+			new SetLocation(new MakeObject(frame),key,0,num);
+			new CheckLocalIndex(key,1);
+		}
+		
+		
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/alice/test/topology/aquarium/FishMovementConfig.java	Wed Aug 15 17:11:57 2012 +0900
@@ -0,0 +1,12 @@
+package alice.test.topology.aquarium;
+
+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/aquarium/FishMovementTopology.java	Wed Aug 15 17:11:57 2012 +0900
@@ -0,0 +1,11 @@
+package alice.test.topology.aquarium;
+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/aquarium/FishPoint.java	Wed Aug 15 17:11:57 2012 +0900
@@ -0,0 +1,53 @@
+package alice.test.topology.aquarium;
+
+import org.msgpack.annotation.Message;
+
+@Message
+public class FishPoint {
+	// public fields are serialized.
+	public float x = 0.0f;
+	public float y = 0.0f;
+	public float z = 0.0f;
+	public String vector = "light"; 
+	
+	public FishPoint(){}
+	
+	public FishPoint(float x,float y){
+		this.x = x;
+		this.y = y;
+	}
+	
+	public FishPoint(float x,float y,float z){
+		this.x = x;
+		this.y = y;
+		this.z = z;
+	}
+	
+	public void setXY(float x,float y){
+		this.x = x;
+		this.y = y;
+	}
+	
+	public void setXYZ(float x,float y,float z){
+		this.x = x;
+		this.y = y;
+		this.z = z;
+	}
+	
+	public float getX(){
+		return this.x;
+	}
+	
+	public float getY(){
+		return this.y;
+	}
+	
+	public float getZ(){
+		return this.z;
+	}
+	
+	public String getVector(){
+		return this.vector;
+	}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/alice/test/topology/aquarium/KeyInput.java	Wed Aug 15 17:11:57 2012 +0900
@@ -0,0 +1,57 @@
+package alice.test.topology.aquarium;
+
+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/aquarium/KeyInputCodeSegment.java	Wed Aug 15 17:11:57 2012 +0900
@@ -0,0 +1,50 @@
+package alice.test.topology.aquarium;
+
+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/aquarium/MakeFrame.java	Wed Aug 15 17:11:57 2012 +0900
@@ -0,0 +1,106 @@
+package alice.test.topology.aquarium;
+
+import java.awt.GraphicsConfiguration;
+import java.awt.image.BufferedImage;
+import java.io.File;
+import java.io.IOException;
+
+import javax.imageio.ImageIO;
+import javax.media.j3d.Background;
+import javax.media.j3d.BoundingSphere;
+import javax.media.j3d.BranchGroup;
+import javax.media.j3d.Canvas3D;
+import javax.media.j3d.DirectionalLight;
+import javax.media.j3d.ImageComponent2D;
+
+import javax.swing.JFrame;
+import javax.swing.JPanel;
+import javax.vecmath.Color3f;
+import javax.vecmath.Point3d;
+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 KeyInputCodeSegment kics;
+	
+	public MakeFrame(String str){
+		JFrame frame = new JFrame(str);
+		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());
+		universe.addBranchGraph(setBackground());
+		
+		kics = new KeyInputCodeSegment();
+		canvas.addKeyListener(kics);
+		frame.setVisible(true);
+		
+		ViewingPlatform camera = universe.getViewingPlatform();
+		camera.setNominalViewingTransform();
+	}
+	
+	private BranchGroup setBackground(){
+		BranchGroup scene = new BranchGroup();
+		BufferedImage img = null;
+		try {
+			img = ImageIO.read(new File("../image/image1.jpg"));
+		} catch (IOException e) {
+		  	e.printStackTrace();
+		}
+		ImageComponent2D image = 
+				new ImageComponent2D(ImageComponent2D.FORMAT_RGBA8,img);
+		Background background = new Background(image);
+		background.setImageScaleMode(Background.SCALE_FIT_ALL);
+		BoundingSphere bounds = new BoundingSphere(new Point3d(0.0, 0.0, 0.0), Double.POSITIVE_INFINITY);
+		background.setApplicationBounds(bounds);
+		scene.addChild(background);
+		return scene;
+		
+	}
+	
+	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 SimpleUniverse getUniverse(){
+		return this.universe;
+	}
+	
+	public Canvas3D getCanvas(){
+		return this.canvas;
+	}
+	
+	public KeyInputCodeSegment getKeySegment(){
+		return this.kics;
+	}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/alice/test/topology/aquarium/MakeObject.java	Wed Aug 15 17:11:57 2012 +0900
@@ -0,0 +1,111 @@
+package alice.test.topology.aquarium;
+
+import java.awt.Image;
+import java.awt.MediaTracker;
+import java.awt.Toolkit;
+import java.io.FileNotFoundException;
+
+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.Matrix4d;
+import javax.vecmath.Vector3f;
+
+import com.sun.j3d.loaders.IncorrectFormatException;
+import com.sun.j3d.loaders.ParsingErrorException;
+import com.sun.j3d.loaders.Scene;
+import com.sun.j3d.loaders.objectfile.ObjectFile;
+
+import com.sun.j3d.utils.image.TextureLoader;
+
+public class MakeObject {
+	
+	public Vector3f vector;
+	private Transform3D transform;  
+	private TransformGroup transform_group;
+	private Canvas3D canvas;
+	private Matrix4d matrix;
+	private double s = 0.3;
+	
+	
+	public MakeObject(MakeFrame MF){
+		this.canvas = MF.getCanvas();
+		MF.register(this);
+	}
+	
+	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());*/
+		ObjectFile obj = new ObjectFile(ObjectFile.RESIZE);
+		Scene img = null;
+		try{
+			img = obj.load("../image/TUNA");
+		} catch(FileNotFoundException e){
+			System.err.println(e);
+			System.exit(1);
+		} catch(ParsingErrorException e){
+			System.err.println(e);
+			System.exit(1);
+		} catch(IncorrectFormatException e){
+			System.err.println(e);
+			System.exit(1);
+		}
+		
+		transform_group = new TransformGroup();
+		setLocation(-2.0f,-2.0f);//set out of window
+		transform_group.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);
+		transform_group.addChild(img.getSceneGroup());
+		scene.addChild(transform_group);
+		return scene;		
+	}
+	
+	public Appearance createAppearance(){
+		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();
+		matrix = new Matrix4d(s,0,0,x,
+							  0,s,0,y,
+							  0,0,s,0,
+							  0,0,0,1);
+		transform.set(matrix);
+		transform_group.setTransform(transform);
+	}
+	
+	public void setLocation(float x,float y,float z){
+		transform = new Transform3D();
+		matrix = new Matrix4d(s,0,0,x,
+				  			  0,s,0,y,
+				  			  0,0,s,z,
+				  			  0,0,0,1);
+		transform.set(matrix);
+		transform_group.setTransform(transform);
+	}
+	
+	
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/alice/test/topology/aquarium/Routing.java	Wed Aug 15 17:11:57 2012 +0900
@@ -0,0 +1,14 @@
+package alice.test.topology.aquarium;
+
+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/aquarium/RoutingTable.java	Wed Aug 15 17:11:57 2012 +0900
@@ -0,0 +1,12 @@
+package alice.test.topology.aquarium;
+
+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/aquarium/SendLocation.java	Wed Aug 15 17:11:57 2012 +0900
@@ -0,0 +1,41 @@
+package alice.test.topology.aquarium;
+
+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;
+	float max = 3.3f;
+	float min = -1.3f;
+	
+	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);
+		/*
+		if (fp.getX()+this.x>max){
+			fp.setXY(-1.0f, fp.getY()+this.y);
+		} else if (fp.getX()+this.x< min){
+			fp.setXY(max, fp.getY()+this.y);
+		}
+		else {
+			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/aquarium/SetLocation.java	Wed Aug 15 17:11:57 2012 +0900
@@ -0,0 +1,39 @@
+package alice.test.topology.aquarium;
+
+import alice.codesegment.CodeSegment;
+import alice.datasegment.CommandType;
+import alice.datasegment.Receiver;
+
+
+public class SetLocation extends CodeSegment{
+	
+	private Receiver position = ids.create(CommandType.PEEK);
+	MakeObject obj;
+	String key;
+	String vector;
+	int range;
+	
+	public SetLocation(MakeObject obj ,String key,int index,int range){
+		this.obj = obj;
+		this.key = key;
+		this.range = range;
+		this.position.setKey("local",key,index);
+	}
+	
+	@Override
+	public void run(){
+		
+		FishPoint fp = this.position.asClass(FishPoint.class);
+		//obj.setLocation(fp.getX() - 2*range, fp.getY());
+		
+		float startX = 2*range - 1.5f;
+		float endX = 2*range + 1.5f;
+		if (startX <= fp.getX() && fp.getX() < endX)
+			obj.setLocation(fp.getX() - 2*range, fp.getY());
+		
+		new SetLocation(this.obj,this.key,this.position.index,this.range);
+					
+	}
+	
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/alice/test/topology/aquarium/StartFishMovement.java	Wed Aug 15 17:11:57 2012 +0900
@@ -0,0 +1,13 @@
+package alice.test.topology.aquarium;
+
+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/aquarium/Update.java	Wed Aug 15 17:11:57 2012 +0900
@@ -0,0 +1,33 @@
+package alice.test.topology.aquarium;
+
+import alice.codesegment.CodeSegment;
+import alice.datasegment.CommandType;
+import alice.datasegment.Receiver;
+
+public class Update extends CodeSegment {
+	
+	private Receiver list = ids.create(CommandType.PEEK);
+	private Receiver data;
+	String key;
+	
+	public Update(String key,Receiver data){
+		this.key = key;
+		this.data = data;
+		this.list.setKey("local", "list");
+	}
+
+	@Override
+	public void run() {
+		RoutingTable RT = this.list.asClass(RoutingTable.class);
+		for (Routing r : RT.table) {
+			if (!r.name.equals(this.data.from)){
+				ods.update(r.name, this.key, this.data.val);
+			}
+			
+		}
+		
+		new CheckLocalIndex(this.key,this.data.index);
+		
+	}
+
+}
--- a/src/alice/test/topology/fishmodel/alpha/AutoIncrement.java	Tue Aug 14 21:02:11 2012 +0900
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,47 +0,0 @@
-package alice.test.topology.fishmodel.alpha;
-
-import alice.codesegment.CodeSegment;
-import alice.datasegment.CommandType;
-import alice.datasegment.Receiver;
-
-public class AutoIncrement extends CodeSegment {
-	
-	public Receiver position = ids.create(CommandType.PEEK);	
-	String key;
-	float max = 3.3f;
-	float min = -1.3f;
-	
-	public AutoIncrement(String key,int index){
-		this.key = key;
-		this.position.setKey("local", key,index);
-	}
-
-	@Override
-	public void run() {
-		FishPoint fp = this.position.asClass(FishPoint.class);
-		if (fp.getX()+0.01>max){
-			fp.setXY(min, fp.getY());
-		} else if (fp.getX()+0.01< min){
-			fp.setXY(max, fp.getY());
-		}
-		else {
-			fp.setXY(fp.getX()+0.01f, fp.getY());
-		}
-		
-		ods.update("local", key, fp);
-		synchronized(this){
-			try {
-				// TODO
-				// Waiting should be done in Alice kernel
-				// ids.create(CommandType.WAIT);
-			 
-				wait(10);
-			} catch (InterruptedException e) {
-				e.printStackTrace();
-			}
-		}
-		
-		new AutoIncrement(this.key,this.position.index);
-	}
-	
-}
--- a/src/alice/test/topology/fishmodel/alpha/FishPoint.java	Tue Aug 14 21:02:11 2012 +0900
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,53 +0,0 @@
-package alice.test.topology.fishmodel.alpha;
-
-import org.msgpack.annotation.Message;
-
-@Message
-public class FishPoint {
-	// public fields are serialized.
-	public float x = 0.0f;
-	public float y = 0.0f;
-	public float z = 0.0f;
-	public String vector = "light"; 
-	
-	public FishPoint(){}
-	
-	public FishPoint(float x,float y){
-		this.x = x;
-		this.y = y;
-	}
-	
-	public FishPoint(float x,float y,float z){
-		this.x = x;
-		this.y = y;
-		this.z = z;
-	}
-	
-	public void setXY(float x,float y){
-		this.x = x;
-		this.y = y;
-	}
-	
-	public void setXYZ(float x,float y,float z){
-		this.x = x;
-		this.y = y;
-		this.z = z;
-	}
-	
-	public float getX(){
-		return this.x;
-	}
-	
-	public float getY(){
-		return this.y;
-	}
-	
-	public float getZ(){
-		return this.z;
-	}
-	
-	public String getVector(){
-		return this.vector;
-	}
-
-}
--- a/src/alice/test/topology/fishmodel/alpha/KeyInput.java	Tue Aug 14 21:02:11 2012 +0900
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,57 +0,0 @@
-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
--- a/src/alice/test/topology/fishmodel/alpha/KeyInputCodeSegment.java	Tue Aug 14 21:02:11 2012 +0900
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,50 +0,0 @@
-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) {
-		
-	}
-
-}
--- a/src/alice/test/topology/fishmodel/alpha/MakeFrame.java	Tue Aug 14 21:02:11 2012 +0900
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,106 +0,0 @@
-package alice.test.topology.fishmodel.alpha;
-
-import java.awt.GraphicsConfiguration;
-import java.awt.image.BufferedImage;
-import java.io.File;
-import java.io.IOException;
-
-import javax.imageio.ImageIO;
-import javax.media.j3d.Background;
-import javax.media.j3d.BoundingSphere;
-import javax.media.j3d.BranchGroup;
-import javax.media.j3d.Canvas3D;
-import javax.media.j3d.DirectionalLight;
-import javax.media.j3d.ImageComponent2D;
-
-import javax.swing.JFrame;
-import javax.swing.JPanel;
-import javax.vecmath.Color3f;
-import javax.vecmath.Point3d;
-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 KeyInputCodeSegment kics;
-	
-	public MakeFrame(String str){
-		JFrame frame = new JFrame(str);
-		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());
-		universe.addBranchGraph(setBackground());
-		
-		kics = new KeyInputCodeSegment();
-		canvas.addKeyListener(kics);
-		frame.setVisible(true);
-		
-		ViewingPlatform camera = universe.getViewingPlatform();
-		camera.setNominalViewingTransform();
-	}
-	
-	private BranchGroup setBackground(){
-		BranchGroup scene = new BranchGroup();
-		BufferedImage img = null;
-		try {
-			img = ImageIO.read(new File("../image/image1.jpg"));
-		} catch (IOException e) {
-		  	e.printStackTrace();
-		}
-		ImageComponent2D image = 
-				new ImageComponent2D(ImageComponent2D.FORMAT_RGBA8,img);
-		Background background = new Background(image);
-		background.setImageScaleMode(Background.SCALE_FIT_ALL);
-		BoundingSphere bounds = new BoundingSphere(new Point3d(0.0, 0.0, 0.0), Double.POSITIVE_INFINITY);
-		background.setApplicationBounds(bounds);
-		scene.addChild(background);
-		return scene;
-		
-	}
-	
-	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 SimpleUniverse getUniverse(){
-		return this.universe;
-	}
-	
-	public Canvas3D getCanvas(){
-		return this.canvas;
-	}
-	
-	public KeyInputCodeSegment getKeySegment(){
-		return this.kics;
-	}
-
-}
--- a/src/alice/test/topology/fishmodel/alpha/MakeObject.java	Tue Aug 14 21:02:11 2012 +0900
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,111 +0,0 @@
-package alice.test.topology.fishmodel.alpha;
-
-import java.awt.Image;
-import java.awt.MediaTracker;
-import java.awt.Toolkit;
-import java.io.FileNotFoundException;
-
-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.Matrix4d;
-import javax.vecmath.Vector3f;
-
-import com.sun.j3d.loaders.IncorrectFormatException;
-import com.sun.j3d.loaders.ParsingErrorException;
-import com.sun.j3d.loaders.Scene;
-import com.sun.j3d.loaders.objectfile.ObjectFile;
-
-import com.sun.j3d.utils.image.TextureLoader;
-
-public class MakeObject {
-	
-	public Vector3f vector;
-	private Transform3D transform;  
-	private TransformGroup transform_group;
-	private Canvas3D canvas;
-	private Matrix4d matrix;
-	private double s = 0.3;
-	
-	
-	public MakeObject(MakeFrame MF){
-		this.canvas = MF.getCanvas();
-		MF.register(this);
-	}
-	
-	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());*/
-		ObjectFile obj = new ObjectFile(ObjectFile.RESIZE);
-		Scene img = null;
-		try{
-			img = obj.load("../image/TUNA");
-		} catch(FileNotFoundException e){
-			System.err.println(e);
-			System.exit(1);
-		} catch(ParsingErrorException e){
-			System.err.println(e);
-			System.exit(1);
-		} catch(IncorrectFormatException e){
-			System.err.println(e);
-			System.exit(1);
-		}
-		
-		transform_group = new TransformGroup();
-		setLocation(-2.0f,-2.0f);//set out of window
-		transform_group.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);
-		transform_group.addChild(img.getSceneGroup());
-		scene.addChild(transform_group);
-		return scene;		
-	}
-	
-	public Appearance createAppearance(){
-		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();
-		matrix = new Matrix4d(s,0,0,x,
-							  0,s,0,y,
-							  0,0,s,0,
-							  0,0,0,1);
-		transform.set(matrix);
-		transform_group.setTransform(transform);
-	}
-	
-	public void setLocation(float x,float y,float z){
-		transform = new Transform3D();
-		matrix = new Matrix4d(s,0,0,x,
-				  			  0,s,0,y,
-				  			  0,0,s,z,
-				  			  0,0,0,1);
-		transform.set(matrix);
-		transform_group.setTransform(transform);
-	}
-	
-	
-}
-
--- a/src/alice/test/topology/fishmodel/alpha/SendLocation.java	Tue Aug 14 21:02:11 2012 +0900
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,41 +0,0 @@
-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;
-	float max = 3.3f;
-	float min = -1.3f;
-	
-	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);
-		/*
-		if (fp.getX()+this.x>max){
-			fp.setXY(-1.0f, fp.getY()+this.y);
-		} else if (fp.getX()+this.x< min){
-			fp.setXY(max, fp.getY()+this.y);
-		}
-		else {
-			fp.setXY(fp.getX()+this.x, fp.getY()+this.y);
-		}
-		*/
-		
-		ods.update("local", "fish", fp);
-		
-	}
-
-}
--- a/src/alice/test/topology/fishmodel/alpha/SetLocation.java	Tue Aug 14 21:02:11 2012 +0900
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-package alice.test.topology.fishmodel.alpha;
-
-import alice.codesegment.CodeSegment;
-import alice.datasegment.CommandType;
-import alice.datasegment.Receiver;
-
-
-public class SetLocation extends CodeSegment{
-	
-	private Receiver position = ids.create(CommandType.PEEK);
-	MakeObject obj;
-	String key;
-	String vector;
-	int range;
-	
-	public SetLocation(MakeObject obj ,String key,int index,int range){
-		this.obj = obj;
-		this.key = key;
-		this.range = range;
-		this.position.setKey("local",key,index);
-	}
-	
-	@Override
-	public void run(){
-		
-		FishPoint fp = this.position.asClass(FishPoint.class);
-		//obj.setLocation(fp.getX() - 2*range, fp.getY());
-		
-		float startX = 2*range - 1.5f;
-		float endX = 2*range + 1.5f;
-		if (startX <= fp.getX() && fp.getX() < endX)
-			obj.setLocation(fp.getX() - 2*range, fp.getY());
-		
-		new SetLocation(this.obj,this.key,this.position.index,this.range);
-					
-	}
-	
-
-}
--- a/src/alice/test/topology/fishmodel/beta/AddRoutingTable.java	Tue Aug 14 21:02:11 2012 +0900
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,28 +0,0 @@
-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() {
-		System.out.println("add "+this.mail.from);
-		routing.table.add(new Routing(this.mail.from));
-		
-		ods.update("local", "list", this.routing);
-		new AddRoutingTable(this.routing,this.mail.index);
-		
-	}
-	
-}
--- a/src/alice/test/topology/fishmodel/beta/CheckLocalIndex.java	Tue Aug 14 21:02:11 2012 +0900
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-package alice.test.topology.fishmodel.beta;
-
-import alice.codesegment.CodeSegment;
-import alice.datasegment.CommandType;
-import alice.datasegment.Receiver;
-
-public class CheckLocalIndex extends CodeSegment {
-
-	private Receiver data = ids.create(CommandType.PEEK);
-	String key;
-	
-	public CheckLocalIndex(String key, int index){
-		this.key = key;
-		this.data.setKey("local", this.key, index);
-	}
-	
-	@Override
-	public void run() {
-		new Update(this.key, this.data);
-		
-	}
-
-}
--- a/src/alice/test/topology/fishmodel/beta/CheckMyName.java	Tue Aug 14 21:02:11 2012 +0900
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,83 +0,0 @@
-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;
-import alice.test.topology.fishmodel.alpha.AutoIncrement;
-import alice.test.topology.fishmodel.alpha.SetLocation;
-import alice.test.topology.fishmodel.alpha.FishPoint;
-import alice.test.topology.fishmodel.alpha.MakeFrame;
-import alice.test.topology.fishmodel.alpha.MakeObject;
-
-
-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 num = new Integer(matcher.group(2));
-		/*
-		ods.put("local", "myMax", num);
-		if (type.equals("cli")){
-			ods.put("parent", "check", num);
-		}else if (type.equals("node")){
-			if (num !=0){
-				ods.put("parent", "check", num);
-			} else {
-				
-			}
-		}
-		*/
-		
-		MakeFrame frame =  new MakeFrame(name);
-		RoutingTable routing = new RoutingTable();
-		/*
-		ods.put("local", "max", num);
-		new CheckLocalIndex(key,1);
-		*/
-		if (type.equals("cli")){
-			System.out.println("cli"+num);
-			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"+num);
-			if (num != 0){
-				routing.table.add(new Routing("parent"));
-				ods.put("parent", "member", name);
-				
-			}
-			ods.put("local", "list", routing);
-			new AddRoutingTable(routing,0);
-			
-		}
-		
-		ods.update("local", key, new FishPoint(-0.1f,-0.1f));
-		new SetLocation(new MakeObject(frame),key,0,num);
-		new CheckLocalIndex(key,1);
-		
-		for (int i = 0;i < 3 ; i++){
-			key = "fish"+i;
-			if (num == 0) new AutoIncrement(key,0);
-			ods.update("local", key, new FishPoint(0.2f*i,0.2f*i));
-			new SetLocation(new MakeObject(frame),key,0,num);
-			new CheckLocalIndex(key,1);
-		}
-		
-		
-	}
-}
--- a/src/alice/test/topology/fishmodel/beta/FishMovementConfig.java	Tue Aug 14 21:02:11 2012 +0900
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,12 +0,0 @@
-package alice.test.topology.fishmodel.beta;
-
-import alice.topology.node.TopologyNodeConfig;;
-
-public class FishMovementConfig extends TopologyNodeConfig {
-	
-	public FishMovementConfig(String[] args){
-		super(args);
-	} 
-	
-
-}
--- a/src/alice/test/topology/fishmodel/beta/FishMovementTopology.java	Tue Aug 14 21:02:11 2012 +0900
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,11 +0,0 @@
-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());
-		
-	}
-
-}
--- a/src/alice/test/topology/fishmodel/beta/Routing.java	Tue Aug 14 21:02:11 2012 +0900
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,14 +0,0 @@
-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;
-	}
-}
--- a/src/alice/test/topology/fishmodel/beta/RoutingTable.java	Tue Aug 14 21:02:11 2012 +0900
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,12 +0,0 @@
-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>();
-	
-}
--- a/src/alice/test/topology/fishmodel/beta/StartFishMovement.java	Tue Aug 14 21:02:11 2012 +0900
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,13 +0,0 @@
-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/fishmodel/beta/Update.java	Tue Aug 14 21:02:11 2012 +0900
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-package alice.test.topology.fishmodel.beta;
-
-import alice.codesegment.CodeSegment;
-import alice.datasegment.CommandType;
-import alice.datasegment.Receiver;
-
-public class Update extends CodeSegment {
-	
-	private Receiver list = ids.create(CommandType.PEEK);
-	private Receiver data;
-	String key;
-	
-	public Update(String key,Receiver data){
-		this.key = key;
-		this.data = data;
-		this.list.setKey("local", "list");
-	}
-
-	@Override
-	public void run() {
-		RoutingTable RT = this.list.asClass(RoutingTable.class);
-		for (Routing r : RT.table) {
-			if (!r.name.equals(this.data.from)){
-				ods.update(r.name, this.key, this.data.val);
-			}
-			
-		}
-		
-		new CheckLocalIndex(this.key,this.data.index);
-		
-	}
-
-}
--- a/src/alice/test/topology/share/CheckMyName.java	Tue Aug 14 21:02:11 2012 +0900
+++ b/src/alice/test/topology/share/CheckMyName.java	Wed Aug 15 17:11:57 2012 +0900
@@ -6,7 +6,7 @@
 import alice.codesegment.CodeSegment;
 import alice.datasegment.CommandType;
 import alice.datasegment.Receiver;
-import alice.test.topology.fishmodel.alpha.FishPoint;
+import alice.test.topology.aquarium.FishPoint;
 
 public class CheckMyName extends CodeSegment {
 	Receiver host = ids.create(CommandType.PEEK);
--- a/src/alice/test/topology/share/CheckNeedLocalUpdate.java	Tue Aug 14 21:02:11 2012 +0900
+++ b/src/alice/test/topology/share/CheckNeedLocalUpdate.java	Wed Aug 15 17:11:57 2012 +0900
@@ -3,7 +3,7 @@
 import alice.codesegment.CodeSegment;
 import alice.datasegment.CommandType;
 import alice.datasegment.Receiver;
-import alice.test.topology.fishmodel.alpha.FishPoint;
+import alice.test.topology.aquarium.FishPoint;
 
 public class CheckNeedLocalUpdate extends CodeSegment {
 
--- a/src/alice/test/topology/share/CheckNeedParentUpdate.java	Tue Aug 14 21:02:11 2012 +0900
+++ b/src/alice/test/topology/share/CheckNeedParentUpdate.java	Wed Aug 15 17:11:57 2012 +0900
@@ -3,7 +3,7 @@
 import alice.codesegment.CodeSegment;
 import alice.datasegment.CommandType;
 import alice.datasegment.Receiver;
-import alice.test.topology.fishmodel.alpha.FishPoint;
+import alice.test.topology.aquarium.FishPoint;
 
 public class CheckNeedParentUpdate extends CodeSegment {