Debian Codegraph @

SYMPHONY/Applications/MPP/src/CutPool/mpp_cp.c

raw
1 /*===========================================================================*/
2 /* */
3 /* This file is part of a demonstration application for use with the */
4 /* SYMPHONY Branch, Cut, and Price Library. This application is a solver for */
5 /* the Mixed Postman Problem. */
6 /* */
7 /* (c) Copyright 2005-2007 Lehigh University. All Rights Reserved. */
8 /* */
9 /* This application was originally developed by Andrew Hofmann and was */
10 /* modified by Ted Ralphs ([email protected]) */
11 /* */
12 /* This software is licensed under the Eclipse Public License. Please see */
13 /* accompanying file for terms. */
14 /* */
15 /*===========================================================================*/
16
17 /* system include files */
18 #include <stdio.h>
19
20 /* SYMPHONY include files */
21 #include "sym_constants.h"
22 #include "sym_cp_u.h"
23
24 /*===========================================================================*/
25
26 /*===========================================================================*\
27 * This file contains the user-written functions of the cut pool process.
28 \*===========================================================================*/
29
30 /*===========================================================================*\
31 * Here is where the user must receive all of the data sent from
32 * user_send_cp_data() and set up data structures. Note that this function is
33 * only called if one of COMPILE_IN_CP, COMPILE_IN_LP, or COMPILE_IN_TM is
34 * FALSE.
35 \*===========================================================================*/
36
37 int user_receive_cp_data(void **user)
38 {
39 return(USER_DEFAULT);
40 }
41
42 /*===========================================================================*/
43
44 /*===========================================================================*\
45 * Here, we free up the data structures
46 \*===========================================================================*/
47
48 int user_free_cp(void **user)
49 {
50 return(USER_DEFAULT);
51 }
52
53 /*===========================================================================*/
54
55 int user_receive_lp_solution_cp(void *user)
56 {
57 return(USER_DEFAULT);
58 }
59
60 /*===========================================================================*/
61
62 /*===========================================================================*\
63 * When a new solution arrives to the cut pool, this function is invoked
64 * so that the user can prepare for checking many cuts (probably set up
65 * some data structures that make ckecking more efficient).
66 \*===========================================================================*/
67
68 int user_prepare_to_check_cuts(void *user, int varnum, int *indices,
69 double *values)
70 {
71 return(USER_DEFAULT);
72 }
73
74
75 /*===========================================================================*/
76
77 /*===========================================================================*\
78 * Check to see whether a particular cut is violated by the current LP sol.
79 \*===========================================================================*/
80
81 int user_check_cut(void *user, double etol, int number, int *indices,
82 double *values, cut_data *cut, int *is_violated,
83 double *quality)
84 {
85 return(USER_DEFAULT);
86 }
87
88 /*===========================================================================*/
89
90 /*===========================================================================*\
91 * This function is invoked when all cuts that needed to be checked for
92 * the current solution have been checked already. (Disassemble the
93 * data structures built up in 'user_prepare_to_check_cuts'.
94 \*===========================================================================*/
95
96 int user_finished_checking_cuts(void *user)
97 {
98 return(USER_DEFAULT);
99 }
100
101 /*===========================================================================*/
102