# space-960-ir.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!
#
# 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-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 sigma {y in yield};
param E := 2000; # ... Young's modulus (?)
param alpha := 1.0; # ... load factor
# ... variables with initial values & bounds
var A {members} >= 1, <= Nsize, integer, := 5;
var Q {members};
var u {d in dof} >= -15, <= 15;
# .. 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} 10*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;