# space-960.mod LQR2-AN-15137-8417
#
# SYNTHESIS OF SPACE TRUSS (space960.gms)
# Areas >= 10
# Constraints on Q and u
# Stress limits in compression = 0.5 tension
#
# 960 bar 3-d truss (T, cm)
# 737 dof
# Tension positive
#
# Discrete size A[m] \in { 10 , 20 , ... , 100 } modelled by
# binary variables and SOS constraints.
#
# From a GAMS file by F. Tin-Loi : 7 April 2000
# AMPL coding: S. Leyffer, University of Dundee, April 2000.
#
# data file space-960.dat with 9600 binary (or 960 SOS 1) variables
# ... modelling discrete sizes with SOS1 variables
param Nsize; # ... No. of different sizes
param size{1..Nsize}; # ... discrete sizes
# ... number of elements in each of sets defined below
param Ndof;
param Nmembers;
# ... definition of sets
set dof := 1..Ndof; # ... No. structure dof
set members := 1..Nmembers; # ... No. members
set yield := 1..2; # ... No. yield functions per member
set mdof := 1..6; # ... No. member dof
set proj := {"dx" , "dy" , "dz"}; # ... Truss coord projections
# ... parameters
param F {dof} default 0;
param N {members,yield};
param truss {members,proj} default 0; # ... x y z projections
param lv {members,mdof}, integer; # ... location vectors
param C {members,dof}, default 0; # ... Structure C
param mC {members,mdof}, default 0; # ... Elements C
param L {m in members}
:= sqrt( truss[m,"dx"]^2 + truss[m,"dy"]^2 + truss[m,"dz"]^2 );
param ll {m in members} := truss[m,"dx"] / L[m];
param mm {m in members} := truss[m,"dy"] / L[m];
param nn {m in members} := truss[m,"dz"] / L[m];
param E := 2000; # ... Young's modulus (?)
param sigma_t := 2.5 ;
param sigma_c := 1.25;
param alpha := 1.0; # ... load factor
# ... variables with initial values & bounds
var A {members} >= 10, := 50;
var S {m in members} := E*50/L[m];
var R {m in members,yield} := sigma_t*50;
var Q {members};
var u {d in dof} >= -15, <= 15;
var z {members,1..Nsize} binary; # ... 0-1 variables for discrete sizes
minimize cost: sum{m in members} A[m]*L[m];
subject to
stiff {m in members}: S[m] - E*A[m]/L[m] = 0;
limit_t {m in members}: R[m,1] - sigma_t*A[m] = 0;
limit_c {m in members}: R[m,2] - sigma_c*A[m] = 0;
compat {m in members}: - Q[m] + S[m]*sum{d in dof} C[m,d]*u[d] = 0;
equil {d in dof}: sum{m in members} C[m,d]*Q[m] - alpha*F[d] = 0;
constit {m in members, y in yield}: N[m,y]*Q[m] - R[m,y] <= 0;
# ... integer constraints to model discrete sizes
SOS1 {m in members}: sum{i in 1..Nsize} z[m,i] = 1;
discr {m in members}: sum{i in 1..Nsize} z[m,i]*size[i] = A[m];