Scippy

SCIP

Solving Constraint Integer Programs

Detailed Description

AMPL .nl file reader.

Author
Stefan Vigerske

For documentation on ampl::mp, see https://ampl.github.io and https://www.zverovich.net/2014/09/19/reading-nl-files.html. For documentation on .nl files, see https://ampl.com/REFS/hooking2.pdf.

Definition in file reader_nl.cpp.

#include <string>
#include <vector>
#include <map>
#include "scip/reader_nl.h"
#include "scip/cons_linear.h"
#include "scip/cons_nonlinear.h"
#include "scip/cons_sos1.h"
#include "scip/cons_sos2.h"
#include "scip/expr_var.h"
#include "scip/expr_value.h"
#include "scip/expr_sum.h"
#include "scip/expr_product.h"
#include "scip/expr_pow.h"
#include "scip/expr_log.h"
#include "scip/expr_exp.h"
#include "scip/expr_trig.h"
#include "scip/expr_abs.h"
#include "mp/nl-reader.h"

Go to the source code of this file.

Data Structures

class  AMPLProblemHandler
 implementation of AMPL/MPs NLHandler that constructs a SCIP problem while a .nl file is read More...
 
class  AMPLProblemHandler::NumericArgHandler
 
class  AMPLProblemHandler::LinearExprHandler
 
class  AMPLProblemHandler::SuffixHandler< T >
 
class  AMPLProblemHandler::LinearPartHandler
 

Macros

#define READER_NAME   "nlreader"
 
#define READER_DESC   "AMPL .nl file reader"
 
#define READER_EXTENSION   "nl"
 
#define SCIP_CALL_THROW(x)
 

Functions

static SCIP_DECL_PROBDELORIG (probdataDelOrigNl)
 
static SCIP_DECL_READERCOPY (readerCopyNl)
 
static SCIP_DECL_READERREAD (readerReadNl)
 
SCIP_RETCODE SCIPincludeReaderNl (SCIP *scip)
 
SCIP_RETCODE SCIPwriteSolutionNl (SCIP *scip)
 

Macro Definition Documentation

◆ READER_NAME

#define READER_NAME   "nlreader"

Definition at line 66 of file reader_nl.cpp.

Referenced by SCIPincludeReaderNl().

◆ READER_DESC

#define READER_DESC   "AMPL .nl file reader"

Definition at line 67 of file reader_nl.cpp.

Referenced by SCIPincludeReaderNl().

◆ READER_EXTENSION

#define READER_EXTENSION   "nl"

Definition at line 68 of file reader_nl.cpp.

Referenced by SCIPincludeReaderNl().

◆ SCIP_CALL_THROW

Function Documentation

◆ SCIP_DECL_PROBDELORIG()

static SCIP_DECL_PROBDELORIG ( probdataDelOrigNl  )
static

frees user data of original problem (called when the original problem is freed)

Definition at line 1286 of file reader_nl.cpp.

References NULL, SCIP_CALL, SCIP_OKAY, SCIPfreeBlockMemoryArrayNull, SCIPfreeMemory, SCIPreleaseCons(), and SCIPreleaseVar().

◆ SCIP_DECL_READERCOPY()

static SCIP_DECL_READERCOPY ( readerCopyNl  )
static

copy method for reader plugins (called when SCIP copies plugins)

Definition at line 1318 of file reader_nl.cpp.

References NULL, SCIP_CALL, SCIP_OKAY, and SCIPincludeReaderNl().

◆ SCIP_DECL_READERREAD()

static SCIP_DECL_READERREAD ( readerReadNl  )
static

problem reading method of reader

Definition at line 1329 of file reader_nl.cpp.

References AMPLProblemHandler::cleanup(), NULL, SCIP_CALL, SCIP_ERROR, SCIP_NOFILE, SCIP_NOMEMORY, SCIP_OKAY, SCIP_READERROR, SCIP_SUCCESS, and SCIPerrorMessage.

◆ SCIPincludeReaderNl()

SCIP_RETCODE SCIPincludeReaderNl ( SCIP scip)

includes the AMPL .nl file reader in SCIP

Parameters
scipSCIP data structure

Definition at line 1395 of file reader_nl.cpp.

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

Referenced by SCIP_DECL_READERCOPY(), and SCIPincludeDefaultPlugins().

◆ SCIPwriteSolutionNl()