Dip
0.92.4
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
tmp
Dip-0.92.4
SYMPHONY
include
sym_cp.h
Go to the documentation of this file.
1
/*===========================================================================*/
2
/* */
3
/* This file is part of the SYMPHONY MILP Solver Framework. */
4
/* */
5
/* SYMPHONY was jointly developed by Ted Ralphs (ted@lehigh.edu) and */
6
/* Laci Ladanyi (ladanyi@us.ibm.com). */
7
/* */
8
/* (c) Copyright 2000-2019 Ted Ralphs. All Rights Reserved. */
9
/* */
10
/* This software is licensed under the Eclipse Public License. Please see */
11
/* accompanying file for terms. */
12
/* */
13
/*===========================================================================*/
14
15
#ifndef _CUT_POOL_H
16
#define _CUT_POOL_H
17
18
#include "
symphony.h
"
19
#include "
sym_proto.h
"
20
#include "
sym_types.h
"
21
#include "
sym_cp_params.h
"
22
#include "
sym_cp_u.h
"
23
24
#define PREPARE_TO_CHECK_CUTS 0
25
#define CHECK_ONE_CUT 1
26
#define FINISH_TO_CHECK_CUTS 2
27
28
/*===========================================================================*\
29
* This data structure contains the cut pool itself
30
\*===========================================================================*/
31
32
typedef
struct
CP_CUT_DATA
{
33
cut_data
cut
;
34
int
touches
;
35
int
level
;
36
int
check_num
;
37
double
quality
;
38
}
cp_cut_data
;
39
40
/*===========================================================================*/
41
42
typedef
struct
CUT_POOL
{
43
void
*
user
;
44
int
master
;
45
int
tree_manager
;
46
double
cut_pool_time
;
47
int
msgtag
;
/* the message tag of the last message */
48
double
lpetol
;
/* the zero tolerance in the lp process */
49
cp_params
par
;
/* cut pool parameters */
50
int
size
;
/* the total size of all the cuts in the pool*/
51
int
cut_num
;
/* the number of cuts in the pool */
52
int
allocated_cut_num
;
/* the possible number of cuts */
53
cp_cut_data
**
cuts
;
/* the list of all the cuts in the pool*/
54
int
total_cut_num
;
55
int
reorder_count
;
/* Only reorder the cuts periodically */
56
lp_sol
cur_sol
;
57
#ifdef COMPILE_IN_CP
58
int
cuts_to_add_num;
59
cut_data
**cuts_to_add;
60
int
cuts_to_add_size;
61
#endif
62
}
cut_pool
;
63
64
/*===========================================================================*/
65
/*==================== CP basic functions (cp_func.c) =======================*/
66
/*===========================================================================*/
67
68
cut_pool
*get_cp_ptr
PROTO
((
cut_pool
** cp_list,
int
index));
69
void
cp_initialize
PROTO
((
cut_pool
*cp,
int
master_tid));
70
71
/*------- Functions related to deletion of cuts (size management) -----------*/
72
73
int
unsigned_memcmp
PROTO
((
char
*coef0,
char
*coef1,
int
size));
74
int
cutcmp
PROTO
((
const
void
*cut0ptr,
const
void
*cut1ptr));
75
int
delete_ineffective_cuts
PROTO
((
cut_pool
*cp));
76
int
delete_duplicate_cuts
PROTO
((
cut_pool
*cp));
77
int
which_cut_to_delete
PROTO
((
cut_data
*cut1,
cut_data
*cut2));
78
79
/*---------------------- Checking the cuts ----------------------------------*/
80
81
int
cut_quality_cmp
PROTO
((
const
void
*cut0ptr,
const
void
*cut1ptr));
82
void
order_cuts_by_quality
PROTO
((
cut_pool
*cp));
83
84
/*--------------- Functions related to logging ------------------------------*/
85
86
int
write_cp_cut_list
PROTO
((
cut_pool
*cp,
char
*file,
char
append));
87
int
read_cp_cut_list
PROTO
((
cut_pool
*cp,
char
*file));
88
int
cp_read_tm_cut_list
PROTO
((
cut_pool
*cp,
char
*file));
89
90
/*---------------------------- Closing --------------------------------------*/
91
92
void
cp_close
PROTO
((
cut_pool
*cp));
93
94
/*===========================================================================*/
95
/*=============== CP communication functions (cp_proccomm.c) ================*/
96
/*===========================================================================*/
97
98
void
cp_process_message
PROTO
((
cut_pool
*cp,
int
r_bufid));
99
void
cut_pool_send_cut
PROTO
((
cut_pool
*cp,
cut_data
*
cut
,
int
tid));
100
void
cut_pool_receive_cuts
PROTO
((
cut_pool
*cp,
int
bc_level));
101
102
/*===========================================================================*/
103
/*================= CP wrapper functions (cp_wrapper.c) =====================*/
104
/*===========================================================================*/
105
106
int
receive_cp_data_u
PROTO
((
cut_pool
*cp));
107
int
receive_lp_solution_cp_u
PROTO
((
cut_pool
*cp));
108
void
free_cut_pool_u
PROTO
((
cut_pool
*cp));
109
int
check_cuts_u
PROTO
((
cut_pool
*cp,
lp_sol
*cur_sol));
110
int
check_cut_u
PROTO
((
cut_pool
*cp,
lp_sol
*cur_sol,
cut_data
*
cut
,
111
int
*is_violated,
double
*quality));
112
113
#endif
PROTO
#define PROTO(x)
Definition:
sym_proto.h:27
CP_PARAMS
Definition:
sym_cp_params.h:22
CUT_POOL::allocated_cut_num
int allocated_cut_num
Definition:
sym_cp.h:52
sym_cp_params.h
CUT_POOL::tree_manager
int tree_manager
Definition:
sym_cp.h:45
CUT_POOL::reorder_count
int reorder_count
Definition:
sym_cp.h:55
CUT_POOL::cuts
cp_cut_data ** cuts
Definition:
sym_cp.h:53
LP_SOL
Definition:
sym_types.h:33
CP_CUT_DATA::check_num
int check_num
Definition:
sym_cp.h:36
CUT_POOL::msgtag
int msgtag
Definition:
sym_cp.h:47
CUT_POOL::par
cp_params par
Definition:
sym_cp.h:49
CUT_POOL::user
void * user
Definition:
sym_cp.h:43
CUT_POOL::total_cut_num
int total_cut_num
Definition:
sym_cp.h:54
sym_proto.h
cut
Definition:
Cgl012cut.hpp:153
CP_CUT_DATA::level
int level
Definition:
sym_cp.h:35
CP_CUT_DATA::cut
cut_data cut
Definition:
sym_cp.h:33
symphony.h
CUT_POOL::cur_sol
lp_sol cur_sol
Definition:
sym_cp.h:56
CP_CUT_DATA::quality
double quality
Definition:
sym_cp.h:37
CUT_POOL::master
int master
Definition:
sym_cp.h:44
CP_CUT_DATA
Definition:
sym_cp.h:32
CUT_POOL::size
int size
Definition:
sym_cp.h:50
CUT_POOL::lpetol
double lpetol
Definition:
sym_cp.h:48
CUT_POOL
Definition:
sym_cp.h:42
CUT_POOL::cut_pool_time
double cut_pool_time
Definition:
sym_cp.h:46
CUT_DATA
Definition:
sym_types.h:68
cut_pool
struct CUT_POOL cut_pool
cp_cut_data
struct CP_CUT_DATA cp_cut_data
sym_types.h
CUT_POOL::cut_num
int cut_num
Definition:
sym_cp.h:51
sym_cp_u.h
CP_CUT_DATA::touches
int touches
Definition:
sym_cp.h:34
Generated by
1.8.5