chiark / gitweb /
remove arbitrage debugging printfs
authorIan Jackson <ian@liberator.relativity.greenend.org.uk>
Sat, 4 Sep 2010 20:33:42 +0000 (21:33 +0100)
committerIan Jackson <ian@liberator.relativity.greenend.org.uk>
Sat, 4 Sep 2010 20:33:42 +0000 (21:33 +0100)
src/com/tedpearson/ypp/market/MarketUploader.java

index df87f43d1d703a3ccd02da923d1f8081fad7e73d..f1f78e15a10b17382b77016946a21054bfc71385 100644 (file)
@@ -997,7 +997,7 @@ public class MarketUploader implements TopLevelWindowListener, GUIInitializedLis
     }
 
     private int calculateArbitrageCommodity(ArrayList<SortedSet<int[]>> arb_bs) {
     }
 
     private int calculateArbitrageCommodity(ArrayList<SortedSet<int[]>> arb_bs) {
-       System.out.println("ARBITRAGE?");
+       //System.out.println("ARBITRAGE?");
        int profit = 0;
        SortedSet<int[]> buys = arb_bs.get(0);
        SortedSet<int[]> sells = arb_bs.get(1);
        int profit = 0;
        SortedSet<int[]> buys = arb_bs.get(0);
        SortedSet<int[]> sells = arb_bs.get(1);
@@ -1013,8 +1013,8 @@ public class MarketUploader implements TopLevelWindowListener, GUIInitializedLis
 
            int unitprofit = buy[0] - sell[0];
            int count = buy[1] < sell[1] ? buy[1] : sell[1];
 
            int unitprofit = buy[0] - sell[0];
            int count = buy[1] < sell[1] ? buy[1] : sell[1];
-           System.out.println(" sell @"+sell[0]+" x"+sell[1]+" buy @"+buy[0]+" x"+buy[1]
-                              +" => x"+count+" @"+unitprofit);
+           //System.out.println(" sell @"+sell[0]+" x"+sell[1]+" buy @"+buy[0]+" x"+buy[1]
+           //                 +" => x"+count+" @"+unitprofit);
 
            if (unitprofit <= 0)
                break;
 
            if (unitprofit <= 0)
                break;
@@ -1025,7 +1025,7 @@ public class MarketUploader implements TopLevelWindowListener, GUIInitializedLis
            if (buy[1]==0) buys.remove(buy);
            if (sell[1]==0) sells.remove(sell);
        }
            if (buy[1]==0) buys.remove(buy);
            if (sell[1]==0) sells.remove(sell);
        }
-       System.out.println(" PROFIT "+profit);
+       //System.out.println(" PROFIT "+profit);
        return profit;
     }
 
        return profit;
     }
 
@@ -1046,7 +1046,7 @@ public class MarketUploader implements TopLevelWindowListener, GUIInitializedLis
 
        for (ArrayList<String> row : data) {
            String thiscommod = row.get(0);
 
        for (ArrayList<String> row : data) {
            String thiscommod = row.get(0);
-           System.out.println("ROW "+row.toString());
+           //System.out.println("ROW "+row.toString());
            if (lastcommod == null || !thiscommod.equals(lastcommod)) {
                if (lastcommod != null)
                    arbitrage += calculateArbitrageCommodity(arb_bs);
            if (lastcommod == null || !thiscommod.equals(lastcommod)) {
                if (lastcommod != null)
                    arbitrage += calculateArbitrageCommodity(arb_bs);
@@ -1054,7 +1054,7 @@ public class MarketUploader implements TopLevelWindowListener, GUIInitializedLis
                arb_bs = new ArrayList<SortedSet<int[]>>(2);
                arb_bs.add(0, new TreeSet<int[]>(compar));
                arb_bs.add(1, new TreeSet<int[]>(compar));
                arb_bs = new ArrayList<SortedSet<int[]>>(2);
                arb_bs.add(0, new TreeSet<int[]>(compar));
                arb_bs.add(1, new TreeSet<int[]>(compar));
-               System.out.println("ROW init");
+               //System.out.println("ROW init");
                lastcommod = thiscommod;
            }
            for (int bs = 0; bs < 2; bs++) {
                lastcommod = thiscommod;
            }
            for (int bs = 0; bs < 2; bs++) {