1 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 2 /* */ 3 /* This file is part of the program and library */ 4 /* SCIP --- Solving Constraint Integer Programs */ 5 /* */ 6 /* Copyright (c) 2002-2023 Zuse Institute Berlin (ZIB) */ 7 /* */ 8 /* Licensed under the Apache License, Version 2.0 (the "License"); */ 9 /* you may not use this file except in compliance with the License. */ 10 /* You may obtain a copy of the License at */ 11 /* */ 12 /* http://www.apache.org/licenses/LICENSE-2.0 */ 13 /* */ 14 /* Unless required by applicable law or agreed to in writing, software */ 15 /* distributed under the License is distributed on an "AS IS" BASIS, */ 16 /* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ 17 /* See the License for the specific language governing permissions and */ 18 /* limitations under the License. */ 19 /* */ 20 /* You should have received a copy of the Apache-2.0 license */ 21 /* along with SCIP; see the file LICENSE. If not visit scipopt.org. */ 22 /* */ 23 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 24 25 /**@file reader_opb.h 26 * @ingroup FILEREADERS 27 * @brief pseudo-Boolean file reader (opb format) 28 * @author Stefan Heinz 29 * @author Michael Winkler 30 * 31 * This file reader parses the @a opb format and is also used by the @a wbo reader for the @a wbo format. For a 32 * detailed description of this format see http://www.cril.univ-artois.fr/PB10/format.pdf . 33 */ 34 35 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/ 36 37 #ifndef __SCIP_READER_OPB_H__ 38 #define __SCIP_READER_OPB_H__ 39 40 #include "scip/def.h" 41 #include "scip/type_cons.h" 42 #include "scip/type_prob.h" 43 #include "scip/type_reader.h" 44 #include "scip/type_result.h" 45 #include "scip/type_retcode.h" 46 #include "scip/type_scip.h" 47 #include "scip/type_var.h" 48 49 #ifdef __cplusplus 50 extern "C" { 51 #endif 52 53 /** includes the opb file reader into SCIP 54 * 55 * @ingroup FileReaderIncludes 56 */ 57 SCIP_EXPORT 58 SCIP_RETCODE SCIPincludeReaderOpb( 59 SCIP* scip /**< SCIP data structure */ 60 ); 61 62 /**@addtogroup FILEREADERS 63 * 64 * @{ 65 */ 66 67 /** reads problem from file */ 68 SCIP_EXPORT 69 SCIP_RETCODE SCIPreadOpb( 70 SCIP* scip, /**< SCIP data structure */ 71 SCIP_READER* reader, /**< the file reader itself */ 72 const char* filename, /**< full path and name of file to read, or NULL if stdin should be used */ 73 SCIP_RESULT* result /**< pointer to store the result of the file reading call */ 74 ); 75 76 /** writes problem to file */ 77 SCIP_EXPORT 78 SCIP_RETCODE SCIPwriteOpb( 79 SCIP* scip, /**< SCIP data structure */ 80 FILE* file, /**< output file, or NULL if standard output should be used */ 81 const char* name, /**< problem name */ 82 SCIP_Bool transformed, /**< TRUE iff problem is the transformed problem */ 83 SCIP_OBJSENSE objsense, /**< objective sense */ 84 SCIP_Real objscale, /**< scalar applied to objective function; external objective value is 85 extobj = objsense * objscale * (intobj + objoffset) */ 86 SCIP_Real objoffset, /**< objective offset from bound shifting and fixing */ 87 SCIP_VAR** vars, /**< array with active variables ordered binary, integer, implicit, continuous */ 88 int nvars, /**< number of active variables in the problem */ 89 int nbinvars, /**< number of binary variables */ 90 int nintvars, /**< number of general integer variables */ 91 int nimplvars, /**< number of implicit integer variables */ 92 int ncontvars, /**< number of continuous variables */ 93 SCIP_VAR** fixedvars, /**< array with fixed variables */ 94 int nfixedvars, /**< number of fixed and aggregated variables in the problem */ 95 SCIP_CONS** conss, /**< array with constraints of the problem */ 96 int nconss, /**< number of constraints in the problem */ 97 SCIP_Bool genericnames, /**< should generic variable and constraint names be used */ 98 SCIP_RESULT* result /**< pointer to store the result of the file writing call */ 99 ); 100 101 /** @} */ 102 103 #ifdef __cplusplus 104 } 105 #endif 106 107 #endif 108