Models Geometric programming problems: gp prob: Difference between revisions
From TomWiki
Jump to navigationJump to search
(Created page with "{{Part Of Manual|title=TOMLAB Models|link=TOMLAB Models}} In <tt>gp_prob</tt> there are 14 geometric programming test problems with sizes to 12 variables and about 10 ...") |
No edit summary |
||
(One intermediate revision by the same user not shown) | |||
Line 17: | Line 17: | ||
<math> | <math> | ||
g_0(t) | g_0(t) = \sum_{j=1}^{n_0} c_j t^{a_{1j}}_1 ... t^{a_{mj}}_m | ||
</math> | </math> | ||
Line 38: | Line 38: | ||
'''File: '''tomlab/quickguide/gpQG.m | '''File: '''tomlab/quickguide/gpQG.m | ||
< | <source lang="matlab"> | ||
% gpQG is a small example problem for defining and solving | % gpQG is a small example problem for defining and solving | ||
% geometric programming problems using the TOMLAB format. | % geometric programming problems using the TOMLAB format. | ||
Line 57: | Line 57: | ||
Result = tomRun('GP', Prob, 1); | Result = tomRun('GP', Prob, 1); | ||
</ | </source> |
Latest revision as of 18:55, 17 January 2012
This page is part of TOMLAB Models. See TOMLAB Models. |
In gp_prob there are 14 geometric programming test problems with sizes to 12 variables and about 10 constrains. In order to define the problem n and solve it execute the following in Matlab:
Prob = probInit('gp_prob',n); Result = tomRun('',Prob);
The primal geometric programming problem is defined below (the dual is used internally).
where
Example problem:
The following file illustrates how to define and solve a problem of this category in TOMLAB.
File: tomlab/quickguide/gpQG.m
% gpQG is a small example problem for defining and solving
% geometric programming problems using the TOMLAB format.
nterm = [6;3];
coef = [.5e1;.5e5;.2e2;.72e5;.1e2;.144e6;.4e1;.32e2;.12e3];
A = sparse([ 1 -1 0 0 0 0 -1 0 0;...
0 0 1 -1 0 0 0 -1 0;...
0 0 0 0 1 -1 0 0 -1])';
Name = 'GP Example'; % File gpQG.m
% Assign routine for defining a GP problem.
Prob = gpAssign(nterm, coef, A, Name);
% Calling driver routine tomRun to run the solver.
% The 1 sets the print level after optimization.
Result = tomRun('GP', Prob, 1);