A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://scip.zib.de/doc/html/reader__cnf_8c_source.php below:

SCIP Doxygen Documentation: reader_cnf.c Source File

56#define READER_NAME "cnfreader" 57#define READER_DESC "file reader for SAT problems in conjunctive normal form" 58#define READER_EXTENSION "cnf" 60#define MAXLINELEN 65536 82 const char

* warningmsg

101

assert(file !=

NULL

);

102

assert(buffer !=

NULL

);

104

assert(linecount !=

NULL

);

112

linelen = (int)strlen(line);

113 if

( linelen == size-1 )

124 while

( line !=

NULL

&& (*line ==

'c'

|| *line ==

'\n'

) );

126 if

( line !=

NULL

&& linelen >= 2 && line[linelen-2] ==

'\n'

)

127

line[linelen-2] =

'\0'

;

128 else if

( linelen == 0 )

131

assert((line ==

NULL

) == (*buffer ==

'\0'

));

177

assert(file !=

NULL

);

185 readError

(

scip

, linecount,

"problem declaration line expected"

);

189 if

( sscanf(line,

"p %8s %d %d"

, format, &nvars, &nclauses) != 3 )

191 readError

(

scip

, linecount,

"invalid problem declaration (must be 'p cnf <nvars> <nclauses>')"

);

194 if

( strcmp(format,

"cnf"

) != 0 )

226 for

( v = 0; v < nvars; ++v )

240

retcode =

readCnfLine

(

scip

, file, line, (

int

)

sizeof

(line), &linecount);

244 if

( *line !=

'\0'

&& *line !=

'%'

)

246

tok =

SCIPstrtok

(line,

" \f\n\r\t"

, &nexttok);

247 while

( tok !=

NULL

)

251 if

( sscanf(tok,

"%d"

, &v) != 1 )

263 if

( clauselen == 0 )

264 readWarning

(

scip

, linecount,

"empty clause detected in line -- problem infeasible"

);

291 for

( i = 0; i < clauselen; ++i )

304 else if

( v >= -nvars && v <= nvars )

306 if

( clauselen >= nvars )

308 readError

(

scip

, linecount,

"too many literals in clause"

);

322

clausevars[clauselen] = vars[varnum];

340 while

( *line !=

'\0'

&& *line !=

'%'

);

349 if

( clausenum != nclauses )

357 for

( v = 0; v < nvars; ++v )

384

assert(reader !=

NULL

);

401

assert(reader !=

NULL

);

403

assert(filename !=

NULL

);

404

assert(result !=

NULL

);

419 SCIPerrorMessage

(

"Error creating problem for filename <%s>\n"

, filename);

456 "reading/cnfreader/useobj"

,

"should an artificial objective, depending on the number of clauses a variable appears in, be used?"

,

Constraint handler for linear constraints in their most general form, .

