## mmxnlp

The

mmxnlpmodule provides access to nonlinear solvers, extending the capabilities provided by themmxprsandmmnlmodules. In particular, this module allows existing linear or mixed integer (MIP) models to be upgraded to include nonlinearities, without requiring unnecessary changes to the formulation. To use this module, the following line must be included in the header of the Mosel model file:uses 'mmxnlp'Problem type and module hierarchyModule

mmxprsprovidesModule

- linear models and
- mixed integer linear models.
mmnladds support forModule

- convex quadratic models,
- convex quadratic mixed integer models,
- convex, quadratically constrained models, and
- convex, quadratically constrained mixed integer models.
mmxnlpadds support for

- general nonlinear problems and
- general nonlinear mixed integer problems.
If the

mmxnlpmodule is used for a model which does not require a general nonlinear solver, this should be equivalent to using the appropriatemmxprsormmnlmodule directly.## New functionality for the Mosel language

## The userfunc type

A nonlinear model may employ one or more black box evaluation functions, which can be used to provide function evaluations to the solver. These are represented in

mmxnlpby the new userfunc type. The implementation of each userfunc must be described by calling one of:Note that user functions returning multiple arguments are support by the

- userfuncMosel: to declare that a user function is implemented as a Mosel function
- userfuncExcel: to declare that a user function is implemented in an Excel file
- userfuncExcelMacro: to declare that a user function is implemented as a Visual Basic macro in Excel
- userfuncDLL: to declare that a user function is implemented in a dynamically linked library (DLL)
mmxnlpmodule. The F construction allows a userfunc to be included in any nonlinear (nlctr) expression, and groups each occurrence of the userfunc with its parameters . During the solve, the parameters (which are of type nlctr themselves) will be evaluated at the current solution, and the real-valued results passed to the userfunc implementation. The function userfuncinfo can be used to find out which parameters the system has deduced it needs to pass to a particular userfunc.## The tolset type

The module provides a large number of configurable tolerances for users of Xpress-SLP. A tolset describes a convergence tolerance set, which can be used for those nonlinear solvers supporting variable-specific convergence tolerances. The elements of a tolerance set are defined by using settol, and assigned to a variable or list of variables using settolset. For more details on tolerance sets, please refer to the Xpress-SLP documentation.

- XNLP_TOL_TC: The absolute closure tolerance
- XNLP_TOL_TA: The absolute delta tolerance
- XNLP_TOL_RA: The relative delta tolerance
- XNLP_TOL_TM: The absolute matrix tolerance
- XNLP_TOL_RM: The relative matrix tolerance
- XNLP_TOL_TI: The absolute impact tolerance
- XNLP_TOL_RI: The relative impact tolerance
- XNLP_TOL_TS: The relative slack impact tolerance
- XNLP_TOL_RS: The absolute slack impact tolerance
## The mpproblem.xprs.xnlp problem type

When using the

mmxnlpmodule, the type of the active Mosel problem is changed from mpproblem.xprs to the extended type mpproblem.xprs.xnlp. This means that all of the routines presented in this section operate in the context of the current Mosel problem. This is in contrast to the oldermmxslpmodule, which required a separate, explicit problem to work on.

mmxnlpand other the Mosel modules

mmxnlpis designed to provide seamless integration with other Mosel functionalities. However, the fundamentally different nature of non-linear problems makes some compromises necessary; these are listed in this section.## Overloaded functions

The following functionality is modified or extended by the

mmxnlpmodule:

- Retrieval of solution values with getsol, both for variables and nonlinear constraints. A detailed description of the behaviour of this function can be found in the documentation for the
mmxprsandmmnlmodules.- Functions implemented in the
mmnlmodule are extended for nonlinear solvers:- Functions implemented the in
mmxprsmodule are extended for nonlinear solvers:## Module compatibility

The

mmquadmodule is incompatible with themmxnlpmodule, and should not be used together with it.The

mmxprsandmmnlmodules are automatically loaded when using themmxnlpmodule.The

mmnlmodule defines several discontinuous functions for use with decision variables (mpvar), which are not supported by themmxnlpmodule. These constructions should instead be modelled with integer constraints. The functions are: round, ceil, floor, idiv and mod.The following standard functionalities are not available for nonlinear problems:

- Functions for working with a basis: loadbasis, readbasis and savebasis.
- Logical constraints of the form logctr, and their operators: implies, indicator, or, xor and and.
- Functions for working with multiple MIP solutions, the solution pool and the solution enumerator: selectsol, XPRS_enumduplpol, XPRS_enummaxsol and XPRS_enumsols.
- Functions for cut management, including model cuts and delayed rows: addcut, addcuts, loadcuts, storecut, storecuts, delcut, dropcuts, getcnlist and getcplist.
- Functions for determining irreducible infeasible sets, and for repairing infeasibility: getiis, getiissense, getiistype, isiisvalid, resetiis and repairinfeas and getinfeas.
## Control parameters

When using

mmxnlp, getparam and setparam are extended to additionally provide access to all the control and problem parameters of Xpress-SLP. The module also provides the following controls of its own:

XNLP_LOADASNL When set to true, quadratic expressions will be treated as being of general nonlinear type. If they are known to be non-convex, the overhead of attempting to treat the expression as convex initially is avoided.XNLP_LOADNAMES When set to true, names from the Mosel file will be passed to the underlying solver to improve the readability of messages it generates. This is an alias for XPRS_LOADNAMES.XNLP_NLPSTATUS The solution status of the problem. For a detailed description of this value, please see the documentation for the XSLP_NLPSTATUS attribute in the Xpress-SLP reference manual.XNLP_SOLVER Solver selection when available.XNLP_VERBOSE When set to true, informative messages from any underlying nonlinear solver will be displayed. This is an alias for XPRS_VERBOSE.## Procedures and functions

This section lists in alphabetical order the functions and procedures that are provided by the

mmxnlpmodule.

F Include a user function in a nonlinear constraint.printmodelmemory Print a summary of the current memory usage of the nonlinear module.printmodelscaling Print a summary of the scaling of the model, as loaded into the solver.setdelayedctr Mark a constraint as delayed.setdetrow Set the determining row for a variable.setenforcedctr Mark a nonlinear constraint as enforced.setinitsb Provide the initial step bound for a variable.settol Define a particular tolerance in a tolerance set.settolset Assigns a tolerance set to a variable, or list of variables.userfuncDLL Create a user function implemented as a dynamic linked library.userfuncExcel Create a user function from a Microsoft Excel spreadsheet.userfuncExcelMacro Create a user function from a Microsoft Excel macro.userfuncinfo Print the inferred prototype of the given user function.userfuncMosel Create a user function from a Mosel function.validate Print a summary of the feasibility of the current solution.

If you have any comments or suggestions about these pages, please send mail to support@fico.com.

© Copyright 2001-2013 Fair Isaac Corporation. All rights reserved.