chiark / gitweb /
WIP routesearch; route tail guesswork pruning optimisation
[ypp-sc-tools.db-live.git] / yarrg / rscommon.h
index d81551443a3269402f5d3208680c22b32be5a9ef..f62fd99d9ed15cdf4d9cd873a6406c3d7a60d38b 100644 (file)
@@ -8,6 +8,7 @@
    DF(sql2)                                    \
    DF(value)                                   \
    DF(search)                                  \
+   DF(check)                                   \
    DF(lp)
 
 #define debug stdout
@@ -47,8 +48,20 @@ void sql_bind(sqlite3_stmt *ss, int index, int value,
 extern sqlite3 *db;
 
 void setup_sql(void);
-double value_route(int nislands, const int *islands);
+
+
+typedef struct {
+  double distance_loss_factor;
+  int ntrades;
+  struct TradesBlock *trades;
+  double route_tail_value;
+} IslandPair;
+
+IslandPair *ipair_get(int si, int di);
+
+double value_route(int nislands, const int *islands, int exclude_arbitrage);
 void setup_value(void);
+
 void setup_search(void);
 void search(int start_isle);