Commit ba96749d authored by Peter Wagenhuber's avatar Peter Wagenhuber
Browse files

need another test architecture

parent b43ef99f
......@@ -180,19 +180,19 @@ public class Nloc {
List<List<SequenceTuple>> oldsequences;
do {
oldsequences = new ArrayList<List<SequenceTuple>>(sequences);
System.out.println("oldseq: " + oldsequences);
System.out.println("");
//System.out.println("oldseq: " + oldsequences);
//System.out.println("");
List<List<SequenceTuple>> tmpSeqs = new ArrayList<List<SequenceTuple>>();
System.out.println("sequences before for computing: " + sequences);
System.out.println("");
//System.out.println("sequences before for computing: " + sequences);
//System.out.println("");
for (List<SequenceTuple> stl: sequences) {
tmpSeqs.addAll(
this.computeSequences(stl));
}
sequences = tmpSeqs;
System.out.println("sequences after for computing: " + sequences);
System.out.println("");
System.out.println("");
//System.out.println("sequences after for computing: " + sequences);
//System.out.println("");
//System.out.println("");
} while (sequences.size() != oldsequences.size());
} catch (Exception e) {
System.out.println( e.getMessage());
......@@ -276,7 +276,7 @@ public class Nloc {
this.moveDroplets();
} catch (CoalescedDropletException e) {
works = false;
System.out.println(e.getDroplet());
System.out.println("Coalesce! Droplet: " + e.getDroplet().getName() + " Position: " + e.getDroplet().getPosition().getChannel().getName());
break;
}
}
......@@ -519,8 +519,8 @@ public class Nloc {
//possibleSequences.add(seqTupList);
if (dropletPath.contains(currentBifurcation) && prio > 0 &&
!(currentBifurcation instanceof Pump)) {
System.out.println("we need header for: " + currentSeqTup.getDroplet() + " " + currentSeqTup.getDroplet().getName());
System.out.println("At: " + currentBifurcation.getName());
//System.out.println("we need header for: " + currentSeqTup.getDroplet() + " " + currentSeqTup.getDroplet().getName());
//System.out.println("At: " + currentBifurcation.getName());
// we need header droplet
// cirst check all possible paths of header droplets
......
......@@ -62,26 +62,32 @@ public class TestNloc {
//printPaths(allPaths);
//TODO: this
String[] mtv = {"h0", "m2", "m3"};
try {
List<List<SequenceTuple>> stll = nl.getPossibleSequences(mtv);
printSequences(stll);
} catch (NoSuchModuleException e) {
System.out.println(e.getMessage());
}
//int count = 0;
//for (List<Channel> path: allPaths) {
// String[] modulesToVisit = extractModuleStringArrayFromPath(path);
// System.out.println("Modules to visit: ");
// for (String str: modulesToVisit) {
// System.out.print(str + " " );
// }
// System.out.println("Pathnum: " + count++);
// Pump p = nl.getShortestSequence(modulesToVisit);
// printPumpcontents(p);
//String[] mtv = {"h3", "m1", "m3", "m0", "m5"};
//try {
// List<List<SequenceTuple>> stll = nl.getPossibleSequences(mtv);
// printSequences(stll);
//} catch (NoSuchModuleException e) {
// System.out.println(e.getMessage());
//}
int count = 0;
for (List<Channel> path: allPaths) {
String[] modulesToVisit = extractModuleStringArrayFromPath(path);
System.out.println("Modules to visit: ");
for (String str: modulesToVisit) {
System.out.print(str + " " );
}
System.out.println("Pathnum: " + count++);
try {
List<List<SequenceTuple>> stll = nl.getPossibleSequences(modulesToVisit);
printSequences(stll);
} catch (Exception e) {
e.printStackTrace();
}
//Pump p = nl.getShortestSequence(modulesToVisit);
//printPumpcontents(p);
}
//Droplet pld = new Droplet(DropletType.PAYLOAD,"p");
//Droplet hdr = new Droplet(DropletType.HEADER,"h");
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment