Bcp 1.4.4
Loading...
Searching...
No Matches
BCP_USER.hpp
Go to the documentation of this file.
1// Copyright (C) 2000, International Business Machines
2// Corporation and others. All Rights Reserved.
3#ifndef _BCP_USER_H
4#define _BCP_USER_H
5
6// This file is prepared for doxygen.
7
8#include "CoinSmartPtr.hpp"
9#include "BCP_error.hpp"
11#include "BCP_functions.hpp"
12
13class BCP_var_algo;
14class BCP_cut_algo;
15class BCP_warmstart;
16
17//#############################################################################
18
20public:
21 virtual ~BCP_user_data() {}
22};
23
24//#############################################################################
25
27public:
28 virtual ~BCP_user_class() {}
29};
30
31//#############################################################################
32
49public:
56
57public:
58 virtual ~BCP_user_pack() {}
59
60 //-------------------------------------------------------------------------
62 virtual void
64 bool report_if_default = false)
65 {
66 if (report_if_default) {
67 printf("BCP_user_pack : default pack_warmstart() executed.\n");
68 }
69 BCP_pack_warmstart(ws, buf);
70 }
71
73 virtual BCP_warmstart*
75 bool report_if_default = false)
76 {
77 if (report_if_default) {
78 printf("BCP_user_pack : default unpack_warmstart() executed.\n");
79 }
80 return BCP_unpack_warmstart(buf);
81 }
82
83 //-------------------------------------------------------------------------
85 virtual void
87 {
88 throw BCP_fatal_error("\
89BCP_user_pack::pack_var_algo() invoked but not overridden!\n");
90 }
91
94 {
95 throw BCP_fatal_error("\
96BCP_user_pack::unpack_var_algo() invoked but not overridden!\n");
97 return 0; // to satisfy aCC on HP-UX
98 }
99
100 //-------------------------------------------------------------------------
102 virtual void pack_cut_algo(const BCP_cut_algo* cut, BCP_buffer& buf)
103 {
104 throw BCP_fatal_error("\
105BCP_user_pack::pack_cut_algo() invoked but not overridden!\n");
106 }
107
110 {
111 throw BCP_fatal_error("\
112BCP_user_pack::unpack_cut_algo() invoked but not overridden!\n");
113 return 0; // to satisfy aCC on HP-UX
114 }
115
116 //-------------------------------------------------------------------------
118 virtual void
120 {
121 throw BCP_fatal_error("\
122BCP_user_pack::pack_user_data() invoked but not overridden!\n");
123 }
124
127 {
128 throw BCP_fatal_error("\
129BCP_user_pack::unpack_user_data() invoked but not overridden!\n");
130 }
131};
132
133//#############################################################################
134
135class BCP_tm_user;
136class BCP_ts_user;
137class BCP_lp_user;
138class BCP_vg_user;
139class BCP_cg_user;
140class BCP_vp_user;
141class BCP_cp_user;
142
143class BCP_tm_prob;
144class BCP_ts_prob;
145class BCP_lp_prob;
146class BCP_vg_prob;
147class BCP_cg_prob;
148class BCP_vp_prob;
149class BCP_cp_prob;
150
151class BCP_proc_id;
153
161public:
165 virtual ~USER_initialize() {}
168 //--------------------------------------------------------------------------
175 virtual BCP_message_environment * msgenv_init(int argc, char* argv[]);
178 //--------------------------------------------------------------------------
186
188 const int argnum,
189 const char * const * arglist) {
190 throw BCP_fatal_error("USER_initialize::tm_init() missing.\n");
191 return 0; // to satisfy aCC on HP-UX
192 }
195 // If the user does not need any info in the TS for (un)packing
196 // cuts/vars/user_data, then a NULL is fine
197 return 0;
198 }
201 throw BCP_fatal_error("USER_initialize::lp_init() missing.\n");
202 return 0; // to satisfy aCC on HP-UX
203 }
206 throw BCP_fatal_error("USER_initialize::vg_init() missing.\n");
207 return 0; // to satisfy aCC on HP-UX
208 }
211 throw BCP_fatal_error("USER_initialize::cg_init() missing.\n");
212 return 0; // to satisfy aCC on HP-UX
213 }
215 virtual BCP_vp_user * vp_init(BCP_vp_prob& p) {
216 throw BCP_fatal_error("USER_initialize::vp_init() missing.\n");
217 return 0; // to satisfy aCC on HP-UX
218 }
220 virtual BCP_cp_user * cp_init(BCP_cp_prob& p) {
221 throw BCP_fatal_error("USER_initialize::cp_init() missing.\n");
222 return 0; // to satisfy aCC on HP-UX
223 }
226 return NULL;
227 }
229};
230
231//#############################################################################
232
239int bcp_main(int argc, char* argv[], USER_initialize* user_init);
240
241#endif
int bcp_main(int argc, char *argv[], USER_initialize *user_init)
This is the function the user must invoke when (s)he is ready to turn contrl over to BCP.
void BCP_pack_warmstart(const BCP_warmstart *ws, BCP_buffer &buf)
BCP_warmstart * BCP_unpack_warmstart(BCP_buffer &buf)
This class describes the message buffer used for all processes of BCP.
This class is the central class of the Cut Generator process.
Definition BCP_cg.hpp:32
The BCP_cg_user class is the base class from which the user can derive a problem specific class to be...
This is the class from which the user should derive her own algorithmic cuts.
Definition BCP_cut.hpp:242
Currently there isn't any error handling in BCP.
Definition BCP_error.hpp:20
NO OLD DOC.
Definition BCP_lp.hpp:102
The BCP_lp_user class is the base class from which the user can derive a problem specific class to be...
This is an abstract base class that describes the message passing environment.
NO OLD DOC.
Definition BCP_tm.hpp:136
The BCP_tm_user class is the base class from which the user can derive a problem specific class to be...
virtual ~BCP_user_class()
Definition BCP_USER.hpp:28
virtual ~BCP_user_data()
Definition BCP_USER.hpp:21
virtual BCP_cut_algo * unpack_cut_algo(BCP_buffer &buf)
Unpack an algorithmic cut.
Definition BCP_USER.hpp:109
virtual void pack_warmstart(const BCP_warmstart *ws, BCP_buffer &buf, bool report_if_default=false)
Pack warmstarting information.
Definition BCP_USER.hpp:63
virtual void pack_var_algo(const BCP_var_algo *var, BCP_buffer &buf)
Pack an algorithmic variable.
Definition BCP_USER.hpp:86
virtual BCP_warmstart * unpack_warmstart(BCP_buffer &buf, bool report_if_default=false)
Unpack warmstarting information.
Definition BCP_USER.hpp:74
virtual ~BCP_user_pack()
Definition BCP_USER.hpp:58
BCP_user_class * user_class
A pointer ot the usr class of the process from which the methods of this class are invoked from.
Definition BCP_USER.hpp:55
virtual BCP_user_data * unpack_user_data(BCP_buffer &buf)
Unpack an user data.
Definition BCP_USER.hpp:126
virtual BCP_var_algo * unpack_var_algo(BCP_buffer &buf)
Unpack an algorithmic variable.
Definition BCP_USER.hpp:93
virtual void pack_user_data(const BCP_user_data *ud, BCP_buffer &buf)
Pack an user data.
Definition BCP_USER.hpp:119
virtual void pack_cut_algo(const BCP_cut_algo *cut, BCP_buffer &buf)
Pack an algorithmic cut.
Definition BCP_USER.hpp:102
This is the class from which the user should derive her own algorithmic variables.
Definition BCP_var.hpp:277
This class is the central class of the Variable Generator process.
Definition BCP_vg.hpp:32
The BCP_vg_user class is the base class from which the user can derive a problem specific class to be...
Warmstarting information for the LP solver.
This class is an abstract base class for the initializer class the user has to provide.
Definition BCP_USER.hpp:160
virtual ~USER_initialize()
virtual destructor
Definition BCP_USER.hpp:165
virtual BCP_ts_user * ts_init(BCP_ts_prob &p)
Definition BCP_USER.hpp:194
virtual BCP_vg_user * vg_init(BCP_vg_prob &p)
Definition BCP_USER.hpp:205
virtual BCP_tm_user * tm_init(BCP_tm_prob &p, const int argnum, const char *const *arglist)
Definition BCP_USER.hpp:187
virtual BCP_message_environment * msgenv_init(int argc, char *argv[])
Create a message passing environment.
virtual BCP_vp_user * vp_init(BCP_vp_prob &p)
Definition BCP_USER.hpp:215
virtual BCP_lp_user * lp_init(BCP_lp_prob &p)
Definition BCP_USER.hpp:200
virtual BCP_cp_user * cp_init(BCP_cp_prob &p)
Definition BCP_USER.hpp:220
virtual BCP_user_pack * packer_init(BCP_user_class *p)
Definition BCP_USER.hpp:225
virtual BCP_cg_user * cg_init(BCP_cg_prob &p)
Definition BCP_USER.hpp:210