# TOMLAB  
# REGISTER (TOMLAB)
# LOGIN  
# myTOMLAB
TOMLAB LOGO

« Previous « Start » Next »

17  Geometric programming

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).

 
(GP) VGP:= minimize  g0(t)  
    subject to gk(t) ≤ 1, k = 1,2,…, p
      ti > 0, i = 1,2,…, m
        (19)
where
g0(t) =
n0
Σ
j=1
cj t1a1j ... tmamj  
    (20)
gk(t) =
nk
Σ
j= nk−1 +1
cj t1a1j ... tmamj,   k = 1,2,…, p.  
    (21)


Given exponents aij for the ith variable in the jth product term, i=1,…, m and j=1,…,np, are arbitrary real constants and term coefficients cj are positive.

Example problem:

(P1) min   5x1 + 50000x1−1 + 20x2 + 72000x2−1 + 10x3 + 144000x3−1
 
  subject to 4x1−1 + 32x2−1 + 120x3−1 <= 1
 
    x ≥ 0


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);

« Previous « Start » Next »