AMPL .nl file reader and writer.
The reader supports linear, nonlinear, and logic constraints, with the following limitations:
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.
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) |
| SCIP_RETCODE SCIPincludeReaderNl | ( | SCIP * | scip | ) |
includes the .nl file reader into SCIP
includes the AMPL .nl file reader in SCIP
| scip | SCIP 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().
| SCIP_RETCODE SCIPwriteSolutionNl | ( | SCIP * | scip | ) |
writes AMPL solution file
problem must have been read with .nl reader
| scip | SCIP data structure |
Definition at line 3255 of file reader_nl.cpp.
References assert(), c, i, NULL, SCIP_CALL, SCIP_ERROR, SCIP_INVALID, SCIP_OBJSENSE_MINIMIZE, SCIP_OKAY, SCIP_Real, SCIP_STAGE_SOLVED, SCIP_STATUS_BESTSOLLIMIT, SCIP_STATUS_DUALLIMIT, SCIP_STATUS_GAPLIMIT, SCIP_STATUS_INFEASIBLE, SCIP_STATUS_INFORUNBD, SCIP_STATUS_MEMLIMIT, SCIP_STATUS_NODELIMIT, SCIP_STATUS_OPTIMAL, SCIP_STATUS_PRIMALLIMIT, SCIP_STATUS_RESTARTLIMIT, SCIP_STATUS_SOLLIMIT, SCIP_STATUS_STALLNODELIMIT, SCIP_STATUS_TERMINATE, SCIP_STATUS_TIMELIMIT, SCIP_STATUS_TOTALNODELIMIT, SCIP_STATUS_UNBOUNDED, SCIP_STATUS_UNKNOWN, SCIP_STATUS_USERINTERRUPT, SCIP_WRITEERROR, SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPdebug, SCIPerrorMessage, SCIPgetBestSol(), SCIPgetDualsolLinear(), SCIPgetObjsense(), SCIPgetProbData(), SCIPgetSolVal(), SCIPgetStage(), SCIPgetStatus(), SCIPgetTransformedCons(), SCIPhasPerformedPresolve(), SCIPinfoMessage(), SCIPprintSol(), SCIPprintStatus(), and TRUE.
Referenced by fromAmpl().