Merge branch 'master' of mojotrollz.eu:college

This commit is contained in:
senft-lap 2012-12-04 14:14:51 +01:00
commit b20d77a032

View File

@ -9,10 +9,10 @@ import java.util.logging.LogManager;
import node.Node;
public class RandomGenerator {
public static int initNodeCount = 10;
public static int initNodeCount = 20;
public static double initBirthRate = 0.50;
public static double initDeathRate = 0.20;
public static int initRounds = 10;
public static int initRounds = 13;
public static List<Node> nodes = new ArrayList<Node>();
public static Random gen = new Random();
@ -25,7 +25,8 @@ public class RandomGenerator {
System.setProperty("java.util.logging.config.file",
"logging.properties");
nodes.add(new Node());
add(initNodeCount);
try {
@ -47,7 +48,7 @@ public class RandomGenerator {
switch (cmd) {
case "br":
nodes.get(count).gatherInformationOfNetwork();
//
break;
case "add":
add(count);
@ -84,10 +85,10 @@ public class RandomGenerator {
case "go":
for (int i = 0; i < initRounds; i++) {
System.out.println("Round: " + (i + 1));
System.out.println("Nodecount: " + nodes.size());
int oldsize = nodes.size();
add((int) Math.round(oldsize * initBirthRate));
remove((int) Math.round(oldsize * initDeathRate));
System.out.println("Nodecount: " + nodes.size());
}
break;
default: