SCIP Doxygen Documentation
Loading...
Searching...
No Matches
reader_nl.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-2026 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_nl.h
26 * @ingroup FILEREADERS
27 * @brief AMPL .nl file reader and writer
28 * @author Stefan Vigerske
29 *
30 * \par Reading Functionality
31 *
32 * The reader supports linear, nonlinear, and logic constraints, with the following limitations:
33 * - For nonlinear expressions, only unary operators minus (negation), abs, pow2, sqrt, log, log10, exp, sin, cos,
34 * binary operators add, sub, mul, div, pow, and n-ary operator sum are supported.
35 * - For logical constraints, only operators not, or, and, iff, eq, and ne are supported and all arguments must
36 * be either boolean values or binary variables! The reader currently does not support logical operations that
37 * use algebraic or linear expressions, and therefore not the creation of indicator constraints.
38 *
39 * In addition, the reader creates special ordered set (SOS) constraints of type 1 and 2 if they were specified via
40 * [`sosnr` suffixes](https://discuss.ampl.com/t/how-can-i-use-the-solver-s-special-ordered-sets-feature/45).
41 * Values specified via `ref` suffix are passed on as weights to the SOS constraint handlers.
42 * For SOS of type 2, the weights determine the order of variables in the SOS.
43 *
44 * Next to SOS, suffixes can be used to specify flags of variables (see \ref SCIPcreateVar()) and constraints
45 * (see \ref SCIPcreateCons()). For variables, supported suffixes are `initial` and `removable`. For constraints,
46 * supported suffixes are `initial`, `separate`, `enforce`, `check`, `propagate`, `dynamic`, and `removable`.
47 *
48 * \par Writing Functionality
49 *
50 * The writer currently supports the constraint handlers linear, setppc, logicor, knapsack, varbound, and nonlinear only.
51 * When writing nonlinear constraints, expression handlers entropy and signpower are currently not supported.
52 */
53
54/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
55
56#ifndef __SCIP_READER_NL_H__
57#define __SCIP_READER_NL_H__
58
59#include "scip/scip.h"
60
61#ifdef __cplusplus
62extern "C" {
63#endif
64
65/** includes the .nl file reader into SCIP */
66SCIP_EXPORT
68 SCIP* scip /**< SCIP data structure */
69 );
70
71/** writes AMPL solution file
72 *
73 * problem must have been read with .nl reader
74 */
75SCIP_EXPORT
77 SCIP* scip /**< SCIP data structure */
78 );
79
80#ifdef __cplusplus
81}
82#endif
83
84#endif
SCIP_RETCODE SCIPincludeReaderNl(SCIP *scip)
SCIP_RETCODE SCIPwriteSolutionNl(SCIP *scip)
SCIP callable library.
enum SCIP_Retcode SCIP_RETCODE
struct Scip SCIP
Definition type_scip.h:39