Largest small polygon
{ Polygon.mpl }
{ GAMS Model Library, http://www.gams.com/modlib/libhtml/polygon.htm }
{ Largest small polygon, NLP, Size: 54x20 }
TITLE
Polygon;
OPTIONS
ModelType=Nonlinear
ParserType=Extended
Conopt.SDEvalUse = 1;
INDEX
i := 1..10;
j := i;
DATA
RInit[i] := 4*ord(i)*(count(i)+1-ord(i))/(count(i)+1)^2;
ThetaInit[i] := pi*ord(i)/count(i);
VARIABLES
R[i] INITIAL RInit;
Theta[i] INITIAL ThetaInit;
MODEL
MAX Polygon_Area = 0.5 * SUM(i<last(i): R[i+1]*R*SIN(Theta[i+1]-Theta));
SUBJECT TO
Ordered[i<last(i)]: Theta <= Theta[i+1];
Distance[i,j] WHERE (j > i):
R^2 + R[i:=j]^2 - 2*R*R[i:=j]*COS(Theta[i:=j] - Theta) <= 1;
BOUNDS
0 <= R <= 1;
0 <= Theta <= Pi;
R[i=10] = 0;
Theta[i=10] = Pi;
END
Back To Top
|
Maximal Home Page
|
List of Models |
Previous Page
|
Next Page