|
|
Go to the documentation of this file. 53 fprintf(fp, "%8x STP File, STP Format Version %2d.%02d\n", 56 fprintf(fp, "Section Comment\n"); 61 fprintf(fp, "\"%s\"\n", "SPG"); 65 fprintf(fp, "\"%s\"\n", "UNKNOWN"); 69 fprintf(fp, "\"%s\"\n", "RPCST"); 73 fprintf(fp, "\"%s\"\n", "NWSPG"); 77 fprintf(fp, "\"%s\"\n", "UNKNOWN"); 81 fprintf(fp, "\"%s\"\n", "RSMT"); 85 fprintf(fp, "\"%s\"\n", "OARSMT"); 89 fprintf(fp, "\"%s\"\n", "UNKNOWN"); 93 fprintf(fp, "\"%s\"\n", "UNKNOWN"); 97 fprintf(fp, "\"%s\"\n", "UNKNOWN"); 99 fprintf(fp, "Remark \"Transformed\"\n"); 100 fprintf(fp, "End\n\n"); 102 if( !SCIPisEQ(scip, offset, 0.0) ) 104 fprintf(fp, "Section Presolve\n"); 105 fprintf(fp, "Fixed %f \n", offset); 106 fprintf(fp, "End\n\n"); 109 fprintf(fp, "Section Graph\n"); 110 fprintf(fp, "Nodes %d\n", g-> knots); 111 fprintf(fp, "Edges %d\n", g-> edges / 2); 113 for( i = 0; i < g-> edges; i += 2 ) 125 fprintf(fp, "%d %d ", g-> tail[i] + 1, g-> head[i] + 1); 129 fprintf(fp, "%f\n", g-> cost[i]); 134 fprintf(fp, "End\n\n"); 135 fprintf(fp, "Section Terminals\n"); 136 fprintf(fp, "Terminals %d\n", g-> terms); 139 fprintf(fp, "Root %d\n", g-> source[0] + 1); 141 for(i = 0; i < g-> knots; i++) 144 fprintf(fp, "T %d\n", i + 1); 146 fprintf(fp, "End\n\n"); 161 fprintf(fp, "Section Hop Constraint\n"); 162 fprintf(fp, "limit %d\n", g-> hoplimit); 163 for( e = 0; e < g-> edges; e++ ) 167 fprintf(fp, "HC %d %d\n", e + 1, hopfactor); 169 fprintf(fp, "End\n\n"); 176 fprintf(fp, "Section Degree Constraint\n"); 177 fprintf(fp, "End\n\n"); 183 fprintf(fp, "Section Prize Collecting Constraint\n"); 188 fprintf(fp, "PC %d\n", e + 1); 191 fprintf(fp, "End\n\n"); 194 fprintf(fp, "EOF\n"); 216 fprintf(fp, "%8x STP File, STP Format Version %2d.%02d\n", 219 fprintf(fp, "Section Comment\n"); 220 fprintf(fp, "Name \"%s\"\n", "noname"); 221 fprintf(fp, "End\n\n"); 223 fprintf(fp, "Section Graph\n"); 224 fprintf(fp, "Nodes %d\n", g-> knots); 225 fprintf(fp, "Edges %d\n", g-> edges / 2); 227 for(i = 0; i < g-> edges; i += 2) 233 fprintf(fp, "E %d %d %g\n", 239 fprintf(fp, "End\n\n"); 240 fprintf(fp, "Section Terminals\n"); 241 fprintf(fp, "Terminals %d\n", g-> terms); 243 for(i = 0; i < g-> knots; i++) 246 fprintf(fp, "T %d\n", i + 1); 248 fprintf(fp, "End\n\n"); 260 fprintf(fp, "EOF\n"); 278 fprintf(fp, "%d %d\n", 282 for(i = 0; i < g-> edges; i += 2) 288 fprintf(fp, "%d %d %g\n", 294 fprintf(fp, "%d\n", g-> terms); 296 for(i = 0; i < g-> knots; i++) 299 fprintf(fp, "%d\n", i + 1); 311 const char* filename, 314 const char* msg_writing_s = "Writing Graph to File %s:\n"; 320 assert(filename != NULL); 321 assert(strlen(filename) > 0); 324 if ((fp = fopen(filename, "w")) == NULL) 328 printf(msg_writing_s, filename);
int graph_valid(const GRAPH *)
static void bea_save(const GRAPH *g, FILE *fp)
#define STP_OBSTACLES_GRID
static void stp_save(const GRAPH *g, FILE *fp)
#define STP_MAX_NODE_WEIGHT
#define STP_PRIZE_COLLECTING
includes various files containing graph methods used for Steiner problems
void graph_save(const GRAPH *g, const char *filename, FILETYPE type)
void SCIPwriteStp(SCIP *scip, const GRAPH *g, FILE *fp, SCIP_Real offset)
#define STP_ROOTED_PRIZE_COLLECTING
|