source: proiecte/pmake3d/make3d_original/Make3dSingleImageStanford_version0.1/third_party/opt/yalmip/demos/geometricex.m @ 37

Last change on this file since 37 was 37, checked in by (none), 14 years ago

Added original make3d

File size: 1.1 KB
Line 
1clc
2echo on
3%*********************************************************
4%
5% Geomtric programming
6%
7%*********************************************************
8%
9% Geometric programming is optimization involving nonlinear
10% terms with non-integer and negative powers.
11%
12% MOSEK can be used to solve a special class of this, so
13% called posynomial geometric programming where all coefficients
14% in the objective function and the constraints are positive, and
15% the decision variables are constrained to be non-negative)
16pause
17
18% To define these problems, we first note that we can define
19% variables with negative and non-integer powers
20%
21% (note, only scalar unit sdpvar variables can be raised to negative
22%  and non-integer powers. Hence (1+x)^pi is not a valid command)
23x = sdpvar(1,1);
24degree(x^pi)
25pause
26
27
28% The following example is taken from the MOSEK manual
29% (note, non-negativity does not need to be specified)
30t1 = sdpvar(1,1);
31t2 = sdpvar(1,1);
32t3 = sdpvar(1,1);
33
34obj = (40*t1^-1*t2^-0.5*t3^-1)+(20*t1*t3)+(40*t1*t2*t3);
35
36F = set((1/3)*t1^-2*t2^-2+(4/3)*t2^0.5*t3^-1 < 1);
37pause
38
39% Standard call to solve problem
40solvesdp(F,obj)
41
42pause
43echo off
Note: See TracBrowser for help on using the repository browser.