# space-960.mod LQR2-AN-893-235
#
# 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
#
# Replace discrete A[m] \in { 10 , 20 , ... , 100 } by 10*A[m]
# and have A[m] \in { 1 , 2 , ... , 10 }. Only possible since
# discrete sizes are equally spaced!
#
# From a GAMS file by F. Tin-Loi : 7 April 2000
# AMPL coding: S. Leyffer, University of Dundee, April 2000.
#
# data file space-960-i.dat with 960 integer variables
# ... modelling discrete sizes with SOS1 variables
param Nsize; # ... No. of different 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} >= 1, <= Nsize, integer, := 5;
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;
minimize cost: sum{m in members} 10*A[m]*L[m];
subject to
stiff {m in members}: S[m] - E*10*A[m]/L[m] = 0;
limit_t {m in members}: R[m,1] - sigma_t*10*A[m] = 0;
limit_c {m in members}: R[m,2] - sigma_c*10*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;