**TOMLAB /MODELS Manual**- Introduction to TOMLAB Models
- Contents
- 1 The testprob collection
- 2 Linear Programming
- 3 Mixed-Integer Linear Programming
- 4 Quadratic Programming
- 5 Mixed-Integer Quadratic Programming
- 6 Mixed-Integer Quadratic w QC
- 7 Nonlinear Programming
- 8 Mixed-Integer Nonlinear Programming
- 9 Linear Least Squares
- 10 Nonlinear Least Squares Problems
- 11 Global Optimization
- 12 Constrained Global Optimization
- 13 Unconstrained Optimization
- 14 Linear Semi-Definite w LMI
- 15 Linear Semi-Definite w BMI
- 16 Constrained Goal Attainment
- 17 Geometric programming
- 18 Exponential Fitting
- 19 Traveling Salesman Problems
- 20 The modellib collection
- 21 Mining and Processing
- 22 Scheduling
- 23 Planning
- 24 Loading and Cutting
- 25 Ground transport
- 26 Air transport
- 27 Telecommunication
- 28 Economics
- 29 Timetabling
- 30 Public Services
- 31 The additional downloads collection
- 32 Additional linear.
- 33 Additional mixed-integer.
- 34 Additional quadratic.

`testprob`

provides
three sets of test problems for nonlinear problems:
`con_prob`

and `chs_prob`

.where

An example of a problem of this class, (that is also found in the TOMLAB quickguide) is nlpQG:

TOMLAB requires that general nonlinear problems are defined in Matlab m-files. The function to be optimized must always be supplied. It is recommended that the user supply as many analytical functions as possible. There are six methods available for numerical differentiation and also two for automatic.

The following files define the problem in TOMLAB.

f: Function value g: Gradient vector H: Hessian matrix c: Nonlinear constraint vector dc: Nonlinear constraint gradient matrix d2c: The second part of the Hessian to the Lagrangian function for the nonlinear constraints.The following file illustrates how to solve this NLP (CON) problem in TOMLAB. Also view the m-files specified above for more information.

Open the file for viewing, and execute nlpQG in Matlab.

% nlpQG is a small example problem for defining and solving % nonlinear programming problems using the TOMLAB format. Name = 'RBB Problem'; x_0 = [-1.2 1]'; % Starting values for the optimization. x_L = [-10;-10]; % Lower bounds for x. x_U = [2;2]; % Upper bounds for x. fLowBnd = 0; % Lower bound on function. c_L = -1000; % Lower bound on nonlinear constraints. c_U = 0; % Upper bound on nonlinear constraints. Prob = conAssign('rbbQG_f', 'rbbQG_g', 'rbbQG_H', [], x_L, x_U, Name, x_0,... [], fLowBnd, [], [], [], 'rbbQG_c', 'rbbQG_dc', 'rbbQG_d2c', [], c_L, c_U); Prob.Warning = 0; % Turning off warnings. Result = tomRun('ucSolve', Prob, 1); % Ignores constraints. % Result = tomRun('conopt', Prob, 1); % Result = tomRun('snopt', Prob, 1);

`con_prob`

is a collection of 17 constrained nonlinear test problems
with 2 to 100 variables and up to 50 constrains.
In order to define the problem `n`

and solve it execute the following in Matlab:
Prob = probInit('con_prob',n); Result = tomRun('',Prob);

`chs_prob`

is a collection of 180 constrained nonlinear test problems from
the Hoch-Schittkowski set with 2 to 50 variables and about 10 constrains.
In order to define the problem `n`

and solve it execute the following in Matlab:
Prob = probInit('chs_prob',n); Result = tomRun('',Prob);