|
TOMLAB OPTIMIZATION ENVIRONMENT: lpAssign |
![]() |
lpAssign
Purpose
For setting up Linear Programming (LP) problems.
Syntax
Prob = lpAssign(c, A, b_L, b_U, x_L, x_U, x_0, problemName,...
setupFile, nProblem, fLowBnd, x_min, x_max, f_opt, x_opt);
Description
lpAssign is a direct way of setting up a Linear Programming (LP) problem
in the TOMLAB Quick (TQ) format.
The information is put into the TOMLAB input problem structure Prob.
Prob = lpAssign( ....)
It is then possible to solve the LP problem using the TOMLAB LP solver
lpSolve with the call:
Result = lpSolve(Prob);
or any quadratic or general constrained solver:
Result = qpSolve(Prob); Result = conSolve(Prob); Result = nlpSolve(Prob); Result = sTrustr(Prob);
It is also possible to run the linprog.m interface, similar to
linprog in Optimization Toolbox 2.0.
See the file tomlab\examples\testlinprog.m for an example
lpAssign also makes the mideva.m file needed for use with MIDEVA
and nonlinear solvers.
Problem
LP minimization problem
min c' * x. x in R^n
x
s/t x_L <= x <= x_U
b_L <= A x <= b_U
Equality equations: Set b_L==b_U
Fixed variables: Set x_L==x_U
Input Parameters
One parameter c must always be given.
c The vector c in c'x in the objective function
A: The linear constraint matrix
b_L: The lower bounds for the linear constraints
b_U: The upper bounds for the linear constraints
x_L: Lower bounds on x
x_U: Upper bounds on x
b_L, b_U, x_L, x_U must either be empty or of full length
x_0: Starting point x (may be empty)
problemName The name of the problem (string)
setupFile The (unique) name as a TOMLAB Init file. If nonempty lpAssign
will create a executable m-file with this name and the given
problem defined as the first problem in this file.
See lp_prob.m, the TOMLAB predefined LP Init File.
If empty, no Init File is created.
nProblem Number of problems to predefine in the setupFile
Not used if setupFile is empty.
If empty assumed to be one. Then text are included in the
setupFile on how to create additional problems.
If nProblem > 1,
If empty, no setupFile is created.
fLowBnd A lower bound on the function value at optimum. Only used if
running the nonlinear TOMLAB solvers with line search
x_min Lower bounds on each x-variable, used for plotting
x_max Upper bounds on each x-variable, used for plotting
f_opt Optimal function value(s), if known (Stationary points)
x_opt The x-values corresponding to the given f_opt, if known.
If only one f_opt, give x_opt as a 1 by n vector
If several f_opt values, give x_opt as a length(f_opt) x n matrix
If adding one extra column n+1 in x_opt,
0 indicates min, 1 saddle (nonlinear problems), 2 indicates max.
x_opt and f_opt is used in printouts and plots.
![]() |
llsAssign | mcpAssign | ![]() |