Don't add "0" rows to a glpk problem
authorBenjamin Poirier <benjamin.poirier@polymtl.ca>
Thu, 18 Feb 2010 19:42:55 +0000 (14:42 -0500)
committerPierre-Marc Fournier <pierre-marc.fournier@polymtl.ca>
Thu, 18 Feb 2010 21:43:26 +0000 (16:43 -0500)
glpk aborts if "0" rows are added, skip over the call.

Signed-off-by: Benjamin Poirier <benjamin.poirier@polymtl.ca>
lttv/lttv/sync/event_analysis_eval.c

index 6b96102071ddedea3ae42288ec7f86abfb0b72c7..39aa7cda93bec545109863f4517fbea9d026e00f 100644 (file)
@@ -1537,7 +1537,10 @@ static glp_prob* lpCreateProblem(GQueue* const lowerHull, GQueue* const
 
        // Create the LP problem
        glp_term_out(GLP_OFF);
-       glp_add_rows(lp, hullPointNb);
+       if (hullPointNb > 0)
+       {
+               glp_add_rows(lp, hullPointNb);
+       }
        glp_add_cols(lp, 2);
 
        glp_set_col_name(lp, 1, "a0");
This page took 0.024458 seconds and 4 git commands to generate.