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__sm_8c_source.php below:

SCIP Doxygen Documentation: applications/Scheduler/src/reader_sm.c Source File

49#define READER_NAME "smreader" 50#define READER_DESC "scheduling file reader for sm files (RCPSP format)" 51#define READER_EXTENSION "sm" 59#define DEFAULT_FILENAME "-" 65#define SM_MAX_LINELEN 65536 85 const char

** jobnames;

86 const char

** resourcenames;

113 for

(i = 0; i < rcpspdata->njobs ; ++i )

119 for

(

r

= 0;

r

< rcpspdata->nresources; ++

r

)

130 for

(

r

= 0;

r

< rcpspdata->nresources; ++

r

)

155 const char

* erritem,

159

assert(msg !=

NULL

);

160

assert(state !=

NULL

);

162 if

( erritem !=

NULL

)

181

assert(linestr !=

NULL

);

182

assert(state !=

NULL

);

184 if

( strncmp(linestr,

"jobs"

, 4) == 0 )

186 else if

( strncmp(linestr,

"RESOURCES"

, 9) == 0 )

188 else if

( strncmp(linestr,

"PRECEDENCE"

, 4) == 0 )

190 else if

( strncmp(linestr,

"REQUESTS"

, 4) == 0 )

192 else if

( strncmp(linestr,

"RESOURCEAVAILABILITIES"

, 10) == 0 )

210

assert(linestr !=

NULL

);

211

assert(state !=

NULL

);

213 if

( strncmp(linestr,

"RESOURCES"

, 4) == 0 )

222 parseError

(

scip

, lineno,

"expexted number of resources"

, linestr, state);

226

rcpspdata->nresources = (int)(nresources + 0.5);

250

assert(linestr !=

NULL

);

251

assert(state !=

NULL

);

259 parseError

(

scip

, lineno,

"expexted number of jobs"

, linestr, state);

263

rcpspdata->njobs = (int)(njobs + 0.5);

287

assert(linestr !=

NULL

);

288

assert(state !=

NULL

);

290 if

( strncmp(linestr,

"RESOURCEAVAILABILITIES"

, 10) == 0 )

299 while

(isspace(*name))

324

assert(linestr !=

NULL

);

325

assert(state !=

NULL

);

328 for

(

r

= 0;

r

< rcpspdata->nresources; ++

r

)

331

rcpspdata->capacities[

r

] = (int)(value + 0.5);

353

assert(linestr !=

NULL

);

354

assert(state !=

NULL

);

357 if

( (!strncmp(linestr,

"REQUESTS"

, 4) ) || ( !strncmp(linestr,

"jobnr"

, 3) ) || ( !strncmp(linestr,

"-"

, 1) ) )

383

rcpspdata->durations[jobid] = value;

388 for

(

r

= 0;

r

< rcpspdata->nresources; ++

r

)

393

rcpspdata->demands[jobid][

r

] = value;

397 if

( jobid == rcpspdata->njobs - 1 )

418

assert(state !=

NULL

);

420 if

( ( !strncmp(s,

"PRECEDENCES"

, 3) ) || ( !strncmp(s,

"jobnr"

, 4) ) )

427 if

( rcpspdata->precedencegraph ==

NULL

)

447 for

( p = 0; p < nsuccessors; ++p )

460 if

(pred == rcpspdata->njobs-1)

479 for

( j = 0; j < njobs; ++j )

489

duration = durations[j];

491 for

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

495

distance = (int)(

size_t

)distances[i];

497 if

( distance != INT_MAX )

498

duration =

MAX

(duration, distance);

511 const char

* filename,

521

assert(filename !=

NULL

);

535 if

(

NULL

!= (s = strpbrk(buf,

"*\r\n"

)) )

602 if

( state !=

END

&& state !=

ERROR

)

605 if

( state ==

ERROR

)

620

assert(reader !=

NULL

);

638

rcpspdata.precedencegraph =

NULL

;

639

rcpspdata.jobnames =

NULL

;

640

rcpspdata.durations =

NULL

;

641

rcpspdata.demands =

NULL

;

642

rcpspdata.capacities =

NULL

;

644

rcpspdata.nresources = 0;

654 if

( strncmp(predfilename,

"-"

, 1) != 0 )

658

file = fopen(predfilename,

"w"

);

674

rcpspdata.precedencegraph, rcpspdata.durations, rcpspdata.capacities, rcpspdata.njobs, rcpspdata.nresources,

TRUE

) );

679 if

( rcpspdata.njobs > 0 )

681 for

( j = 0; j < rcpspdata.njobs; ++j )

692 if

( rcpspdata.nresources > 0 )

696 for

(

r

= 0;

r

< rcpspdata.nresources; ++

r

)

703 if

( rcpspdata.precedencegraph !=

NULL

)

728

assert(reader !=

NULL

);

735 "reading/"READER_NAME"/mipmodel"

,

"create MIP model?"

,

740 "file name of precedence graph output file (in GML format), or - if no output should be created"

,

749 const char

* problemname,

750 const char

** jobnames,

751 const char

** resourcenames,

779

assert( njobs >= 0 );

793 for

( j = 0; j < njobs - 1; ++j )

796 if

( jobnames !=

NULL

)

822 for

( j = 0; j < njobs - 1; ++j )

830

assert(predvar !=

NULL

);

832 if

( nsuccessors > 0 )

840 for

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

845

succvar = jobs[successors[i]];

846

assert(succvar !=

NULL

);

