Models Geometric programming problems: gp prob

From TomWiki
Jump to navigationJump to search

Notice.png

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