25 #if defined(_WIN32) || defined(_WIN64) 52 assert(reader != NULL);
54 assert(set->scip != NULL);
56 if( reader->readercopy != NULL )
59 SCIP_CALL( reader->readercopy(set->scip, reader) );
69 const char* extension,
77 assert(reader != NULL);
80 assert(extension != NULL);
86 (*reader)->readercopy = readercopy;
87 (*reader)->readerfree = readerfree;
88 (*reader)->readerread = readerread;
89 (*reader)->readerwrite = readerwrite;
90 (*reader)->readerdata = readerdata;
104 assert(reader != NULL);
105 assert(*reader != NULL);
109 if( (*reader)->readerfree != NULL )
111 SCIP_CALL( (*reader)->readerfree(set->scip, *reader) );
129 const char* extension
132 assert(reader != NULL);
135 return (extension != NULL && strcasecmp(reader->
extension, extension) == 0)
136 || (extension == NULL && *(reader->
extension) ==
'\0');
143 const char* filename,
144 const char* extension,
150 assert(reader != NULL);
152 assert(filename != NULL);
153 assert(result != NULL);
174 retcode = reader->readerread(set->scip, reader, filename, result);
212 const char * oldname;
214 assert( var != NULL );
215 assert( name != NULL );
232 const char* extension,
239 assert(reader != NULL);
241 assert(set->buffer != NULL);
242 assert(extension != NULL);
243 assert(result != NULL);
259 const char* consname;
260 const char** varnames;
261 const char** fixedvarnames;
262 const char** consnames;
265 fixedvarnames = NULL;
279 conshdlrs =
set->conshdlrs;
280 nconshdlrs =
set->nconshdlrs;
286 for( i = 0; i < nconshdlrs; ++i )
289 if( set->write_allconss )
302 for( i = 0; i < nconshdlrs; ++i )
309 if( set->write_allconss )
322 for( c = 0; c < nconshdlrconss; ++c )
324 conss[nconss] = conshdlrconss[c];
352 size = (int) log10(nvars+1.0) + 3;
354 for( i = 0; i < nvars; ++i )
360 (void)
SCIPsnprintf(name, size,
"x%d", i + set->write_genoffset);
365 size = (int) log10(nfixedvars+1.0) + 3;
367 for( i = 0; i < nfixedvars; ++i )
378 size = (int) log10(nconss+1.0) + 3;
380 for( i = 0; i < nconss; ++i )
401 assert(varnames != NULL);
402 assert(fixedvarnames != NULL);
403 assert(consnames != NULL);
404 for( i = nconss - 1; i >= 0; --i )
416 for( i = nfixedvars - 1; i >= 0; --i )
419 for( i = nvars - 1; i >= 0; --i )
454 assert(reader != NULL);
465 assert(reader != NULL);
476 assert(reader != NULL);
478 reader->readercopy = readercopy;
487 assert(reader != NULL);
489 reader->readerfree = readerfree;
498 assert(reader != NULL);
500 reader->readerread = readerread;
509 assert(reader != NULL);
511 reader->readerwrite = readerwrite;
519 assert(reader != NULL);
529 assert(reader != NULL);
539 assert(reader != NULL);
549 assert(reader != NULL);
551 return (reader->readerread != NULL);
559 assert(reader != NULL);
561 return (reader->readerwrite != NULL);
569 assert(reader != NULL);
580 assert(reader != NULL);
590 assert(reader != NULL);
enum SCIP_Result SCIP_RESULT
SCIP_RETCODE SCIPreaderCopyInclude(SCIP_READER *reader, SCIP_SET *set)
SCIP_CONS ** SCIPconshdlrGetEnfoConss(SCIP_CONSHDLR *conshdlr)
static SCIP_Bool readerIsApplicable(SCIP_READER *reader, const char *extension)
SCIP_Bool SCIPreaderCanWrite(SCIP_READER *reader)
void SCIPreaderSetCopy(SCIP_READER *reader, SCIP_DECL_READERCOPY((*readercopy)))
internal methods for clocks and timing issues
SCIP_DECL_READERFREE(ReaderTSP::scip_free)
const char * SCIPreaderGetName(SCIP_READER *reader)
void SCIPreaderSetFree(SCIP_READER *reader, SCIP_DECL_READERFREE((*readerfree)))
void SCIPclockStop(SCIP_CLOCK *clck, SCIP_SET *set)
SCIP_CONS ** SCIPconshdlrGetConss(SCIP_CONSHDLR *conshdlr)
void SCIPclockStart(SCIP_CLOCK *clck, SCIP_SET *set)
int SCIPsnprintf(char *t, int len, const char *s,...)
enum SCIP_Retcode SCIP_RETCODE
#define SCIPsetAllocBufferArray(set, ptr, num)
SCIP_DECL_READERWRITE(ReaderTSP::scip_write)
void SCIPvarSetNamePointer(SCIP_VAR *var, const char *name)
public methods for problem variables
void SCIPconsSetNamePointer(SCIP_CONS *cons, const char *name)
void SCIPclockEnableOrDisable(SCIP_CLOCK *clck, SCIP_Bool enable)
#define SCIPsetFreeBufferArray(set, ptr)
#define BMSfreeMemory(ptr)
void SCIPreaderSetData(SCIP_READER *reader, SCIP_READERDATA *readerdata)
SCIP_RETCODE SCIPreaderFree(SCIP_READER **reader, SCIP_SET *set)
SCIP_Bool SCIPclockIsRunning(SCIP_CLOCK *clck)
void SCIPclockSetTime(SCIP_CLOCK *clck, SCIP_Real sec)
void SCIPreaderEnableOrDisableClocks(SCIP_READER *reader, SCIP_Bool enable)
SCIP_READERDATA * SCIPreaderGetData(SCIP_READER *reader)
public methods for managing constraints
int SCIPconshdlrGetNEnfoConss(SCIP_CONSHDLR *conshdlr)
#define BMSfreeMemoryArray(ptr)
internal methods for storing and manipulating the main problem
const char * SCIPconshdlrGetName(SCIP_CONSHDLR *conshdlr)
void SCIPclockReset(SCIP_CLOCK *clck)
SCIP_Bool SCIPreaderCanRead(SCIP_READER *reader)
SCIP_RETCODE SCIPreaderCreate(SCIP_READER **reader, const char *name, const char *desc, const char *extension, SCIP_DECL_READERCOPY((*readercopy)), SCIP_DECL_READERFREE((*readerfree)), SCIP_DECL_READERREAD((*readerread)), SCIP_DECL_READERWRITE((*readerwrite)), SCIP_READERDATA *readerdata)
const char * SCIPconsGetName(SCIP_CONS *cons)
SCIP_RETCODE SCIPreaderResetReadingTime(SCIP_READER *reader)
void SCIPreaderSetRead(SCIP_READER *reader, SCIP_DECL_READERREAD((*readerread)))
const char * SCIPvarGetName(SCIP_VAR *var)
SCIP_Real SCIPclockGetTime(SCIP_CLOCK *clck)
internal methods for global SCIP settings
SCIP_RETCODE SCIPreaderRead(SCIP_READER *reader, SCIP_SET *set, const char *filename, const char *extension, SCIP_RESULT *result)
datastructures for input file readers
SCIP_RETCODE SCIPreaderWrite(SCIP_READER *reader, SCIP_PROB *prob, SCIP_SET *set, FILE *file, const char *extension, SCIP_Bool genericnames, SCIP_RESULT *result)
#define BMSduplicateMemoryArray(ptr, source, num)
int SCIPconshdlrGetNConss(SCIP_CONSHDLR *conshdlr)
SCIP_RETCODE SCIPclockCreate(SCIP_CLOCK **clck, SCIP_CLOCKTYPE clocktype)
internal methods for problem variables
struct SCIP_ReaderData SCIP_READERDATA
public data structures and miscellaneous methods
SCIP_Real SCIPreaderGetReadingTime(SCIP_READER *reader)
void SCIPreaderSetWrite(SCIP_READER *reader, SCIP_DECL_READERWRITE((*readerwrite)))
internal methods for input file readers
void SCIPclockFree(SCIP_CLOCK **clck)
const char * SCIPreaderGetDesc(SCIP_READER *reader)
SCIP_READERDATA * readerdata
#define SCIP_DECL_READERCOPY(x)
static void resetVarname(SCIP_VAR *var, SCIP_SET *set, const char *name)
#define BMSallocMemory(ptr)
internal methods for constraints and constraint handlers
SCIP_DECL_READERREAD(ReaderTSP::scip_read)
common defines and data types used in all packages of SCIP
const char * SCIPreaderGetExtension(SCIP_READER *reader)
memory allocation routines