850

distance = (int)(

size_t

)distances[i];

852 if

( distance == INT_MAX )

853

distance = durations[j];

880 for

(

r

= 0;

r

< nresources; ++

r

)

883 for

( j = 0; j < njobs; ++j )

885 if

( demands[j][

r

] > 0 )

887

vars[nvars] = jobs[j];

888

consdemands[nvars] = demands[j][

r

];

889

consdurations[nvars] = durations[j];

897 if

( resourcenames !=

NULL

)

903

nvars, vars, consdurations, consdemands, capacities[

r

],

914

durations, demands, capacities, njobs, nresources) );

constraint handler for cumulative constraints

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

Constraint handler for variable bound 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 SCIPcreateConsVarbound(SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_VAR *var, SCIP_VAR *vbdvar, SCIP_Real vbdcoef, 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 SCIPcreateConsCumulative(SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, int *durations, int *demands, int capacity, 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)

void ** SCIPdigraphGetSuccessorsData(SCIP_DIGRAPH *digraph, int node)

int SCIPdigraphGetNSuccessors(SCIP_DIGRAPH *digraph, int node)

void SCIPdigraphPrintGml(SCIP_DIGRAPH *digraph, FILE *file)

SCIP_RETCODE SCIPdigraphAddArc(SCIP_DIGRAPH *digraph, int startnode, int endnode, void *data)

void SCIPdigraphFree(SCIP_DIGRAPH **digraph)

void SCIPdigraphPrint(SCIP_DIGRAPH *digraph, SCIP_MESSAGEHDLR *messagehdlr, FILE *file)

int * SCIPdigraphGetSuccessors(SCIP_DIGRAPH *digraph, int node)

SCIP_RETCODE SCIPcreateDigraph(SCIP *scip, SCIP_DIGRAPH **digraph, int nnodes)

SCIP_RETCODE SCIPaddVar(SCIP *scip, SCIP_VAR *var)

SCIP_RETCODE SCIPaddCons(SCIP *scip, SCIP_CONS *cons)

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 SCIPinfoMessage(SCIP *scip, FILE *file, const char *formatstr,...)

void SCIPverbMessage(SCIP *scip, SCIP_VERBLEVEL msgverblevel, FILE *file, const char *formatstr,...)

SCIP_MESSAGEHDLR * SCIPgetMessagehdlr(SCIP *scip)

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

SCIP_RETCODE SCIPgetStringParam(SCIP *scip, const char *name, char **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_RETCODE SCIPreleaseCons(SCIP *scip, SCIP_CONS **cons)

#define SCIPallocBufferArray(scip, ptr, num)

#define SCIPfreeBufferArray(scip, ptr)

#define SCIPduplicateBufferArray(scip, ptr, source, num)

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 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 SCIPmarkDoNotMultaggrVar(SCIP *scip, SCIP_VAR *var)

SCIP_Bool SCIPstrToIntValue(const char *str, int *value, char **endptr)

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

SCIP_Bool SCIPstrToRealValue(const char *str, SCIP_Real *value, char **endptr)

void SCIPprintSysError(const char *message)

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

SCIP_RETCODE SCIPinitializeHeurListScheduling(SCIP *scip, SCIP_DIGRAPH *precedencegraph, SCIP_VAR **vars, int *durations, int **resourcedemands, int *capacities, int njobs, int nresources)

scheduling specific primal heuristic which is based on bidirectional serial generation scheme.

struct SCIP_File SCIP_FILE

static void checkForNewSection(char *linestr, STATE *state)

static void parseError(SCIP *scip, int lineno, const char *msg, const char *erritem, STATE *state)

SCIP_RETCODE SCIPcreateSchedulingProblem(SCIP *scip, const char *problemname, const char **jobnames, const char **resourcenames, int **demands, SCIP_DIGRAPH *precedencegraph, int *durations, int *capacities, int njobs, int nresources, SCIP_Bool initialize)

SCIP_RETCODE SCIPincludeReaderSm(SCIP *scip)

static int computeUbmakespan(int *durations, int njobs, SCIP_DIGRAPH *precedencegraph)

struct SCIP_RcpspData SCIP_RCPSPDATA

static SCIP_RETCODE getResourcesNames(SCIP *scip, char *linestr, STATE *state, SCIP_RCPSPDATA *rcpspdata)

static SCIP_RETCODE getNJobs(SCIP *scip, int lineno, char *linestr, STATE *state, SCIP_RCPSPDATA *rcpspdata)

static SCIP_RETCODE getNResources(SCIP *scip, int lineno, char *linestr, STATE *state, SCIP_RCPSPDATA *rcpspdata)

static SCIP_RETCODE getPrecedence(SCIP *scip, char *s, STATE *state, SCIP_RCPSPDATA *rcpspdata)

static SCIP_RETCODE readFile(SCIP *scip, const char *filename, SCIP_RCPSPDATA *rcpspdata)

static SCIP_RETCODE getResourcesCapacities(SCIP *scip, char *linestr, STATE *state, SCIP_RCPSPDATA *rcpspdata)

static SCIP_DECL_READERREAD(readerReadSm)

enum reading_states STATE

static SCIP_RETCODE getJobs(SCIP *scip, char *linestr, STATE *state, SCIP_RCPSPDATA *rcpspdata)

static SCIP_DECL_READERCOPY(readerCopySm)

scheduling problem file reader for RCPSP format

struct SCIP_ReaderData SCIP_READERDATA

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