Post

mcfdefs.h

mcfdefs.h + mcf.h

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
// mcfdefs.h
typedef long MCF_flow_t;
typedef long *MCF_flow_p;
typedef long MCF_cost_t;
typedef long *MCF_cost_p;
/** Default flow type definition. */
typedef long MCF_flow_t;
/** Default flow pointer definition. */
typedef long *MCF_flow_p;
/** Default cost type definition. */
typedef long MCF_cost_t;
/** Default cost pointer type definition. */
typedef long *MCF_cost_p;
#else
/** Flow type definition if MCF\_FLOAT is defined. */
typedef double MCF_flow_t;
/** Flow pointer definition if MCF\_FLOAT is defined. */
typedef double *MCF_flow_p;
/** Cost type definition if MCF\_FLOAT is defined. */
typedef double MCF_cost_t;
/** Cost pointer definition if MCF\_FLOAT is defined. */
typedef double *MCF_cost_p;
#endif

/** Node type definition. */
typedef struct MCF_node MCF_node_t;
/** Node pointer definition. */
typedef struct MCF_node *MCF_node_p;

/** Arc type definition. */
typedef struct MCF_arc MCF_arc_t;
/** Arc pointer definition. */
typedef struct MCF_arc *MCF_arc_p;

/** Network type definition. */
typedef struct MCF_network MCF_network_t;
/** Network pointer definition. */
typedef struct MCF_network *MCF_network_p;

struct MCF_node
{
    int ident;
    int pre_ident;
    long number;
    MCF_node_p pred;
    MCF_node_p child;
    MCF_node_p right_sibling;     
    MCF_node_p left_sibling;     
    long subtreesize; 
    MCF_arc_p basic_arc; 
    long orientation; 
    MCF_arc_p firstin;
    MCF_flow_t balance;  
    MCF_cost_t potential; 
    long mark;
};
struct MCF_arc
{
    long pre_ident;
    MCF_node_p tail;
    MCF_node_p head;
    MCF_arc_p nextout;
    MCF_arc_p nextin;
    MCF_cost_t cost;
    MCF_flow_t lower;
    MCF_flow_t flow;
    long ident;
};
struct MCF_network
{
    long n;
    long m;
    int algorithm_opt;
    int block_size;
    double cpu_time;
    long max_cost;
    MCF_arc_p max_cost_arc;
    long primal_unbounded;
    long dual_unbounded;
    long feasible;
    double optcost;
    MCF_node_p nodes;
    MCF_node_p stop_nodes;
    MCF_arc_p arcs;
    MCF_arc_p stop_arcs;
    MCF_arc_p dummy_arcs;
    MCF_arc_p stop_dummy; 
    long iterations;
    MCF_node_p (*find_iminus) ( long n, MCF_node_p nodes, MCF_node_p stop_nodes, MCF_flow_p delta); //this is not used anywhere in the codes!
    MCF_arc_p (*find_bea) ( MCF_arc_p max_cost_arc, int algorithm_opt,long m, MCF_arc_p arcs, MCF_arc_p stop_arcs,MCF_cost_p red_cost_of_bea );
};
// EOF

// mcf.h
extern  long MCF_write_intermediate2(MCF_network_p net); // defined in OUTPUT.cpp
extern  long MCF_write_intermediate3(MCF_network_p net); // defined in OUTPUT.cpp
extern  int Remove_Job_From_Graph( int removing_node,MCF_network_p net); // defined in RNAA.cpp
extern long MCF_read_dimacs_min( char *filename, MCF_network_p net ); // defined in READMIN.cpp
extern long MCF_write_solution( char *infile, char *outfile, MCF_network_p net, time_t sec ); // defined in OUTPUT.cpp
extern long MCF_primal_start_artificial ( MCF_network_p net ); // defined in PSTART.cpp
extern long MCF_primal_repair_span_tree ( MCF_network_p net , int Number_Of_AGVs); // defined in PREPAIR.cpp
extern long MCF_primal_net_simplex ( MCF_network_p net ); // defined in PSIMPLEX1_3.cpp
extern MCF_arc_p MCF_primal_bea_mpp_30_5
    ( MCF_arc_p max_cost_arc, int algorithm_opt, long m, MCF_arc_p arcs, MCF_arc_p stop_arcs, MCF_cost_p red_cost_of_bea ); // defined in nowhere! Might need lambdas
extern MCF_arc_p MCF_primal_bea_mpp_50_10
    ( MCF_arc_p max_cost_arc,int algorithm_opt,long m, MCF_arc_p arcs, MCF_arc_p stop_arcs, MCF_cost_p red_cost_of_bea ); // defined in nowhere! Might need lambdas
extern MCF_arc_p MCF_primal_bea_mpp_200_20
    ( MCF_arc_p max_cost_arc,int algorithm_opt,long m, MCF_arc_p arcs, MCF_arc_p stop_arcs, MCF_cost_p red_cost_of_bea ); // defined in nowhere! Might need lambdas
extern MCF_arc_p MCF_primal_bea_mpp_200_25
    ( MCF_arc_p max_cost_arc,int algorithm_opt,long m, MCF_arc_p arcs, MCF_arc_p stop_arcs, MCF_cost_p red_cost_of_bea ); // defined in nowhere! Might need lambdas
extern MCF_arc_p MCF_primal_bea_cycle
    ( MCF_arc_p max_cost_arc,int algorithm_opt,long m, MCF_arc_p arcs, MCF_arc_p stop_arcs, MCF_cost_p red_cost_of_bea ); // defined in nowhere!
extern MCF_arc_p MCF_primal_bea_all
    ( MCF_arc_p max_cost_arc,int algorithm_opt,long m, MCF_arc_p arcs, MCF_arc_p stop_arcs, MCF_cost_p red_cost_of_bea ); // defined in nowhere!
extern long MCF_dual_start_artificial ( MCF_network_p net );// defined in nowhere
extern long MCF_dual_net_simplex ( MCF_network_p net );// defined in nowhere
extern MCF_node_p MCF_dual_iminus_mpp_30_5( long n, MCF_node_p nodes, MCF_node_p stop_nodes, MCF_flow_p delta );// defined in nowhere
extern MCF_node_p MCF_dual_iminus_mpp_50_10( long n, MCF_node_p nodes, MCF_node_p stop_nodes, MCF_flow_p delta );// defined in nowhere
extern MCF_node_p MCF_dual_iminus_cycle( long n, MCF_node_p nodes, MCF_node_p stop_nodes, MCF_flow_p delta );// defined in nowhere
extern double MCF_primal_obj   ( MCF_network_p net );// defined in mcfutil.cpp
extern double MCF_dual_obj ( MCF_network_p net ); // defined in mcfutil.cpp
extern long MCF_primal_feasible ( MCF_network_p net ); // defined in mcfutil.cpp
extern long MCF_dual_feasible ( MCF_network_p net ); // defined in mcfutil.cpp
extern long MCF_is_basis ( MCF_network_p net ); // defined in mcfutil.cpp
extern long MCF_is_balanced ( MCF_network_p net ); // defined in mcfutil.cpp

This post is licensed under CC BY 4.0 by the author.