+ /* if the algo can improve results, provide an initial solution with heur3 */
+ if(improve && algos[algo].can_improve_existing) {
+ co_complete_stats_t stats;
+
+ /* produce a heuristical solution */
+ co_solve_heuristic_java(co);
+
+ /* do the stats and provide the current costs */
+ co_complete_stats(co, &stats);
+ be_stat_ev_ull("co_prepare_costs", stats.costs);
+ }
+
+#ifdef WITH_JVM
+ /* start the JVM here so that it does not tamper the timing. */
+ if(algo == CO_ALGO_HEUR3)
+ be_java_coal_start_jvm();
+#endif
+
+ algo_func = algos[algo].algo;
+
+#ifdef WITH_LIBCORE
+ lc_timer_reset_and_start(timer);
+#endif
+
+ was_optimal = algo_func(co);
+
+#ifdef WITH_LIBCORE
+ lc_timer_stop(timer);
+ be_stat_ev("co_time", lc_timer_elapsed_msec(timer));
+#endif
+
+ be_stat_ev_ull("co_optimal", was_optimal);