/home/coin/SVN-release/CoinAll-1.1.0/SYMPHONY/include/sym_cg.h

Go to the documentation of this file.
00001 /*===========================================================================*/
00002 /*                                                                           */
00003 /* This file is part of the SYMPHONY MILP Solver Framework.                  */
00004 /*                                                                           */
00005 /* SYMPHONY was jointly developed by Ted Ralphs (tkralphs@lehigh.edu) and    */
00006 /* Laci Ladanyi (ladanyi@us.ibm.com).                                        */
00007 /*                                                                           */
00008 /* (c) Copyright 2000-2008 Ted Ralphs. All Rights Reserved.                  */
00009 /*                                                                           */
00010 /* This software is licensed under the Common Public License. Please see     */
00011 /* accompanying file for terms.                                              */
00012 /*                                                                           */
00013 /*===========================================================================*/
00014 
00015 #ifndef _CUT_GEN_H
00016 #define _CUT_GEN_H
00017 
00018 #include "symphony.h"
00019 #include "sym_types.h"
00020 #include "sym_cg_params.h"
00021 #include "sym_cg_u.h"
00022 #include "sym_lp_solver.h"
00023 
00024 /*===========================================================================*/
00025 
00026 /*stores the data needed by the cut_generator*/
00027 typedef struct CG_PROB{
00028    int            proc_index;
00029    void          *user;
00030    int            msgtag;
00031    int            master;
00032    int            draw_graph;    /* the tid of DrawGraph */
00033    int            tree_manager;  /* the tid of the tree manager */
00034    cg_params      par;           /* the parameters for the cut generator */
00035    char           has_ub;        /* is there an upper bound */
00036    double         ub;            /* the current best upper bound if there
00037                                     is one */
00038    double         tt;
00039    lp_sol         cur_sol;
00040 #ifdef COMPILE_IN_CG
00041    int           cuts_to_add_num;
00042    cut_data    **cuts_to_add;
00043    int           cuts_to_add_size;
00044 #endif
00045 }cg_prob;
00046 
00047 /*===========================================================================*/
00048 /*==================== CG basic functions (cg_func.c) =======================*/
00049 /*===========================================================================*/
00050 
00051 cg_prob *get_cg_ptr PROTO((cg_prob **cg_list));
00052 void cg_initialize PROTO((cg_prob *p, int master_tid));
00053 void cg_close PROTO((cg_prob * p));
00054 cut_data *create_explicit_cut PROTO((int nzcnt, int *indices, double *values,
00055                                      double rhs, double range, char sense,
00056                                      char send_to_cp));
00057 int cg_add_explicit_cut PROTO((int nzcnt, int *indices, double *values,
00058                                double rhs, double range, char sense,
00059                                char send_to_cp, int *num_cuts, int *alloc_cuts,
00060                                cut_data ***cuts));
00061 int cg_add_user_cut PROTO((cut_data *new_cut, int *num_cuts, int *alloc_cuts,
00062                            cut_data ***cuts));
00063 
00064 /*===========================================================================*/
00065 /*=============== CG communication functions (cg_proccomm.c) ================*/
00066 /*===========================================================================*/
00067 
00068 int cg_process_message PROTO((cg_prob *p, int r_bufid));
00069 int cg_send_cut PROTO((cut_data *new_cut, int *num_cuts, int *alloc_cuts,
00070                        cut_data ***cuts));
00071 
00072 /*===========================================================================*/
00073 /*==================== LP wrapper functions (cg_wrapper.c) ==================*/
00074 /*===========================================================================*/
00075 
00076 int receive_cg_data_u PROTO((cg_prob *p));
00077 int receive_lp_solution_cg_u PROTO((cg_prob *p));
00078 int free_cg_u PROTO((cg_prob *p));
00079 int find_cuts_u PROTO((cg_prob *p, LPdata *lp_data, int *num_cuts));
00080 int check_validity_of_cut_u PROTO((cg_prob *p, cut_data *new_cut));
00081 
00082 #endif

Generated on Sun Nov 14 14:06:41 2010 for Coin-All by  doxygen 1.4.7