Scippy

SCIP

Solving Constraint Integer Programs

reader_sol.h
Go to the documentation of this file.
1 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2 /* */
3 /* This file is part of the program and library */
4 /* SCIP --- Solving Constraint Integer Programs */
5 /* */
6 /* Copyright (c) 2002-2024 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_sol.h
26  * @ingroup FILEREADERS
27  * @brief file reader for primal solutions
28  * @author Tobias Achterberg
29  * @author Marc Pfetsch
30  *
31  * This reader handles solutions in two formats:
32  *
33  * - <b>SCIP raw format</b>@n
34  * The format is as follows:@n@n
35  * line 1: "solution status: <status>"@n
36  * line 2: "objective value: <value>"@n
37  * line 3+i: <variable name> <value> (obj: <objective coefficient of variable>)
38  * @n@n
39  * Only nonzero values need to be listed.
40  * @par
41  * Example:
42  * @code
43  * solution status: optimal
44  * objective value: 1
45  * x1 1 (obj:1)
46  * x2 1 (obj:0)
47  * @endcode
48  * - <b>XML format</b>@n
49  * This format is used by CPLEX, for example. For reading we require a section of @p
50  * <variables>. Each entry in this section consists of@n
51  * <variable name="<name>" index="<number>" value="<value>"/>
52  * @par
53  * Example:
54  * @code
55  * <?xml version = "1.0" standalone="yes"?>
56  * <variables>
57  * <variable name="x1" index="1" value="1"/>
58  * <variable name="x2" index="2" value="1"/>
59  * </variables>
60  * </xml>
61  * @endcode
62  */
63 
64 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
65 
66 #ifndef __SCIP_READER_SOL_H__
67 #define __SCIP_READER_SOL_H__
68 
69 #include "scip/def.h"
70 #include "scip/type_retcode.h"
71 #include "scip/type_scip.h"
72 
73 #ifdef __cplusplus
74 extern "C" {
75 #endif
76 
77 /** includes the sol file reader into SCIP
78  *
79  * @ingroup FileReaderIncludes
80  */
81 SCIP_EXPORT
83  SCIP* scip /**< SCIP data structure */
84  );
85 
86 #ifdef __cplusplus
87 }
88 #endif
89 
90 #endif
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:63
type definitions for return codes for SCIP methods
type definitions for SCIP&#39;s main datastructure
common defines and data types used in all packages of SCIP
SCIP_RETCODE SCIPincludeReaderSol(SCIP *scip)
Definition: reader_sol.c:222