void lp_close(lp_prob *p) { #ifndef COMPILE_IN_LP int s_bufid; /* Send back the timing data for the whole algorithm */ s_bufid = init_send(DataInPlace); send_char_array((char *)&p->comp_times, sizeof(node_times)); send_msg(p->tree_manager, LP__TIMING); freebuf(s_bufid); #else #pragma omp critical (timing_update) { p->tm->comp_times.communication += p->comp_times.communication; p->tm->comp_times.lp += p->comp_times.lp; p->tm->comp_times.separation += p->comp_times.separation; p->tm->comp_times.fixing += p->comp_times.fixing; p->tm->comp_times.pricing += p->comp_times.pricing; p->tm->comp_times.strong_branching += p->comp_times.strong_branching; } #endif #ifdef COMPILE_IN_CG cg_close(p->cgp); #endif #ifndef COMPILE_IN_TM free_lp(p); #endif }
void LoadBalancing::lp_delete_model() { free(lp_D); free(lp_G); free(lp_E); if(is_lpmodel_created_==true) free_lp(&lp); lp_D=NULL; lp_G=NULL; lp_E=NULL; is_lpmodel_created_=false; }