Skip to content
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* This file is part of the program and library */
/* SCIP --- Solving Constraint Integer Programs */
/* */
/* Copyright (C) 2002-2020 Konrad-Zuse-Zentrum */
/* fuer Informationstechnik Berlin */
/* */
/* SCIP is distributed under the terms of the ZIB Academic License. */
/* */
/* You should have received a copy of the ZIB Academic License */
/* along with SCIP; see the file COPYING. If not visit scipopt.org. */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/**@file rbtree.h
* @brief intrusive red black tree datastructure
* @author Leona Gottwald
*/
/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
#ifndef __SCIP_RB_TREE_H__
#define __SCIP_RB_TREE_H__
#include "scip/def.h"
#include "scip/type_misc.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef struct SCIP_RBTreeNode SCIP_RBTREENODE;
struct SCIP_RBTreeNode
{
uintptr_t parent;
SCIP_RBTREENODE* child[2];
};
/* macro to make any structure a node in a rbtree.
* It is very important that this is the first member of the structure.
*
* Example usage:
* struct SomeStruct
* {
* SCIP_RBTREE_HOOKS;
* OTHERDATA* mydata;
* int othermember;
* };
*
*/
#define SCIP_RBTREE_HOOKS SCIP_RBTREENODE _rbtreenode
/* convenience macros that automtically cast the given arguments to SCIP_RBTREENODE */
#define SCIPrbtreeFirst(root) SCIPrbtreeFirst_call((SCIP_RBTREENODE*)(root))
#define SCIPrbtreeLast(root) SCIPrbtreeLast_call((SCIP_RBTREENODE*)(root))
#define SCIPrbtreeSuccessor(x) SCIPrbtreeSuccessor_call((SCIP_RBTREENODE*)(x))
#define SCIPrbtreePredecessor(x) SCIPrbtreePredecessor_call((SCIP_RBTREENODE*)(x))
#define SCIPrbtreeDelete(root, node) SCIPrbtreeDelete_call((SCIP_RBTREENODE**)(root), (SCIP_RBTREENODE*)(node))
#define SCIPrbtreeInsert(r,p,c,n) SCIPrbtreeInsert_call((SCIP_RBTREENODE**)(r), (SCIP_RBTREENODE*)(p), (c), (SCIP_RBTREENODE*)(n) )
#define SCIPrbtreeFindInt(r,k,n) SCIPrbtreeFindInt_call((SCIP_RBTREENODE*)(r),(k),(SCIP_RBTREENODE**)(n))
#define SCIPrbtreeFindReal(r,k,n) SCIPrbtreeFindReal_call((SCIP_RBTREENODE*)(r),(k),(SCIP_RBTREENODE**)(n))
#define SCIPrbtreeFindPtr(c,r,k,n) SCIPrbtreeFindPtr_call((c),(SCIP_RBTREENODE*)(r),(void*)(k),(SCIP_RBTREENODE**)(n))
#define SCIPrbtreeFindElem(c,r,k,n) SCIPrbtreeFindElem_call((c),(SCIP_RBTREENODE*)(r),(SCIP_RBTREENODE*)(k),(SCIP_RBTREENODE**)(n))
#define FOR_EACH_NODE(type, n, r, body) \
{ \
type n; \
type __next; \
n = (type) SCIPrbtreeFirst(r); \
while( n != NULL ) \
{ \
__next = (type) SCIPrbtreeSuccessor(n); \
body \
n = __next; \
} \
}
#define SCIP_DEF_RBTREE_FIND(NAME, KEYTYPE, NODETYPE, LT, GT) \
/** Searches for an element in the tree given by it's root. If a node equal to the given element exists in the tree, \
* (*node) will point to that node upon termination of this function and 0 will be returned. \
* If the tree is empty (*node) will be NULL. Otherwise (*node) will point to the predecessor or \
* successor of the given element and -1 or 1 will be returned respectively. The return value and the \
* predecessor or successor can then be passed to the insert function to insert the element but only if \
* it is not in the tree already, i.e. this function did not return 0. \
* \
* @returns 0 if the key was found, then *node is the node with the key and \
* -1 or 1 if the node was node found, then *node is the node with the \
* next smaller, or next larger key repectively. \
*/ \
int NAME( \
NODETYPE* root, /**< root of the tree */ \
KEYTYPE key, /**< key to search for */ \
NODETYPE** node /**< pointer to return node */ \
) \
{ \
SCIP_RBTREENODE* x; \
*node = NULL; \
x = (SCIP_RBTREENODE*) root; \
while( x != NULL ) \
{ \
*node = (NODETYPE*) x; \
if( LT(key, ((NODETYPE*)x)) ) \
x = x->child[0]; \
else if( GT(key, ((NODETYPE*)x)) ) \
x = x->child[1]; \
else \
return 0; \
} \
if( *node != NULL && LT(key, ((NODETYPE*)(*node)) ) ) \
return 1; \
return -1; \
}
/** get first element in tree with respect to sorting key */
SCIP_EXPORT
SCIP_RBTREENODE* SCIPrbtreeFirst_call(
SCIP_RBTREENODE* root /**< root of the tree */
);
/** get last element in tree with respect to sorting key */
SCIP_EXPORT
SCIP_RBTREENODE* SCIPrbtreeLast_call(
SCIP_RBTREENODE* root /**< root of the tree */
);
/** get successor of given element in the tree */
SCIP_EXPORT
SCIP_RBTREENODE* SCIPrbtreeSuccessor_call(
SCIP_RBTREENODE* x /**< element to get successor for */
);
/** get predecessor of given element in the tree */
SCIP_EXPORT
SCIP_RBTREENODE* SCIPrbtreePredecessor_call(
SCIP_RBTREENODE* x /**< element to get predecessor for */
);
/** delete the given node from the tree given by it's root node.
* The node must be contained in the tree rooted at root.
*/
SCIP_EXPORT
void SCIPrbtreeDelete_call(
SCIP_RBTREENODE** root, /**< root of the tree */
SCIP_RBTREENODE* node /**< node to delete from tree */
);
/** insert node into the tree given by it's root. Requires the
* future parent and the position of the parent as returned by
* the tree's find function defined using the SCIP_DEF_RBTREE_FIND
* macro.
*/
SCIP_EXPORT
void SCIPrbtreeInsert_call(
SCIP_RBTREENODE** root, /**< root of the tree */
SCIP_RBTREENODE* parent, /**< future parent of node to be inserted */
int pos, /**< position of parent with respect to node, i.e.
* -1 if the parent's key comes before node and 1
* if the parent's key comes after the node
*/
SCIP_RBTREENODE* node /**< node to insert into the tree */
);
#ifdef __cplusplus
}
#endif
#endif
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* This file is part of the program and library */
/* SCIP --- Solving Constraint Integer Programs */
/* */
/* Copyright (C) 2002-2020 Konrad-Zuse-Zentrum */
/* fuer Informationstechnik Berlin */
/* */
/* SCIP is distributed under the terms of the ZIB Academic License. */
/* */
/* You should have received a copy of the ZIB Academic License */
/* along with SCIP; see the file COPYING. If not visit scipopt.org. */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/**@file reader.h
* @ingroup INTERNALAPI
* @brief internal methods for input file readers
* @author Tobias Achterberg
*/
/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
#ifndef __SCIP_READER_H__
#define __SCIP_READER_H__
#include "scip/def.h"
#include "scip/type_prob.h"
#include "scip/type_retcode.h"
#include "scip/type_result.h"
#include "scip/type_set.h"
#include "scip/type_reader.h"
#include "scip/pub_reader.h"
#ifdef __cplusplus
extern "C" {
#endif
/** copies the given reader to a new scip */
SCIP_RETCODE SCIPreaderCopyInclude(
SCIP_READER* reader, /**< reader */
SCIP_SET* set /**< SCIP_SET of SCIP to copy to */
);
/** creates a reader */
SCIP_RETCODE SCIPreaderCreate(
SCIP_READER** reader, /**< pointer to store reader */
SCIP_SET* set, /**< global SCIP settings */
const char* name, /**< name of reader */
const char* desc, /**< description of reader */
const char* extension, /**< file extension that reader processes */
SCIP_DECL_READERCOPY ((*readercopy)), /**< copy method of reader or NULL if you don't want to copy your plugin into sub-SCIPs */
SCIP_DECL_READERFREE ((*readerfree)), /**< destructor of reader */
SCIP_DECL_READERREAD ((*readerread)), /**< read method */
SCIP_DECL_READERWRITE ((*readerwrite)), /**< write method */
SCIP_READERDATA* readerdata /**< reader data */
);
/** frees memory of reader */
SCIP_RETCODE SCIPreaderFree(
SCIP_READER** reader, /**< pointer to reader data structure */
SCIP_SET* set /**< global SCIP settings */
);
/** reads problem data from file with given reader or returns SCIP_DIDNOTRUN */
SCIP_RETCODE SCIPreaderRead(
SCIP_READER* reader, /**< reader */
SCIP_SET* set, /**< global SCIP settings */
const char* filename, /**< name of the input file */
const char* extension, /**< extension of the input file name */
SCIP_RESULT* result /**< pointer to store the result of the callback method */
);
/** writes problem data to file with given reader or returns SCIP_DIDNOTRUN */
SCIP_RETCODE SCIPreaderWrite(
SCIP_READER* reader, /**< reader */
SCIP_PROB* prob, /**< problem data */
SCIP_SET* set, /**< global SCIP settings */
FILE* file, /**< output file (or NULL for standard output) */
const char* format, /**< file format (or NULL) */
SCIP_Bool genericnames, /**< using generic variable and constraint names? */
SCIP_RESULT* result /**< pointer to store the result of the callback method */
);
/** gets time in seconds used in this reader for reading */
SCIP_Real SCIPreaderGetReadingTime(
SCIP_READER* reader /**< reader */
);
/** enables or disables all clocks of \p reader, depending on the value of the flag */
void SCIPreaderEnableOrDisableClocks(
SCIP_READER* reader, /**< the reader for which all clocks should be enabled or disabled */
SCIP_Bool enable /**< should the clocks be enabled? */
);
/** resets reading time of reader */
SCIP_RETCODE SCIPreaderResetReadingTime(
SCIP_READER* reader /**< reader */
);
/** sets copy method of reader */
void SCIPreaderSetCopy(
SCIP_READER* reader, /**< reader */
SCIP_DECL_READERCOPY ((*readercopy)) /**< copy method of reader or NULL if you don't want to copy your plugin into sub-SCIPs */
);
/** sets destructor of reader */
void SCIPreaderSetFree(
SCIP_READER* reader, /**< reader */
SCIP_DECL_READERFREE ((*readerfree)) /**< destructor of reader */
);
/** sets read method of reader */
void SCIPreaderSetRead(
SCIP_READER* reader, /**< reader */
SCIP_DECL_READERREAD ((*readerread)) /**< read method */
);
/** sets write method of reader */
void SCIPreaderSetWrite(
SCIP_READER* reader, /**< reader */
SCIP_DECL_READERWRITE ((*readerwrite)) /**< write method */
);
#ifdef __cplusplus
}
#endif
#endif
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* This file is part of the program and library */
/* SCIP --- Solving Constraint Integer Programs */
/* */
/* Copyright (C) 2002-2020 Konrad-Zuse-Zentrum */
/* fuer Informationstechnik Berlin */
/* */
/* SCIP is distributed under the terms of the ZIB Academic License. */
/* */
/* You should have received a copy of the ZIB Academic License */
/* along with SCIP; see the file COPYING. If not visit scipopt.org. */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/**@file reader_bnd.h
* @ingroup FILEREADERS
* @brief file reader for variable bounds
* @author Ambros Gleixner
*
* This reader allows to read a file containing new bounds for variables of the current problem. Each line of the file
* should have format
*
* \<variable name\> \<lower bound\> \<upper bound\>
*
* where infinite bounds can be written as inf, +inf or -inf. Note that only a subset of the variables may appear in
* the file. Lines with unknown variable names are ignored. The writing functionality is currently not supported.
*/
/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
#ifndef __SCIP_READER_BND_H__
#define __SCIP_READER_BND_H__
#include "scip/def.h"
#include "scip/type_retcode.h"
#include "scip/type_scip.h"
#ifdef __cplusplus
extern "C" {
#endif
/** includes the bnd file reader into SCIP
*
* @ingroup FileReaderIncludes
*/
SCIP_EXPORT
SCIP_RETCODE SCIPincludeReaderBnd(
SCIP* scip /**< SCIP data structure */
);
#ifdef __cplusplus
}
#endif
#endif
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* This file is part of the program and library */
/* SCIP --- Solving Constraint Integer Programs */
/* */
/* Copyright (C) 2002-2020 Konrad-Zuse-Zentrum */
/* fuer Informationstechnik Berlin */
/* */
/* SCIP is distributed under the terms of the ZIB Academic License. */
/* */
/* You should have received a copy of the ZIB Academic License */
/* along with SCIP; see the file COPYING. If not visit scipopt.org. */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/**@file reader_ccg.h
* @ingroup FILEREADERS
* @brief Column connectivity graph file reader (actually, only a writer)
* @author Marc Pfetsch
*
* Write weighted column connectivity graph, see reader_ccg.c.
*/
/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
#ifndef __SCIP_READER_CCG_H__
#define __SCIP_READER_CCG_H__
#include "scip/def.h"
#include "scip/type_cons.h"
#include "scip/type_result.h"
#include "scip/type_retcode.h"
#include "scip/type_scip.h"
#include "scip/type_var.h"
#ifdef __cplusplus
extern "C" {
#endif
/** includes the ccg file reader into SCIP
*
* @ingroup FileReaderIncludes
*/
SCIP_EXPORT
SCIP_RETCODE SCIPincludeReaderCcg(
SCIP* scip /**< SCIP data structure */
);
/**@addtogroup FILEREADERS
*
* @{
*/
/** writes problem to file */
SCIP_EXPORT
SCIP_RETCODE SCIPwriteCcg(
SCIP* scip, /**< SCIP data structure */
FILE* file, /**< output file, or NULL if standard output should be used */
const char* name, /**< problem name */
SCIP_Bool transformed, /**< TRUE iff problem is the transformed problem */
SCIP_VAR** vars, /**< array with active variables ordered binary, integer, implicit, continuous */
int nvars, /**< number of active variables in the problem */
SCIP_CONS** conss, /**< array with constraints of the problem */
int nconss, /**< number of constraints in the problem */
SCIP_RESULT* result /**< pointer to store the result of the file writing call */
);
/** @} */
#ifdef __cplusplus
}
#endif
#endif
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* This file is part of the program and library */
/* SCIP --- Solving Constraint Integer Programs */
/* */
/* Copyright (C) 2002-2020 Konrad-Zuse-Zentrum */
/* fuer Informationstechnik Berlin */
/* */
/* SCIP is distributed under the terms of the ZIB Academic License. */
/* */
/* You should have received a copy of the ZIB Academic License */
/* along with SCIP; see the file COPYING. If not visit scipopt.org. */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/**@file reader_cip.h
* @ingroup FILEREADERS
* @brief CIP file reader
* @author Stefan Heinz
*
* The CIP format consists of information written by the individual constraints. Thus, the format is
* defined within the constraint handlers. Please check the code or documentation there.
*
* The CIP format is the only format within SCIP that allows to write and read all constraints; all
* other file formats are restricted to some particular sub-class of constraint integer programs.
*/
/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
#ifndef __SCIP_READER_CIP_H__
#define __SCIP_READER_CIP_H__
#include "scip/def.h"
#include "scip/type_retcode.h"
#include "scip/type_scip.h"
#ifdef __cplusplus
extern "C" {
#endif
/** includes the cip file reader into SCIP
*
* @ingroup FileReaderIncludes
*/
SCIP_EXPORT
SCIP_RETCODE SCIPincludeReaderCip(
SCIP* scip /**< SCIP data structure */
);
#ifdef __cplusplus
}
#endif
#endif
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* This file is part of the program and library */
/* SCIP --- Solving Constraint Integer Programs */
/* */
/* Copyright (C) 2002-2020 Konrad-Zuse-Zentrum */
/* fuer Informationstechnik Berlin */
/* */
/* SCIP is distributed under the terms of the ZIB Academic License. */
/* */
/* You should have received a copy of the ZIB Academic License */
/* along with SCIP; see the file COPYING. If not visit scipopt.org. */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/**@file reader_cnf.h
* @ingroup FILEREADERS
* @brief CNF file reader
* @author Thorsten Koch
* @author Tobias Achterberg
*
* The DIMACS CNF (conjunctive normal form) is a file format used for example for SAT problems. For a detailed description of
* this format see http://people.sc.fsu.edu/~jburkardt/data/cnf/cnf.html .
*/
/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
#ifndef __SCIP_READER_CNF_H__
#define __SCIP_READER_CNF_H__
#include "scip/def.h"
#include "scip/type_retcode.h"
#include "scip/type_scip.h"
#ifdef __cplusplus
extern "C" {
#endif
/** includes the cnf file reader into SCIP
*
* @ingroup FileReaderIncludes
*/
SCIP_EXPORT
SCIP_RETCODE SCIPincludeReaderCnf(
SCIP* scip /**< SCIP data structure */
);
#ifdef __cplusplus
}
#endif
#endif
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* This file is part of the program and library */
/* SCIP --- Solving Constraint Integer Programs */
/* */
/* Copyright (C) 2002-2020 Konrad-Zuse-Zentrum */
/* fuer Informationstechnik Berlin */
/* */
/* SCIP is distributed under the terms of the ZIB Academic License. */
/* */
/* You should have received a copy of the ZIB Academic License */
/* along with SCIP; see the file COPYING. If not visit scipopt.org. */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/**@file reader_cor.h
* @ingroup FILEREADERS
* @brief COR file reader (MPS format of the core problem for stochastic programs)
* @author Stephen J. Maher
*
* This is a reader for the core file of a stochastic programming instance in SMPS format.
* The three files that must be read are:
* - .cor
* - .tim
* - .sto
*
* Alternatively, it is possible to create a .smps file with the relative path to the .cor, .tim and .sto files.
* A file reader is available for the .smps file.
*
* The core file is in the form of an MPS.
*
* Details regarding the SMPS file format can be found at:
* Birge, J. R.; Dempster, M. A.; Gassmann, H. I.; Gunn, E.; King, A. J. & Wallace, S. W.
* A standard input format for multiperiod stochastic linear programs
* IIASA, Laxenburg, Austria, WP-87-118, 1987
*
*/
/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
#ifndef __SCIP_READER_COR_H__
#define __SCIP_READER_COR_H__
#include "scip/def.h"
#include "scip/type_reader.h"
#include "scip/type_result.h"
#include "scip/type_retcode.h"
#include "scip/type_scip.h"
#ifdef __cplusplus
extern "C" {
#endif
/** includes the cor file reader into SCIP
*
* @ingroup FileReaderIncludes
*/
SCIP_EXPORT
SCIP_RETCODE SCIPincludeReaderCor(
SCIP* scip /**< SCIP data structure */
);
/**@addtogroup FILEREADERS
*
* @{
*/
/** reads problem from file */
SCIP_EXPORT
SCIP_RETCODE SCIPreadCor(
SCIP* scip, /**< SCIP data structure */
const char* filename, /**< full path and name of file to read, or NULL if stdin should be used */
SCIP_RESULT* result /**< pointer to store the result of the file reading call */
);
/*
* Interface method for the tim and sto readers
*/
/** returns whether the COR file has been successfully read. This is used by the TIM and STO readers. */
SCIP_EXPORT
SCIP_Bool SCIPcorHasRead(
SCIP_READER* reader /**< the file reader itself */
);
/** returns the number of variable names in the COR problem */
SCIP_EXPORT
int SCIPcorGetNVarNames(
SCIP_READER* reader /**< the file reader itself */
);
/** returns the number of constraint names in the COR problem */
SCIP_EXPORT
int SCIPcorGetNConsNames(
SCIP_READER* reader /**< the file reader itself */
);
/** returns the variable name for the given index */
SCIP_EXPORT
const char* SCIPcorGetVarName(
SCIP_READER* reader, /**< the file reader itself */
int i /**< the index of the variable that is requested */
);
/** returns the constraint name for the given index */
SCIP_EXPORT
const char* SCIPcorGetConsName(
SCIP_READER* reader, /**< the file reader itself */
int i /**< the index of the constraint that is requested */
);
/** @} */
#ifdef __cplusplus
}
#endif
#endif
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* This file is part of the program and library */
/* SCIP --- Solving Constraint Integer Programs */
/* */
/* Copyright (C) 2002-2020 Konrad-Zuse-Zentrum */
/* fuer Informationstechnik Berlin */
/* */
/* SCIP is distributed under the terms of the ZIB Academic License. */
/* */
/* You should have received a copy of the ZIB Academic License */
/* along with SCIP; see the file COPYING. If not visit scipopt.org. */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/**@file reader_dec.h
* @ingroup FILEREADERS
* @brief file reader for decompositions in the constraint based dec-file format.
* @author Gregor Hendel
*
*
* This reader allows to read a file containing decompositions for constraints of the current original problem. The
* standard line ending for this format is '.dec'. The content of the file should obey the following format
*
* \\ place for comments and statistics
* NBLOCKS
* 2
* BLOCK 0
* consA
* consB
* [...]
* BLOCK 1
* consC
* consD
* [...]
* MASTERCONSS
* linkingcons
*
* A block in a problem decomposition is a set of constraints that are independent from all other blocks after removing
* the special blocks of linking constraints denoted as MASTERCONSS.
*
* Imagine the following example, which involves seven variables
* and the five constraints from the file above. The asterisks (*) indicate that the variable affects the feasibility
* of the constraint. In the special case of a linear optimization problem, the asterisks correspond to the
* nonzero entries of the constraint matrix.
*
* x1 x2 x3 x4 x5 x6 x7
* consA * * \ BLOCK 0
* consB * * /
* consC * * \ BLOCK 1
* consD * * /
* linkingconss * * * * * * * > MASTERCONSS
*
* The nonzero pattern has been chosen in a way that after the removal of the last constraint 'linkingcons', the remaining problem
* consists of two independent parts, namely the blocks '0' and '1'.
*
* The corresponding variable labels are inferred from the constraint labels. A variable is assigned the label
*
* - of its unique block, if it only occurs in exactly 1 named block, and probably in MASTERCONSS.
* - the special label of a linking variable if it occurs only in the master constraints or in 2 or even more named blocks.
*
* @note A trivial decomposition is to assign all constraints of a problem to the MASTERCONSS.
*
* @note The number of blocks is the number of named blocks: a trivial decomposition should have 0 blocks
*/
/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
#ifndef __SCIP_READER_DEC_H__
#define __SCIP_READER_DEC_H__
#include "scip/def.h"
#include "scip/type_retcode.h"
#include "scip/type_scip.h"
#ifdef __cplusplus
extern "C" {
#endif
/** includes the decomposition file reader into SCIP
*
* @ingroup FileReaderIncludes
*/
SCIP_EXPORT
SCIP_RETCODE SCIPincludeReaderDec(
SCIP* scip /**< SCIP data structure */
);
#ifdef __cplusplus
}
#endif
#endif
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* This file is part of the program and library */
/* SCIP --- Solving Constraint Integer Programs */
/* */
/* Copyright (C) 2002-2020 Konrad-Zuse-Zentrum */
/* fuer Informationstechnik Berlin */
/* */
/* SCIP is distributed under the terms of the ZIB Academic License. */
/* */
/* You should have received a copy of the ZIB Academic License */
/* along with SCIP; see the file COPYING. If not visit scipopt.org. */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/**@file reader_diff.h
* @ingroup FILEREADERS
* @brief diff file reader
* @author Jakob Witzig
*
* This reader allows to parse a new objective function in the style of CPLEX .lp files.
*
* The lp format is defined within the CPLEX documentation.
*
* An example of a *.diff file looks like this:
*
* Minimize
* obj: - STM6 + STM7
*
* Here is the objective sense set to minimize the function -STM6 + STM7.
*/
/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
#ifndef __SCIP_READER_DIFF_H__
#define __SCIP_READER_DIFF_H__
#include "scip/def.h"
#include "scip/type_cons.h"
#include "scip/type_prob.h"
#include "scip/type_reader.h"
#include "scip/type_result.h"
#include "scip/type_retcode.h"
#include "scip/type_scip.h"
#include "scip/type_var.h"
#ifdef __cplusplus
extern "C" {
#endif
/** includes the diff file reader into SCIP
*
* @ingroup FileReaderIncludes
*/
SCIP_EXPORT
SCIP_RETCODE SCIPincludeReaderDiff(
SCIP* scip /**< SCIP data structure */
);
/**@addtogroup FILEREADERS
*
* @{
*/
/** reads problem from file */
SCIP_EXPORT
SCIP_RETCODE SCIPreadDiff(
SCIP* scip, /**< SCIP data structure */
SCIP_READER* reader, /**< the file reader itself */
const char* filename, /**< full path and name of file to read, or NULL if stdin should be used */
SCIP_RESULT* result /**< pointer to store the result of the file reading call */
);
/** writes problem to file */
SCIP_EXPORT
SCIP_RETCODE SCIPwriteDiff(
SCIP* scip, /**< SCIP data structure */
FILE* file, /**< output file, or NULL if standard output should be used */
const char* name, /**< problem name */
SCIP_Bool transformed, /**< TRUE iff problem is the transformed problem */
SCIP_OBJSENSE objsense, /**< objective sense */
SCIP_Real objscale, /**< scalar applied to objective function; external objective value is
* extobj = objsense * objscale * (intobj + objoffset) */
SCIP_Real objoffset, /**< objective offset from bound shifting and fixing */
SCIP_VAR** vars, /**< array with active variables ordered binary, integer, implicit, continuous */
int nvars, /**< number of mutable variables in the problem */
int nbinvars, /**< number of binary variables */
int nintvars, /**< number of general integer variables */
int nimplvars, /**< number of implicit integer variables */
int ncontvars, /**< number of continuous variables */
SCIP_CONS** conss, /**< array with constraints of the problem */
int nconss, /**< number of constraints in the problem */
SCIP_RESULT* result /**< pointer to store the result of the file writing call */
);
/** @} */
#ifdef __cplusplus
}
#endif
#endif
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* This file is part of the program and library */
/* SCIP --- Solving Constraint Integer Programs */
/* */
/* Copyright (C) 2002-2020 Konrad-Zuse-Zentrum */
/* fuer Informationstechnik Berlin */
/* */
/* SCIP is distributed under the terms of the ZIB Academic License. */
/* */
/* You should have received a copy of the ZIB Academic License */
/* along with SCIP; see the file COPYING. If not visit scipopt.org. */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/**@file reader_fix.h
* @ingroup FILEREADERS
* @brief file reader for variable fixings
* @author Tobias Achterberg
*
* This reader allows to read a file containing fixation values for variables of the current problem. Each line of the
* file should have format
*
* \<variable name\> \<value to fix\>
*
* Note that only a subset of the variables may need to appear in the file. Lines with unknown variable names are
* ignored. The writing functionality is currently not supported.
*
* @note The format is equal to the (not xml) solution format of SCIP.
*
*/
/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
#ifndef __SCIP_READER_FIX_H__
#define __SCIP_READER_FIX_H__
#include "scip/def.h"
#include "scip/type_retcode.h"
#include "scip/type_scip.h"
#ifdef __cplusplus
extern "C" {
#endif
/** includes the fix file reader into SCIP
*
* @ingroup FileReaderIncludes
*/
SCIP_EXPORT
SCIP_RETCODE SCIPincludeReaderFix(
SCIP* scip /**< SCIP data structure */
);
#ifdef __cplusplus
}
#endif
#endif
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* This file is part of the program and library */
/* SCIP --- Solving Constraint Integer Programs */
/* */
/* Copyright (C) 2002-2020 Konrad-Zuse-Zentrum */
/* fuer Informationstechnik Berlin */
/* */
/* SCIP is distributed under the terms of the ZIB Academic License. */
/* */
/* You should have received a copy of the ZIB Academic License */
/* along with SCIP; see the file COPYING. If not visit scipopt.org. */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/**@file reader_fzn.h
* @ingroup FILEREADERS
* @brief FlatZinc file reader
* @author Timo Berthold
* @author Stefan Heinz
*
* FlatZinc is a low-level solver input language that is the target language for MiniZinc. It is designed to be easy to
* translate into the form required by a solver. For more details see http://www.g12.cs.mu.oz.au/minizinc/ .
*/
/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
#ifndef __READER_FZN_H__
#define __READER_FZN_H__
#include "scip/def.h"
#include "scip/type_retcode.h"
#include "scip/type_scip.h"
#include "scip/type_sol.h"
#ifdef __cplusplus
extern "C" {
#endif
/** includes the FlatZinc file reader into SCIP
*
* @ingroup FileReaderIncludes
*/
SCIP_EXPORT
SCIP_RETCODE SCIPincludeReaderFzn(
SCIP* scip /**< SCIP data structure */
);
/**@addtogroup FILEREADERS
*
* @{
*/
/** print given solution in Flatzinc format w.r.t. the output annotation */
SCIP_EXPORT
SCIP_RETCODE SCIPprintSolReaderFzn(
SCIP* scip, /**< SCIP data structure */
SCIP_SOL* sol, /**< primal solution, or NULL for current LP/pseudo solution */
FILE* file /**< output file (or NULL for standard output) */
);
/** @} */
#ifdef __cplusplus
}
#endif
#endif
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* This file is part of the program and library */
/* SCIP --- Solving Constraint Integer Programs */
/* */
/* Copyright (C) 2002-2020 Konrad-Zuse-Zentrum */
/* fuer Informationstechnik Berlin */
/* */
/* SCIP is distributed under the terms of the ZIB Academic License. */
/* */
/* You should have received a copy of the ZIB Academic License */
/* along with SCIP; see the file COPYING. If not visit scipopt.org. */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/**@file reader_gms.h
* @ingroup FILEREADERS
* @brief GAMS file reader and writer
* @author Ambros Gleixner
*
* This reader writes a CIP in GAMS format.
* It can write all kinds of linear and nonlinear constraints (as occurring in MINLPs) and indicator constraints.
*
* If SCIP has been compiled with GAMS=true, it can also read GAMS model instances.
* This requires a working GAMS system.
*/
/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
#ifndef __SCIP_READER_GMS_H__
#define __SCIP_READER_GMS_H__
#include "scip/def.h"
#include "scip/type_cons.h"
#include "scip/type_prob.h"
#include "scip/type_result.h"
#include "scip/type_retcode.h"
#include "scip/type_scip.h"
#include "scip/type_var.h"
#ifdef __cplusplus
extern "C" {
#endif
/** includes the gms file reader into SCIP
*
* @ingroup FileReaderIncludes
*/
SCIP_EXPORT
SCIP_RETCODE SCIPincludeReaderGms(
SCIP* scip /**< SCIP data structure */
);
/**@addtogroup FILEREADERS
*
* @{
*/
/** writes problem to file */
SCIP_EXPORT
SCIP_RETCODE SCIPwriteGms(
SCIP* scip, /**< SCIP data structure */
FILE* file, /**< output file, or NULL if standard output should be used */
const char* name, /**< problem name */
SCIP_Bool transformed, /**< TRUE iff problem is the transformed problem */
SCIP_OBJSENSE objsense, /**< objective sense */
SCIP_Real objscale, /**< scalar applied to objective function; external objective value is
* extobj = objsense * objscale * (intobj + objoffset) */
SCIP_Real objoffset, /**< objective offset from bound shifting and fixing */
SCIP_VAR** vars, /**< array with active variables ordered binary, integer, implicit, continuous */
int nvars, /**< number of active variables in the problem */
int nbinvars, /**< number of binary variables */
int nintvars, /**< number of general integer variables */
int nimplvars, /**< number of implicit integer variables */
int ncontvars, /**< number of continuous variables */
SCIP_CONS** conss, /**< array with constraints of the problem */
int nconss, /**< number of constraints in the problem */
SCIP_RESULT* result /**< pointer to store the result of the file writing call */
);
/** @} */
#ifdef __cplusplus
}
#endif
#endif
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* This file is part of the program and library */
/* SCIP --- Solving Constraint Integer Programs */
/* */
/* Copyright (C) 2002-2020 Konrad-Zuse-Zentrum */
/* fuer Informationstechnik Berlin */
/* */
/* SCIP is distributed under the terms of the ZIB Academic License. */
/* */
/* You should have received a copy of the ZIB Academic License */
/* along with SCIP; see the file COPYING. If not visit scipopt.org. */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/**@file reader_lp.h
* @ingroup FILEREADERS
* @brief LP file reader
* @author Tobias Achterberg
*
* This reader allows to parse and write CPLEX .lp files with linear and quadratic constraints and objective,
* special ordered sets of type 1 and 2, indicators on linear constraints, and semicontinuous variables.
* For writing, linear (general and specialized), indicator, quadratic, second order cone, and
* special ordered set constraints are supported.
*
* The lp format is defined within the CPLEX documentation.
*/
/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
#ifndef __SCIP_READER_LP_H__
#define __SCIP_READER_LP_H__
#include "scip/def.h"
#include "scip/type_cons.h"
#include "scip/type_prob.h"
#include "scip/type_reader.h"
#include "scip/type_result.h"
#include "scip/type_retcode.h"
#include "scip/type_scip.h"
#include "scip/type_var.h"
#ifdef __cplusplus
extern "C" {
#endif
/** includes the lp file reader into SCIP
*
* @ingroup FileReaderIncludes
*/
SCIP_EXPORT
SCIP_RETCODE SCIPincludeReaderLp(
SCIP* scip /**< SCIP data structure */
);
/**@addtogroup FILEREADERS
*
* @{
*/
/** reads problem from file */
SCIP_EXPORT
SCIP_RETCODE SCIPreadLp(
SCIP* scip, /**< SCIP data structure */
SCIP_READER* reader, /**< the file reader itself */
const char* filename, /**< full path and name of file to read, or NULL if stdin should be used */
SCIP_RESULT* result /**< pointer to store the result of the file reading call */
);
/** writes problem to file */
SCIP_EXPORT
SCIP_RETCODE SCIPwriteLp(
SCIP* scip, /**< SCIP data structure */
FILE* file, /**< output file, or NULL if standard output should be used */
const char* name, /**< problem name */
SCIP_Bool transformed, /**< TRUE iff problem is the transformed problem */
SCIP_OBJSENSE objsense, /**< objective sense */
SCIP_Real objscale, /**< scalar applied to objective function; external objective value is
* extobj = objsense * objscale * (intobj + objoffset) */
SCIP_Real objoffset, /**< objective offset from bound shifting and fixing */
SCIP_VAR** vars, /**< array with active variables ordered binary, integer, implicit, continuous */
int nvars, /**< number of active variables in the problem */
int nbinvars, /**< number of binary variables */
int nintvars, /**< number of general integer variables */
int nimplvars, /**< number of implicit integer variables */
int ncontvars, /**< number of continuous variables */
SCIP_CONS** conss, /**< array with constraints of the problem */
int nconss, /**< number of constraints in the problem */
SCIP_RESULT* result /**< pointer to store the result of the file writing call */
);
/** @} */
#ifdef __cplusplus
}
#endif
#endif
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* This file is part of the program and library */
/* SCIP --- Solving Constraint Integer Programs */
/* */
/* Copyright (C) 2002-2020 Konrad-Zuse-Zentrum */
/* fuer Informationstechnik Berlin */
/* */
/* SCIP is distributed under the terms of the ZIB Academic License. */
/* */
/* You should have received a copy of the ZIB Academic License */
/* along with SCIP; see the file COPYING. If not visit scipopt.org. */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/**@file reader_mps.h
* @ingroup FILEREADERS
* @brief (extended) MPS file reader
* @author Thorsten Koch
* @author Tobias Achterberg
*
* This reader allows to parse and write MPS files with linear and quadratic constraints and objective,
* special ordered sets of type 1 and 2, indicators on linear constraints, and semicontinuous variables.
* For writing, linear (general and specialized), indicator, quadratic, second order cone, and
* special ordered set constraints are supported.
*
* See http://en.wikipedia.org/wiki/MPS_%28format%29 for a description.
*/
/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
#ifndef __SCIP_READER_MPS_H__
#define __SCIP_READER_MPS_H__
#include "scip/def.h"
#include "scip/type_cons.h"
#include "scip/type_prob.h"
#include "scip/type_reader.h"
#include "scip/type_result.h"
#include "scip/type_retcode.h"
#include "scip/type_scip.h"
#include "scip/type_var.h"
#ifdef __cplusplus
extern "C" {
#endif
/** includes the mps file reader into SCIP
*
* @ingroup FileReaderIncludes
*/
SCIP_EXPORT
SCIP_RETCODE SCIPincludeReaderMps(
SCIP* scip /**< SCIP data structure */
);
/**@addtogroup FILEREADERS
*
* @{
*/
/** reads problem from file */
SCIP_EXPORT
SCIP_RETCODE SCIPreadMps(
SCIP* scip, /**< SCIP data structure */
SCIP_READER* reader, /**< the file reader itself */
const char* filename, /**< full path and name of file to read, or NULL if stdin should be used */
SCIP_RESULT* result, /**< pointer to store the result of the file reading call */
const char*** varnames, /**< storage for the variable names, or NULL */
const char*** consnames, /**< storage for the constraint names, or NULL */
int* varnamessize, /**< the size of the variable names storage, or NULL */
int* consnamessize, /**< the size of the constraint names storage, or NULL */
int* nvarnames, /**< the number of stored variable names, or NULL */
int* nconsnames /**< the number of stored constraint names, or NULL */
);
/** writes problem to file */
SCIP_EXPORT
SCIP_RETCODE SCIPwriteMps(
SCIP* scip, /**< SCIP data structure */
SCIP_READER* reader, /**< the file reader itself */
FILE* file, /**< output file, or NULL if standard output should be used */
const char* name, /**< problem name */
SCIP_Bool transformed, /**< TRUE iff problem is the transformed problem */
SCIP_OBJSENSE objsense, /**< objective sense */
SCIP_Real objscale, /**< scalar applied to objective function; external objective value is
* extobj = objsense * objscale * (intobj + objoffset) */
SCIP_Real objoffset, /**< objective offset from bound shifting and fixing */
SCIP_VAR** vars, /**< array with active variables ordered binary, integer, implicit, continuous */
int nvars, /**< number of active variables in the problem */
int nbinvars, /**< number of binary variables */
int nintvars, /**< number of general integer variables */
int nimplvars, /**< number of implicit integer variables */
int ncontvars, /**< number of continuous variables */
SCIP_VAR** fixedvars, /**< array with fixed and aggregated variables */
int nfixedvars, /**< number of fixed and aggregated variables in the problem */
SCIP_CONS** conss, /**< array with constraints of the problem */
int nconss, /**< number of constraints in the problem */
SCIP_RESULT* result /**< pointer to store the result of the file writing call */
);
/** @} */
#ifdef __cplusplus
}
#endif
#endif
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* This file is part of the program and library */
/* SCIP --- Solving Constraint Integer Programs */
/* */
/* Copyright (C) 2002-2020 Konrad-Zuse-Zentrum */
/* fuer Informationstechnik Berlin */
/* */
/* SCIP is distributed under the terms of the ZIB Academic License. */
/* */
/* You should have received a copy of the ZIB Academic License */
/* along with SCIP; see the file COPYING. If not visit scipopt.org. */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/**@file reader_mst.h
* @ingroup FILEREADERS
* @brief file reader for partial primal solutions
* @author Jakob Witzig
*
* This reader handles solutions in two formats:
*
* - <b>SCIP raw format</b>@n
* The format is as follows:@n@n
* line 1: "solution status: <status>"@n
* line 2: "objective value: <value>"@n
* line 3+i: \<variable name\> \<value\> (obj: \<objective coefficient of variable\>)
* @n@n
* Only known values need to be listed.
* @par
* Example:
* @code
* solution status: optimal
* objective value: 1
* x1 1 (obj:1)
* x2 1 (obj:0)
* @endcode
* - <b>XML format</b>@n
* This format is used by CPLEX, for example. For reading we require a section of @p
* \<variables\>. Each entry in this section consists of@n
* \<variable name="<name>" index="<number>" value="<value>"/>
* @par
* Example:
* @code
* <?xml version = "1.0" standalone="yes"?>
* <variables>
* <variable name="x1" index="1" value="1"/>
* <variable name="x2" index="2" value="1"/>
* </variables>
* </xml>
* @endcode
*/
/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
#ifndef __SCIP_READER_MST_H__
#define __SCIP_READER_MST_H__
#include "scip/def.h"
#include "scip/type_retcode.h"
#include "scip/type_scip.h"
#ifdef __cplusplus
extern "C" {
#endif
/** includes the mst file reader into SCIP
*
* @ingroup FileReaderIncludes
*/
SCIP_EXPORT
SCIP_RETCODE SCIPincludeReaderMst(
SCIP* scip /**< SCIP data structure */
);
#ifdef __cplusplus
}
#endif
#endif
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* This file is part of the program and library */
/* SCIP --- Solving Constraint Integer Programs */
/* */
/* Copyright (C) 2002-2020 Konrad-Zuse-Zentrum */
/* fuer Informationstechnik Berlin */
/* */
/* SCIP is distributed under the terms of the ZIB Academic License. */
/* */
/* You should have received a copy of the ZIB Academic License */
/* along with SCIP; see the file COPYING. If not visit scipopt.org. */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/**@file reader_opb.h
* @ingroup FILEREADERS
* @brief pseudo-Boolean file reader (opb format)
* @author Stefan Heinz
* @author Michael Winkler
*
* This file reader parses the @a opb format and is also used by the @a wbo reader for the @a wbo format. For a
* detailed description of this format see http://www.cril.univ-artois.fr/PB10/format.pdf .
*/
/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
#ifndef __SCIP_READER_OPB_H__
#define __SCIP_READER_OPB_H__
#include "scip/def.h"
#include "scip/type_cons.h"
#include "scip/type_prob.h"
#include "scip/type_reader.h"
#include "scip/type_result.h"
#include "scip/type_retcode.h"
#include "scip/type_scip.h"
#include "scip/type_var.h"
#ifdef __cplusplus
extern "C" {
#endif
/** includes the opb file reader into SCIP
*
* @ingroup FileReaderIncludes
*/
SCIP_EXPORT
SCIP_RETCODE SCIPincludeReaderOpb(
SCIP* scip /**< SCIP data structure */
);
/**@addtogroup FILEREADERS
*
* @{
*/
/** reads problem from file */
SCIP_EXPORT
SCIP_RETCODE SCIPreadOpb(
SCIP* scip, /**< SCIP data structure */
SCIP_READER* reader, /**< the file reader itself */
const char* filename, /**< full path and name of file to read, or NULL if stdin should be used */
SCIP_RESULT* result /**< pointer to store the result of the file reading call */
);
/** writes problem to file */
SCIP_EXPORT
SCIP_RETCODE SCIPwriteOpb(
SCIP* scip, /**< SCIP data structure */
FILE* file, /**< output file, or NULL if standard output should be used */
const char* name, /**< problem name */
SCIP_Bool transformed, /**< TRUE iff problem is the transformed problem */
SCIP_OBJSENSE objsense, /**< objective sense */
SCIP_Real objscale, /**< scalar applied to objective function; external objective value is
extobj = objsense * objscale * (intobj + objoffset) */
SCIP_Real objoffset, /**< objective offset from bound shifting and fixing */
SCIP_VAR** vars, /**< array with active variables ordered binary, integer, implicit, continuous */
int nvars, /**< number of active variables in the problem */
int nbinvars, /**< number of binary variables */
int nintvars, /**< number of general integer variables */
int nimplvars, /**< number of implicit integer variables */
int ncontvars, /**< number of continuous variables */
SCIP_VAR** fixedvars, /**< array with fixed variables */
int nfixedvars, /**< number of fixed and aggregated variables in the problem */
SCIP_CONS** conss, /**< array with constraints of the problem */
int nconss, /**< number of constraints in the problem */
SCIP_Bool genericnames, /**< should generic variable and constraint names be used */
SCIP_RESULT* result /**< pointer to store the result of the file writing call */
);
/** @} */
#ifdef __cplusplus
}
#endif
#endif
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* This file is part of the program and library */
/* SCIP --- Solving Constraint Integer Programs */
/* */
/* Copyright (C) 2002-2020 Konrad-Zuse-Zentrum */
/* fuer Informationstechnik Berlin */
/* */
/* SCIP is distributed under the terms of the ZIB Academic License. */
/* */
/* You should have received a copy of the ZIB Academic License */
/* along with SCIP; see the file COPYING. If not visit scipopt.org. */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/**@file reader_osil.h
* @ingroup FILEREADERS
* @brief OS instance language (OSiL) format file reader
* @author Stefan Vigerske
*
* This reader allows to parse OSiL files with linear and nonlinear constraints and objective.
* Writing is not implemented yet.
*
* The OSiL format is an XML based format to represent a broad class of mathematical programming instances, see http://www.coin-or.org/OS/OSiL.html .
*/
/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
#ifndef __SCIP_READER_OSIL_H__
#define __SCIP_READER_OSIL_H__
#include "scip/def.h"
#include "scip/type_retcode.h"
#include "scip/type_scip.h"
#ifdef __cplusplus
extern "C" {
#endif
/** includes the osil file reader into SCIP
*
* @ingroup FileReaderIncludes
*/
SCIP_EXPORT
SCIP_RETCODE SCIPincludeReaderOsil(
SCIP* scip /**< SCIP data structure */
);
#ifdef __cplusplus
}
#endif
#endif
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* This file is part of the program and library */
/* SCIP --- Solving Constraint Integer Programs */
/* */
/* Copyright (C) 2002-2020 Konrad-Zuse-Zentrum */
/* fuer Informationstechnik Berlin */
/* */
/* SCIP is distributed under the terms of the ZIB Academic License. */
/* */
/* You should have received a copy of the ZIB Academic License */
/* along with SCIP; see the file COPYING. If not visit scipopt.org. */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/**@file reader_pbm.h
* @ingroup FILEREADERS
* @brief file writer for portable bitmap file format (PBM), open with common graphic viewer programs (e.g. xview)
* @author Alexandra Kraft
*/
/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
#ifndef __SCIP_READER_PBM_H__
#define __SCIP_READER_PBM_H__
#include "scip/def.h"
#include "scip/type_cons.h"
#include "scip/type_reader.h"
#include "scip/type_result.h"
#include "scip/type_retcode.h"
#include "scip/type_scip.h"
#ifdef __cplusplus
extern "C" {
#endif
/** includes the pbm file reader into SCIP
*
* @ingroup FileReaderIncludes
*/
SCIP_EXPORT
SCIP_RETCODE SCIPincludeReaderPbm(
SCIP* scip /**< SCIP data structure */
);
/**@addtogroup FILEREADERS
*
* @{
*/
/* writes picture of matrix structure to file */
SCIP_EXPORT
SCIP_RETCODE SCIPwritePbm(
SCIP* scip, /**< SCIP data structure */
FILE* file, /**< output file, or NULL if standard output should be used */
const char* name, /**< problem name */
SCIP_READERDATA* readerdata, /**< information for reader */
SCIP_Bool transformed, /**< TRUE iff problem is the transformed problem */
int nvars, /**< number of active variables in the problem */
SCIP_CONS** conss, /**< array with constraints of the problem */
int nconss, /**< number of constraints in the problem */
SCIP_RESULT* result /**< pointer to store the result of the file writing call */
);
/** @} */
#ifdef __cplusplus
}
#endif
#endif
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* This file is part of the program and library */
/* SCIP --- Solving Constraint Integer Programs */
/* */
/* Copyright (C) 2002-2020 Konrad-Zuse-Zentrum */
/* fuer Informationstechnik Berlin */
/* */
/* SCIP is distributed under the terms of the ZIB Academic License. */
/* */
/* You should have received a copy of the ZIB Academic License */
/* along with SCIP; see the file COPYING. If not visit scipopt.org. */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/**@file reader_pip.h
* @ingroup FILEREADERS
* @brief file reader for polynomial mixed-integer programs in PIP format
* @author Stefan Vigerske
*
* This reader allows to parse and write PIP files with linear and polynomial constraints and objective.
* For writing, linear (general and specialized), quadratic, and "and" constraints are supported.
* Also abspower, bivariate, and nonlinear constraints may be written, if they are representable as polynomials.
*
* The PIP format is similar to the LP format and defined at http://polip.zib.de/pipformat.php .
*/
/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
#ifndef __SCIP_READER_PIP_H__
#define __SCIP_READER_PIP_H__
#include "scip/def.h"
#include "scip/type_cons.h"
#include "scip/type_prob.h"
#include "scip/type_reader.h"
#include "scip/type_result.h"
#include "scip/type_retcode.h"
#include "scip/type_scip.h"
#include "scip/type_var.h"
#ifdef __cplusplus
extern "C" {
#endif
/** includes the pip file reader into SCIP
*
* @ingroup FileReaderIncludes
*/
SCIP_EXPORT
SCIP_RETCODE SCIPincludeReaderPip(
SCIP* scip /**< SCIP data structure */
);
/**@addtogroup FILEREADERS
*
* @{
*/
/** reads problem from file */
SCIP_EXPORT
SCIP_RETCODE SCIPreadPip(
SCIP* scip, /**< SCIP data structure */
SCIP_READER* reader, /**< the file reader itself */
const char* filename, /**< full path and name of file to read, or NULL if stdin should be used */
SCIP_RESULT* result /**< pointer to store the result of the file reading call */
);
/** writes problem to file */
SCIP_EXPORT
SCIP_RETCODE SCIPwritePip(
SCIP* scip, /**< SCIP data structure */
FILE* file, /**< output file, or NULL if standard output should be used */
const char* name, /**< problem name */
SCIP_Bool transformed, /**< TRUE iff problem is the transformed problem */
SCIP_OBJSENSE objsense, /**< objective sense */
SCIP_Real objscale, /**< scalar applied to objective function; external objective value is
* extobj = objsense * objscale * (intobj + objoffset) */
SCIP_Real objoffset, /**< objective offset from bound shifting and fixing */
SCIP_VAR** vars, /**< array with active variables ordered binary, integer, implicit, continuous */
int nvars, /**< number of active variables in the problem */
int nbinvars, /**< number of binary variables */
int nintvars, /**< number of general integer variables */
int nimplvars, /**< number of implicit integer variables */
int ncontvars, /**< number of continuous variables */
SCIP_CONS** conss, /**< array with constraints of the problem */
int nconss, /**< number of constraints in the problem */
SCIP_RESULT* result /**< pointer to store the result of the file writing call */
);
/** @} */
#ifdef __cplusplus
}
#endif
#endif
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* This file is part of the program and library */
/* SCIP --- Solving Constraint Integer Programs */
/* */
/* Copyright (C) 2002-2020 Konrad-Zuse-Zentrum */
/* fuer Informationstechnik Berlin */
/* */
/* SCIP is distributed under the terms of the ZIB Academic License. */
/* */
/* You should have received a copy of the ZIB Academic License */
/* along with SCIP; see the file COPYING. If not visit scipopt.org. */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/**@file reader_ppm.h
* @ingroup FILEREADERS
* @brief file writer for portable pixmap file format (PPM), open with common graphic viewer programs (e.g. xview)
* @author Tobias Achterberg
* @author Michael Winkler
*/
/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
#ifndef __SCIP_READER_PPM_H__
#define __SCIP_READER_PPM_H__
#include "scip/def.h"
#include "scip/type_cons.h"
#include "scip/type_reader.h"
#include "scip/type_result.h"
#include "scip/type_retcode.h"
#include "scip/type_scip.h"
#include "scip/type_var.h"
#ifdef __cplusplus
extern "C" {
#endif
/** includes the ppm file reader into SCIP
*
* @ingroup FileReaderIncludes
*/
SCIP_EXPORT
SCIP_RETCODE SCIPincludeReaderPpm(
SCIP* scip /**< SCIP data structure */
);
/**@addtogroup FILEREADERS
*
* @{
*/
/** writes problem to file */
SCIP_EXPORT
SCIP_RETCODE SCIPwritePpm(
SCIP* scip, /**< SCIP data structure */
FILE* file, /**< output file, or NULL if standard output should be used */
const char* name, /**< problem name */
SCIP_READERDATA* readerdata, /**< information for reader */
SCIP_Bool transformed, /**< TRUE iff problem is the transformed problem */
SCIP_VAR** vars, /**< array with active variables ordered binary, integer, implicit, continuous */
int nvars, /**< number of active variables in the problem */
SCIP_CONS** conss, /**< array with constraints of the problem */
int nconss, /**< number of constraints in the problem */
SCIP_RESULT* result /**< pointer to store the result of the file writing call */
);
/** @} */
#ifdef __cplusplus
}
#endif
#endif