Scippy

SCIP

Solving Constraint Integer Programs

reader_rcp.c File Reference

Detailed Description

file reader for "pack" scheduling instances

Author
Stefan Heinz

Definition in file reader_rcp.c.

#include <assert.h>
#include <string.h>
#include <ctype.h>
#include "reader_rcp.h"
#include "reader_sm.h"

Go to the source code of this file.

Macros

Reader properties
#define READER_NAME   "rcpreader"
 
#define READER_DESC   "reader for \"pack\" scheduling instances"
 
#define READER_EXTENSION   "rcp"
 

Functions

Local methods
static SCIP_RETCODE parseDetails (SCIP *scip, SCIP_FILE *file, int *lineno, int **demands, SCIP_DIGRAPH *precedencegraph, int *durations, int *capacities, int njobs, int nresources)
 
static SCIP_RETCODE readFile (SCIP *scip, SCIP_FILE *file, const char *filename)
 
Interface methods
SCIP_RETCODE SCIPincludeReaderRcp (SCIP *scip)
 

Callback methods of reader

#define readerFreeSch   NULL
 
#define readerWriteSch   NULL
 
static SCIP_DECL_READERCOPY (readerCopyRcp)
 
static SCIP_DECL_READERREAD (readerReadRcp)
 

Macro Definition Documentation

◆ READER_NAME

#define READER_NAME   "rcpreader"

Definition at line 44 of file reader_rcp.c.

Referenced by SCIP_DECL_READERCOPY(), and SCIPincludeReaderRcp().

◆ READER_DESC

#define READER_DESC   "reader for \"pack\" scheduling instances"

Definition at line 45 of file reader_rcp.c.

Referenced by SCIPincludeReaderRcp().

◆ READER_EXTENSION

#define READER_EXTENSION   "rcp"

Definition at line 46 of file reader_rcp.c.

Referenced by SCIPincludeReaderRcp().

◆ readerFreeSch

#define readerFreeSch   NULL

destructor of reader to free user data (called when SCIP is exiting)

Definition at line 261 of file reader_rcp.c.

Referenced by SCIPincludeReaderRcp().

◆ readerWriteSch

#define readerWriteSch   NULL

problem writing method of reader

Definition at line 294 of file reader_rcp.c.

Referenced by SCIPincludeReaderRcp().

Function Documentation

◆ parseDetails()

static SCIP_RETCODE parseDetails ( SCIP scip,
SCIP_FILE file,
int *  lineno,
int **  demands,
SCIP_DIGRAPH precedencegraph,
int *  durations,
int *  capacities,
int  njobs,
int  nresources 
)
static

parse job and capacities details

Parameters
scipSCIP data structure
filefile to parse
linenopointer to store line number of the file
demandsdemand matrix resource job demand
precedencegraphdirect graph to store the precedence conditions
durationsarray to store the processing for each job
capacitiesarray to store the different capacities
njobsnumber of jobs to be parsed
nresourcesnumber of capacities to be parsed

Definition at line 58 of file reader_rcp.c.

References NULL, r, SCIP_CALL, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_READERROR, SCIPdebugMessage, SCIPdebugPrintf, SCIPdigraphAddArc(), SCIPfgets(), and SCIPstrToIntValue().

Referenced by readFile().

◆ readFile()

static SCIP_RETCODE readFile ( SCIP scip,
SCIP_FILE file,
const char *  filename 
)
static

read file and create problem

Parameters
scipSCIP data structure
filefile to pares
filenamename of input file

Definition at line 158 of file reader_rcp.c.

References BMSclearMemoryArray, NULL, parseDetails(), SCIP_CALL, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_READERROR, SCIPallocBufferArray, SCIPcreateDigraph(), SCIPcreateSchedulingProblem(), SCIPdebugMessage, SCIPdigraphFree(), SCIPfgets(), SCIPfreeBufferArray, SCIPstrToIntValue(), and TRUE.

Referenced by SCIP_DECL_READERREAD().

◆ SCIP_DECL_READERCOPY()

static SCIP_DECL_READERCOPY ( readerCopyRcp  )
static

copy method for reader plugins (called when SCIP copies plugins)

Definition at line 248 of file reader_rcp.c.

References NULL, READER_NAME, SCIP_CALL, SCIP_OKAY, SCIPincludeReaderRcp(), and SCIPreaderGetName().

◆ SCIP_DECL_READERREAD()

static SCIP_DECL_READERREAD ( readerReadRcp  )
static

problem reading method of reader

Definition at line 266 of file reader_rcp.c.

References CminInput::file, NULL, readFile(), SCIP_CALL, SCIP_NOFILE, SCIP_OKAY, SCIP_SUCCESS, SCIPerrorMessage, SCIPfclose(), SCIPfopen(), and SCIPprintSysError().

◆ SCIPincludeReaderRcp()

SCIP_RETCODE SCIPincludeReaderRcp ( SCIP scip)

includes the rcp file reader into SCIP

Parameters
scipSCIP data structure

Definition at line 309 of file reader_rcp.c.

References NULL, READER_DESC, READER_EXTENSION, READER_NAME, readerFreeSch, readerWriteSch, SCIP_CALL, SCIP_OKAY, and SCIPincludeReader().

Referenced by runShell(), and SCIP_DECL_READERCOPY().