Ignore:
Timestamp:
May 4, 2007 12:38:18 PM (13 years ago)
Author:
ladanyi
Message:

prepare Bcp for changing some LPs into TM storage places. Serial version works, currently debugging parallel version.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Bonmin/experimental/Bcp/BM.hpp

    r508 r530  
    1414
    1515#include "BCP_USER.hpp"
     16#include "BCP_parameters.hpp"
    1617#include "BCP_tm_user.hpp"
    1718#include "BCP_lp_user.hpp"
     
    3435    }
    3536    ~BM_node() {}
     37
     38    virtual BM_node* clone() const {
     39        return new BM_node(*this);
     40    }
    3641
    3742    inline void pack(BCP_buffer& buf) const {
     
    131136    virtual void pack_module_data(BCP_buffer& buf, BCP_process_t ptype);
    132137
    133     virtual void pack_cut_algo(const BCP_cut_algo* cut, BCP_buffer& buf) {
    134         BB_pack_cut(cut, buf);
    135     }
    136     virtual BCP_cut_algo* unpack_cut_algo(BCP_buffer& buf) {
    137         return BB_unpack_cut(buf);
    138     }
    139 
    140138    virtual BCP_solution* unpack_feasible_solution(BCP_buffer& buf);
    141 
    142     /// Packing of user data
    143     virtual void pack_user_data(const BCP_user_data* ud, BCP_buffer& buf);
    144 
    145     /// Unpacking of user_data
    146     virtual BCP_user_data* unpack_user_data(BCP_buffer& buf);
    147139    //@}
    148140
     
    166158    virtual void display_feasible_solution(const BCP_solution* sol);
    167159
    168     /** What is the process id of the current process */
    169     const BCP_proc_id*
    170     process_id() const;
    171     /** Send a message to a particular process */
    172     void
    173     send_message(const BCP_proc_id* const target, const BCP_buffer& buf);
    174     /** Broadcast the message to all processes of the given type */
    175     void
    176     broadcast_message(const BCP_process_t proc_type, const BCP_buffer& buf);
    177160    /** Process a message that has been sent by another process' user part to
    178161        this process' user part. */
     
    233216    double cutOffDecrement_;
    234217
    235 #if 0
    236     /* A couple of cut generators to be used in the hybrid method */
    237     CglGomory miGGen_;
    238     CglProbing probGen_;
    239     CglKnapsackCover knapsackGen_;
    240     CglMixedIntegerRounding mixedGen_;
    241     Bonmin::OaNlpOptim oaGen_;
    242     Bonmin::EcpCuts ecpGen_;
    243     Bonmin::OACutGenerator2 oaDec_;
    244     Bonmin::OaFeasibilityChecker feasCheck_;
    245 #endif
    246218    /* FIXME: gross cheating. works only for serial mode. Store the warmstart
    247219       informations in the lp process, do not send them over in user data or
     
    276248    unpack_module_data(BCP_buffer& buf);
    277249
    278     virtual void pack_cut_algo(const BCP_cut_algo* cut, BCP_buffer& buf) {
    279         BB_pack_cut(cut, buf);
    280     }
    281     virtual BCP_cut_algo* unpack_cut_algo(BCP_buffer& buf) {
    282         return BB_unpack_cut(buf);
    283     }
    284 
    285250    virtual void
    286251    pack_feasible_solution(BCP_buffer& buf, const BCP_solution* sol);
    287252
    288     virtual void
    289     pack_user_data(const BCP_user_data* ud, BCP_buffer& buf);
    290     virtual BCP_user_data*
    291     unpack_user_data(BCP_buffer& buf);
    292 
    293     /** What is the process id of the current process */
    294     const BCP_proc_id*
    295     process_id() const;
    296     /** Send a message to a particular process */
    297     void
    298     send_message(const BCP_proc_id* const target, const BCP_buffer& buf);
    299     /** Broadcast the message to all processes of the given type */
    300     void
    301     broadcast_message(const BCP_process_t proc_type, const BCP_buffer& buf);
    302253    /** Process a message that has been sent by another process' user part to
    303254        this process' user part. */
     
    377328#include "BCP_USER.hpp"
    378329
     330class BM_pack : public BCP_user_pack {
     331public:
     332    virtual ~BM_pack() {}
     333
     334    virtual void pack_user_data(const BCP_user_data* ud, BCP_buffer& buf);
     335    virtual BCP_user_data* unpack_user_data(BCP_buffer& buf);
     336
     337    virtual void pack_cut_algo(const BCP_cut_algo* cut, BCP_buffer& buf);
     338    virtual BCP_cut_algo* unpack_cut_algo(BCP_buffer& buf);
     339
     340};
     341
     342
     343//#############################################################################
     344
    379345class BM_init : public USER_initialize {
    380346
     
    386352
    387353    virtual BCP_lp_user * lp_init(BCP_lp_prob& p);
     354
     355    virtual BCP_user_pack * packer_init(BCP_user_class* p);
    388356};
    389357
Note: See TracChangeset for help on using the changeset viewer.