Quickguide GP Problem: Difference between revisions
From TomWiki
Jump to navigationJump to search
(Created page with "{{Part Of Manual|title=the Quickguide Manual|link=Quickguide}} Geometric programming problems are a set of special problems normally solved with TOMLAB /GP. The op...") |
No edit summary |
||
Line 12: | Line 12: | ||
<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> | ||
<math> | <math> | ||
g_k(t) = \sum_{j= n_{k-1} +1}^{n_k} c_j t^{a_{1j}}_1 ...t^{a_{mj}}_m,\quad k = 1,2,\ldots, p. | |||
</math> | </math> | ||
Line 31: | Line 31: | ||
Open the file for viewing, and execute gpQG in Matlab. | Open the file for viewing, and execute gpQG in Matlab. | ||
< | <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 50: | Line 50: | ||
Result = tomRun('GP', Prob, 1); | Result = tomRun('GP', Prob, 1); | ||
</ | </source> |
Latest revision as of 18:24, 17 January 2012
This page is part of the Quickguide Manual. See Quickguide. |
Geometric programming problems are a set of special problems normally solved with TOMLAB /GP. The optimum is commonly non-differentiable. Problems are modeled on the primal form, but the dual is entered and solved.
The primal geometric programming problem is defined as:
where
Given exponents for the th variable in the th product term, and , are arbitrary real constants and term coefficients are positive.
Example problem:
The following file defines and solves the problem in TOMLAB.
File: tomlab/quickguide/gpQG.m
Open the file for viewing, and execute gpQG in Matlab.
% 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);