Constraint handler for logicor constraints (equivalent to set covering, but algorithms are suited fo...

Constraint handler for the set partitioning / packing / covering constraints .

SCIP_FILE * SCIPfopen(const char *path, const char *mode)

int SCIPfclose(SCIP_FILE *fp)

char * SCIPfgets(char *s, int size, SCIP_FILE *stream)

SCIP_RETCODE SCIPcreateConsLinear(SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, SCIP_Real *vals, SCIP_Real lhs, SCIP_Real rhs, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode)

SCIP_RETCODE SCIPcreateConsLogicor(SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode)

SCIP_RETCODE SCIPcreateConsSetcover(SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode)

SCIP_RETCODE SCIPincludeReaderCnf(SCIP *scip)

SCIP_RETCODE SCIPaddVar(SCIP *scip, SCIP_VAR *var)

SCIP_RETCODE SCIPaddCons(SCIP *scip, SCIP_CONS *cons)

SCIP_RETCODE SCIPsetObjsense(SCIP *scip, SCIP_OBJSENSE objsense)

SCIP_RETCODE SCIPcreateProb(SCIP *scip, const char *name, SCIP_DECL_PROBDELORIG((*probdelorig)), SCIP_DECL_PROBTRANS((*probtrans)), SCIP_DECL_PROBDELTRANS((*probdeltrans)), SCIP_DECL_PROBINITSOL((*probinitsol)), SCIP_DECL_PROBEXITSOL((*probexitsol)), SCIP_DECL_PROBCOPY((*probcopy)), SCIP_PROBDATA *probdata)

void SCIPwarningMessage(SCIP *scip, const char *formatstr,...)

SCIP_RETCODE SCIPgetBoolParam(SCIP *scip, const char *name, SCIP_Bool *value)

SCIP_RETCODE SCIPaddBoolParam(SCIP *scip, const char *name, const char *desc, SCIP_Bool *valueptr, SCIP_Bool isadvanced, SCIP_Bool defaultvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)

SCIP_CONSHDLR * SCIPfindConshdlr(SCIP *scip, const char *name)

SCIP_RETCODE SCIPreleaseCons(SCIP *scip, SCIP_CONS **cons)

#define SCIPallocBufferArray(scip, ptr, num)

#define SCIPfreeBufferArray(scip, ptr)

SCIP_RETCODE SCIPincludeReaderBasic(SCIP *scip, SCIP_READER **readerptr, const char *name, const char *desc, const char *extension, SCIP_READERDATA *readerdata)

SCIP_RETCODE SCIPsetReaderCopy(SCIP *scip, SCIP_READER *reader, SCIP_DECL_READERCOPY((*readercopy)))

const char * SCIPreaderGetName(SCIP_READER *reader)

SCIP_RETCODE SCIPsetReaderRead(SCIP *scip, SCIP_READER *reader, SCIP_DECL_READERREAD((*readerread)))

SCIP_Real SCIPinfinity(SCIP *scip)

SCIP_RETCODE SCIPreleaseVar(SCIP *scip, SCIP_VAR **var)

SCIP_RETCODE SCIPgetNegatedVar(SCIP *scip, SCIP_VAR *var, SCIP_VAR **negvar)

SCIP_RETCODE SCIPcreateVar(SCIP *scip, SCIP_VAR **var, const char *name, SCIP_Real lb, SCIP_Real ub, SCIP_Real obj, SCIP_VARTYPE vartype, SCIP_Bool initial, SCIP_Bool removable, SCIP_DECL_VARDELORIG((*vardelorig)), SCIP_DECL_VARTRANS((*vartrans)), SCIP_DECL_VARDELTRANS((*vardeltrans)), SCIP_DECL_VARCOPY((*varcopy)), SCIP_VARDATA *vardata)

SCIP_RETCODE SCIPchgVarObj(SCIP *scip, SCIP_VAR *var, SCIP_Real newobj)

int SCIPsnprintf(char *t, int len, const char *s,...)

void SCIPprintSysError(const char *message)

char * SCIPstrtok(char *s, const char *delim, char **ptrptr)

memory allocation routines

wrapper functions to map file i/o to standard or zlib file i/o

struct SCIP_File SCIP_FILE

public methods for message output

public data structures and miscellaneous methods

public methods for input file readers

static void readError(SCIP *scip, int linecount, const char *errormsg)

static SCIP_DECL_READERCOPY(readerCopyCnf)

static SCIP_DECL_READERREAD(readerReadCnf)

static SCIP_RETCODE readCnfLine(SCIP *scip, SCIP_FILE *file, char *buffer, int size, int *linecount)

static SCIP_RETCODE readCnf(SCIP *scip, SCIP_FILE *file)

static void readWarning(SCIP *scip, int linecount, const char *warningmsg)

public methods for constraint handler plugins and constraints

public methods for memory management

public methods for message handling

public methods for numerical tolerances

public methods for SCIP parameter handling

public methods for global and local (sub)problems

public methods for reader plugins

public methods for SCIP variables

enum SCIP_Retcode SCIP_RETCODE


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4