# space-960-r.mod LQR2-AN-12257-5537
#
# 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.
#
# Reduced model (compared to space-960-i.mod) in the sense that
# defined variables are used to eliminate variables S[m] and R[m,y].
#
# From a GAMS file by F. Tin-Loi : 7 April 2000
# AMPL coding: S. Leyffer, University of Dundee, April 2000.
#
# data file space-960-r.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 sigma {y in yield};
param E := 2000; # ... Young's modulus (?)
param alpha := 1.0; # ... load factor
# ... variables with initial values & bounds
var A {members} >= 10, := 50;
var Q {members};
var u {d in dof} >= -15, <= 15;
var z {members,1..Nsize} binary; # ... 0-1 variables for discrete sizes
# .. defined variables (depend linearly on A[m] alone)
var S {m in members} = E*10*A[m]/L[m];
var R {m in members, y in yield} = sigma[y]*10*A[m];
minimize cost: sum{m in members} A[m]*L[m];
subject to
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];