/home/coin/SVN-release/Bcp-1.2.1/Applications/Mkc/include/MKC_optim.hpp

Go to the documentation of this file.
00001 // Copyright (C) 2000, International Business Machines
00002 // Corporation and others.  All Rights Reserved.
00003 #ifndef _MKC_OPTIM_H
00004 #define _MKC_OPTIM_H
00005 
00006 #include "BCP_vector.hpp"
00007 
00008 class MKC_knapsack_entry;
00009 class MKC_knapsack_fixing;
00010 class MKC_knapsack_set;
00011 class BCP_var;
00012 class MKC_var;
00013 
00014 
00015 //#############################################################################
00016 
00017 void
00018 MKC_greedy_knapsack(const int clr[2],
00019                     const MKC_knapsack_entry* entries, // this knapsack prob
00020                     const int entry_num,
00021                     // for this KS:
00022                     // fixings, capacity, cost, index of it in the list
00023                     const MKC_knapsack_fixing& ksf,
00024                     const double capacity,
00025                     const double ks_cost,
00026                     const int ks_ind,
00027                     // the total number of knapsacks
00028                     const int ks_num,
00029                     // how good sol's we are looking for
00030                     double& cutoff,
00031                     // the generated vars
00032                     BCP_vec<BCP_var*>& new_vars,
00033                     // temporary vector
00034                     int * tmp_chosen);
00035 
00036 void
00037 MKC_exact_knapsack(const int clr[2],
00038                    const MKC_knapsack_entry* entries, // this knapsack prob
00039                    const int entry_num,
00040                    // for this KS:
00041                    // fixings, capacity, cost, index of it in the list
00042                    const MKC_knapsack_fixing& ksf,
00043                    const double capacity,
00044                    const double ks_cost,
00045                    const int ks_ind,
00046                    // the total number of knapsacks
00047                    const int ks_num,
00048                    // how good sol's we are looking for
00049                    double& cutoff,
00050                    // the generated vars
00051                    BCP_vec<BCP_var*>& new_vars,
00052                    // temporary vector
00053                    int * tmp_chosen);
00054 
00055 MKC_var*
00056 MKC_create_var(const int clr[2],
00057                const MKC_knapsack_entry* entries,
00058                const int * entry_ind, const int size,
00059                const double ks_cost, const int ks_num, const int ks_ind,
00060                const MKC_knapsack_fixing& ksf);
00061 
00062 void
00063 MKC_enumerate_knapsacks(MKC_knapsack_set& kss,
00064                         BCP_vec<MKC_var*>* enumerated_ks,
00065                         const int max_enumerated_size);
00066 
00067 void
00068 MKC_enumerate_one_ks(const int clr[2],
00069                      const MKC_knapsack_entry * entries, const int size,
00070                      BCP_vec<MKC_var*>& enumerated,
00071                      const int ks_num, const int ks_ind, const double ks_cost,
00072                      const double ks_capacity, char * flag, double * w);
00073 
00074 #endif

Generated on Thu Jan 15 03:00:58 2009 for coin-Bcp by  doxygen 1.4.7