Scippy

SCIP

Solving Constraint Integer Programs

reader_csol.c File Reference

Detailed Description

file reader and writer for vertex coloring solutions

Author
Gerald Gamrath

This file implements the reader and writer for coloring solution files.

These files have the following structure:
The first line contains the name of the problem, the number of colors used in the solution, and - optional - the name of the algorithm that computed this solution. The second line lists the colors of the nodes, separated by spaces. It is sorted increasingly by the node indices. The numbers for the colors start with 0.

Definition in file reader_csol.c.

#include <assert.h>
#include <string.h>
#include <ctype.h>
#include <stdlib.h>
#include "reader_csol.h"
#include "reader_col.h"
#include "probdata_coloring.h"

Go to the source code of this file.

Macros

#define READER_NAME   "csolreader"
 
#define READER_DESC   "file reader which reads and writes csol-files"
 
#define READER_EXTENSION   "csol"
 
#define COL_MAX_LINELEN   65535
 

Functions

static long getNextNumber (char **s)
 
static SCIP_DECL_READERCOPY (readerCopyCsol)
 
static SCIP_DECL_READERREAD (readerReadCsol)
 
static SCIP_DECL_READERWRITE (readerWriteCsol)
 
SCIP_RETCODE SCIPincludeReaderCsol (SCIP *scip)
 

Macro Definition Documentation

◆ READER_NAME

#define READER_NAME   "csolreader"

Definition at line 49 of file reader_csol.c.

Referenced by SCIP_DECL_READERCOPY(), SCIP_DECL_READERREAD(), and SCIPincludeReaderCsol().

◆ READER_DESC

#define READER_DESC   "file reader which reads and writes csol-files"

Definition at line 50 of file reader_csol.c.

Referenced by SCIPincludeReaderCsol().

◆ READER_EXTENSION

#define READER_EXTENSION   "csol"

Definition at line 51 of file reader_csol.c.

Referenced by SCIPincludeReaderCsol().

◆ COL_MAX_LINELEN

#define COL_MAX_LINELEN   65535

Definition at line 53 of file reader_csol.c.

Referenced by SCIP_DECL_READERREAD().

Function Documentation

◆ getNextNumber()

static long getNextNumber ( char **  s)
static

get next number from string s

Parameters
spointer to the pointer of the current position in the string

Definition at line 63 of file reader_csol.c.

Referenced by SCIP_DECL_READERREAD().

◆ SCIP_DECL_READERCOPY()

static SCIP_DECL_READERCOPY ( readerCopyCsol  )
static

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

Definition at line 84 of file reader_csol.c.

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

◆ SCIP_DECL_READERREAD()

◆ SCIP_DECL_READERWRITE()

◆ SCIPincludeReaderCsol()

SCIP_RETCODE SCIPincludeReaderCsol ( SCIP scip)

includes the csol file reader in SCIP

Parameters
scipSCIP data structure

Definition at line 437 of file reader_csol.c.

References NULL, READER_DESC, READER_EXTENSION, READER_NAME, SCIP_CALL, SCIP_OKAY, SCIPincludeReaderBasic(), SCIPsetReaderCopy(), SCIPsetReaderRead(), and SCIPsetReaderWrite().

Referenced by SCIPincludeColoringPlugins().