ampl/tp087r1.mod


If Cut/Copy and Paste fails, then click here for download.


# Model tp087r1
# Source version 7
# Simple APM canonicalizer version 1.3
# AMPL back end version 1.1
param bv1 := 1.48477;
param bv2 := 1.48577;
param bv := bv1;
param ubx5hsv1 := 1000;
param ubx5hsv2 := 10000;
param ubx5hsv := ubx5hsv1;
param a := 131.078;
param b := bv;
param c := 0.90798;
param arg := 1.47588;
param d := cos(arg);
param e := sin(arg);
param ivx5hs := 198.175;
param lbx5hs := -1000;
param lbx5r := -18;
param lbx5 := lbx5r;
param ubx5hs := ubx5hsv;
param ubx5r := -10.7;
param ubx5 := ubx5r;
param ivx5 := (1/2)*(ivx5hs + ubx5 - abs(ivx5hs - ubx5));
param midget := 2.0e-38;
param c2 := 2;
param c4 := 4;
param c8 := 8;
param c16 := 16;
param ct10 := -2186927100809997/c16;
param ct11 := 9112324500347/c4;
param ct12 := -121498919997/c8;
param ct13 := 101249775/c2;
param ct14 := -1350001/c16;
param ct15 := 225/c4;
param ct20 := -2999100089997/c16;
param ct21 := 37493500189/c4;
param ct22 := -1499879997/c8;
param ct23 := 3749925/c2;
param ct24 := -150001/c16;
param ct25 := 75/c4;
param ct30 := -191985600359997/c16;
param ct31 := 299987000067;
param ct32 := -23999519997/c8;
param ct33 := 14999925;
param ct34 := -600001/c16;
param ct35 := 75/c2;
param sign1_0 := 1;
param sign1_3 := -1;
param sign2_0 := 1;
param sign2_5 := -1;
var x_1 >= 0, <= 400;
let x_1 := 390;
var x_2 >= 0, <= 1000;
let x_2 := 1000;
var x_3 >= 340, <= 420;
let x_3 := 419.5;
var x_4 >= 340, <= 420;
let x_4 := 340.5;
var x_5 >= lbx5, <= ubx5;
let x_5 := ivx5;
var x_6 >= 0, <= 0.5236;
let x_6 := 0.5;
var cons_1 = 300 - x_1 - x_3*x_4*cos(b - x_6)/a + c*d*x_3^2/a;
var cons_2 = (-1)*x_2 - x_3*x_4*cos(b + x_6)/a + c*d*x_4^2/a;
var cons_3 = (-1)*x_5 - x_3*x_4*sin(b + x_6)/a + c*e*x_4^2/a;
var cons_4 = 200 - x_3*x_4*sin(b - x_6)/a + c*e*x_3^2/a;
var comp1_1 = x_1 - 299;
var comp1_2 = x_1 - 301;
var comp2_1 = x_2 - 99;
var comp2_2 = x_2 - 101;
var comp2_3 = x_2 - 199;
var comp2_4 = x_2 - 201;
var sign1x_1 = comp1_1/sqrt(comp1_1^2 + midget);
var sign1x_2 = comp1_2/sqrt(comp1_2^2 + midget);
var sign2x_1 = comp2_1/sqrt(comp2_1^2 + midget);
var sign2x_2 = comp2_2/sqrt(comp2_2^2 + midget);
var sign2x_3 = comp2_3/sqrt(comp2_3^2 + midget);
var sign2x_4 = comp2_4/sqrt(comp2_4^2 + midget);
var sign1_1 = sign1x_1;
var sign1_2 = sign1x_2;
var sign2_1 = sign2x_1;
var sign2_2 = sign2x_2;
var sign2_3 = sign2x_3;
var sign2_4 = sign2x_4;
var step1_1 = (1 + sign1_0)*(1 - sign1_1)/4;
var step1_2 = (1 + sign1_1)*(1 - sign1_2)/4;
var step1_3 = (1 + sign1_2)*(1 - sign1_3)/4;
var step2_1 = (1 + sign2_0)*(1 - sign2_1)/4;
var step2_2 = (1 + sign2_1)*(1 - sign2_2)/4;
var step2_3 = (1 + sign2_2)*(1 - sign2_3)/4;
var step2_4 = (1 + sign2_3)*(1 - sign2_4)/4;
var step2_5 = (1 + sign2_4)*(1 - sign2_5)/4;
var f1_1 = 30*x_1;
var f1_2 = (((((ct15)*x_1 + ct14)*x_1 + ct13)*x_1 + ct12)*x_1 + ct11)*x_1 + ct10;
var f1_3 = 31*x_1;
var f2_1 = 28*x_2;
var f2_2 = (((((ct25)*x_2 + ct24)*x_2 + ct23)*x_2 + ct22)*x_2 + ct21)*x_2 + ct20;
var f2_3 = 29*x_2;
var f2_4 = (((((ct35)*x_2 + ct34)*x_2 + ct33)*x_2 + ct32)*x_2 + ct31)*x_2 + ct30;
var f2_5 = 30*x_2;
var f1comb_1 = f1_1*step1_1;
var f1comb_2 = f1comb_1 + f1_2*step1_2;
var f1comb_3 = f1comb_2 + f1_3*step1_3;
var f2comb_1 = f2_1*step2_1;
var f2comb_2 = f2comb_1 + f2_2*step2_2;
var f2comb_3 = f2comb_2 + f2_3*step2_3;
var f2comb_4 = f2comb_3 + f2_4*step2_4;
var f2comb_5 = f2comb_4 + f2_5*step2_5;
var mf = f1comb_3 + f2comb_5;
var myminfun = mf;
var myabsdevnod0_0 = abs(myminfun - 8854.997011124169);
var myreldevnod0_0 = abs(myminfun/8854.997011124169 - 1);
var myabsdevnod0_1 = abs(x_1 - 202.7039339773582);
var myreldevnod0_1 = abs(x_1/202.7039339773582 - 1);
var myabsdevnod0_2 = abs(x_2 - 99.06588958062389);
var myreldevnod0_2 = abs(x_2/99.06588958062389 - 1);
var myabsdevnod0_3 = abs(x_3 - 383.1404626009829);
var myreldevnod0_3 = abs(x_3/383.1404626009829 - 1);
var myabsdevnod0_4 = abs(x_4 - 420);
var myreldevnod0_4 = abs(x_4/420 - 1);
var myabsdevnod0_5 = abs(x_5 + 11.11782763722497);
var myreldevnod0_5 = abs(x_5/11.11782763722497 + 1);
var myabsdevnod0_6 = abs(x_6 - 0.07238952863601766);
var myreldevnod0_6 = abs(x_6/0.07238952863601766 - 1);
var myabsdevnod1_0 = (1/2)*(abs(myabsdevnod0_0 - myabsdevnod0_1) + (myabsdevnod0_0 + myabsdevnod0_1));
var myreldevnod1_0 = (1/2)*(abs(myreldevnod0_0 - myreldevnod0_1) + (myreldevnod0_0 + myreldevnod0_1));
var myabsdevnod1_2 = (1/2)*(abs(myabsdevnod0_2 - myabsdevnod0_3) + (myabsdevnod0_2 + myabsdevnod0_3));
var myreldevnod1_2 = (1/2)*(abs(myreldevnod0_2 - myreldevnod0_3) + (myreldevnod0_2 + myreldevnod0_3));
var myabsdevnod1_4 = (1/2)*(abs(myabsdevnod0_4 - myabsdevnod0_5) + (myabsdevnod0_4 + myabsdevnod0_5));
var myreldevnod1_4 = (1/2)*(abs(myreldevnod0_4 - myreldevnod0_5) + (myreldevnod0_4 + myreldevnod0_5));
var myabsdevnod1_6 = myabsdevnod0_6;
var myreldevnod1_6 = myreldevnod0_6;
var myabsdevnod2_0 = (1/2)*(abs(myabsdevnod1_0 - myabsdevnod1_2) + (myabsdevnod1_0 + myabsdevnod1_2));
var myreldevnod2_0 = (1/2)*(abs(myreldevnod1_0 - myreldevnod1_2) + (myreldevnod1_0 + myreldevnod1_2));
var myabsdevnod2_4 = (1/2)*(abs(myabsdevnod1_4 - myabsdevnod1_6) + (myabsdevnod1_4 + myabsdevnod1_6));
var myreldevnod2_4 = (1/2)*(abs(myreldevnod1_4 - myreldevnod1_6) + (myreldevnod1_4 + myreldevnod1_6));
var myabsdevnod3_0 = (1/2)*(abs(myabsdevnod2_0 - myabsdevnod2_4) + (myabsdevnod2_0 + myabsdevnod2_4));
var myreldevnod3_0 = (1/2)*(abs(myreldevnod2_0 - myreldevnod2_4) + (myreldevnod2_0 + myreldevnod2_4));
var zmyabsdevmax = myabsdevnod3_0;
var zmyreldevmax = myreldevnod3_0;
minimize obj: myminfun;
subject to ce_1: cons_1 = 0;
subject to ce_2: cons_2 = 0;
subject to ce_3: cons_3 = 0;
subject to ce_4: cons_4 = 0;
solve;
display x_1;
display x_2;
display x_3;
display x_4;
display x_5;
display x_6;
display myminfun;
display zmyabsdevmax;
display zmyreldevmax;
# End Model

Stephan K.H. Seidl