Quickguide GLC Problem: Difference between revisions
From TomWiki
Jump to navigationJump to search
(Created page with "{{Part Of Manual|title=the Quickguide Manual|link=Quickguide}} The '''global mixed-integer nonlinear programming''' ('''glc''') problem is defined as <math> \be...") |
No edit summary |
||
Line 8: | Line 8: | ||
& \\ | & \\ | ||
s/t & \begin{array}{llcccll} | s/t & \begin{array}{llcccll} | ||
-\infty < &x_{L} & \leq & x & \leq & x_{U}& < \infty \\&b_{L} & \leq & A x & \leq & b_{U}& \\&c_{L} & \leq & c(x) & \leq & c_{U},& ~x_{j} \in \ | -\infty < &x_{L} & \leq & x & \leq & x_{U}& < \infty \\&b_{L} & \leq & A x & \leq & b_{U}& \\&c_{L} & \leq & c(x) & \leq & c_{U},& ~x_{j} \in \mathbb{N}\ ~~\forall j \in $I$, \\ | ||
\end{array} | \end{array} | ||
\end{array} | \end{array} | ||
</math> | </math> | ||
where <math>x, x_L, x_U \in \ | where <math>x, x_L, x_U \in \mathbb{R}^n</math>, <math>f(x) \in \mathbb{R}</math>, <math>A | ||
\in \ | \in \mathbb{R}^{m_1 \times n}</math>, <math>b_L,b_U \in \mathbb{R}^{m_1}</math> | ||
and <math>c_L,c(x),c_U \in \ | and <math>c_L,c(x),c_U \in \mathbb{R}^{m_2}</math>. The variables <math>x \in I</math>, | ||
the index subset of <math>1,...,n</math>, are restricted to be integers. | the index subset of <math>1,...,n</math>, are restricted to be integers. | ||
Line 33: | Line 33: | ||
Open the file for viewing, and execute glcQG in Matlab. | Open the file for viewing, and execute glcQG in Matlab. | ||
< | <source lang="matlab"> | ||
% glcQG is a small example problem for defining and solving | % glcQG is a small example problem for defining and solving | ||
% constrained global programming problems using the TOMLAB format. | % constrained global programming problems using the TOMLAB format. | ||
Line 65: | Line 65: | ||
%Result = tomRun('lgo', Prob, 1); | %Result = tomRun('lgo', Prob, 1); | ||
%Result = tomRun('oqnlp', Prob, 1); | %Result = tomRun('oqnlp', Prob, 1); | ||
</ | </source> |
Latest revision as of 07:51, 17 January 2012
This page is part of the Quickguide Manual. See Quickguide. |
The global mixed-integer nonlinear programming (glc) problem is defined as
where , , , and . The variables , the index subset of , are restricted to be integers.
The following files define a problem in TOMLAB.
File: tomlab/quickguide/glcQG_f.m, glcQG_c.m
f: Function c: Constraints
The following file illustrates how to solve a constrained global optimization problem in TOMLAB. Also view the m-files specified above for more information.
File: tomlab/quickguide/glcQG.m
Open the file for viewing, and execute glcQG in Matlab.
% glcQG is a small example problem for defining and solving
% constrained global programming problems using the TOMLAB format.
Name = 'Hock-Schittkowski 59';
u = [75.196 3.8112 0.0020567 1.0345E-5 6.8306 0.030234 1.28134E-3 ...
2.266E-7 0.25645 0.0034604 1.3514E-5 28.106 5.2375E-6 6.3E-8 ...
7E-10 3.405E-4 1.6638E-6 2.8673 3.5256E-5];
x_L = [0 0]'; % Lower bounds for x.
x_U = [75 65]'; % Upper bounds for x.
b_L = []; b_U = []; A = []; % Linear constraints
c_L = [0 0 0]; % Lower bounds for nonlinear constraints.
c_U = []; % Upper bounds for nonlinear constraints.
x_opt = [13.55010424 51.66018129]; % Optimum vector
f_opt = -7.804226324; % Optimum
x_min = x_L; % For plotting
x_max = x_U; % For plotting
x_0 = [90 10]'; % If running local solver
Prob = glcAssign('glcQG_f', x_L, x_U, Name, A, b_L, b_U, ...
'glcQG_c', c_L, c_U, x_0, ...
[], [], [], [], ...
[], x_min, x_max, f_opt, x_opt);
Prob.user.u = u;
Prob.optParam.MaxFunc = 1500;
Result = tomRun('glcFast', Prob, 1);
%Result = tomRun('glcSolve', Prob, 1);
%Result = tomRun('lgo', Prob, 1);
%Result = tomRun('oqnlp', Prob, 1);