SCIP Doxygen Documentation
Loading...
Searching...
No Matches
reader_nl.h File Reference

Detailed Description

AMPL .nl file reader and writer.

Author
Stefan Vigerske
Reading Functionality

The reader supports linear, nonlinear, and logic constraints, with the following limitations:

  • For nonlinear expressions, only unary operators minus (negation), abs, pow2, sqrt, log, log10, exp, sin, cos, binary operators add, sub, mul, div, pow, and n-ary operator sum are supported.
  • For logical constraints, only operators not, or, and, iff, eq, and ne are supported and all arguments must be either boolean values or binary variables! The reader currently does not support logical operations that use algebraic or linear expressions, and therefore not the creation of indicator constraints.

In addition, the reader creates special ordered set (SOS) constraints of type 1 and 2 if they were specified via sosnr suffixes. Values specified via ref suffix are passed on as weights to the SOS constraint handlers. For SOS of type 2, the weights determine the order of variables in the SOS.

Next to SOS, suffixes can be used to specify flags of variables (see SCIPcreateVar()) and constraints (see SCIPcreateCons()). For variables, supported suffixes are initial and removable. For constraints, supported suffixes are initial, separate, enforce, check, propagate, dynamic, and removable.

Writing Functionality

The writer currently supports the constraint handlers linear, setppc, logicor, knapsack, varbound, and nonlinear only. When writing nonlinear constraints, expression handlers entropy and signpower are currently not supported.

Definition in file reader_nl.h.

#include "scip/scip.h"

Go to the source code of this file.

Functions

SCIP_RETCODE SCIPincludeReaderNl (SCIP *scip)
SCIP_RETCODE SCIPwriteSolutionNl (SCIP *scip)

Function Documentation

◆ SCIPincludeReaderNl()

SCIP_RETCODE SCIPincludeReaderNl ( SCIP * scip)

includes the .nl file reader into SCIP

includes the AMPL .nl file reader in SCIP

Parameters
scipSCIP data structure

Definition at line 3223 of file reader_nl.cpp.

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

Referenced by SCIP_DECL_READERCOPY(), and SCIPincludeDefaultPlugins().

◆ SCIPwriteSolutionNl()