summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbucklingStrength.m3
-rwxr-xr-xfranken.m9
-rwxr-xr-xmaxLoad.m5
-rwxr-xr-xmemberDistances.m1
-rw-r--r--pratt.m13
-rwxr-xr-xpratt2.m38
-rwxr-xr-xprintHeader.m8
-rwxr-xr-xtruss_data_1.m10
-rwxr-xr-xtruss_solver.m11
-rwxr-xr-xwarren.m7
10 files changed, 88 insertions, 17 deletions
diff --git a/bucklingStrength.m b/bucklingStrength.m
new file mode 100755
index 0000000..03b34f5
--- /dev/null
+++ b/bucklingStrength.m
@@ -0,0 +1,3 @@
+function [ s ] = bucklingStrength( l )
+ s = 369.9./(abs(l).^1.465);
+end \ No newline at end of file
diff --git a/franken.m b/franken.m
index 4367480..b771d71 100755
--- a/franken.m
+++ b/franken.m
@@ -1,4 +1,9 @@
-% franken
+% EK301, Section A1, Group 7, 4/09/12
+% Michael Abed, ID U55178419
+% Joseph Stone, ID U44434740
+% Ben Havey, ID
+
+% franken truss
C = [
1 1 0 0 0 0 0 0 0 0 0 0 0 0 0
@@ -15,7 +20,7 @@ C = [
Sx = zeros(9,3); Sx(1,1)=1;
Sy = zeros(9,3); Sy(1,2)=1; Sy(9,3)=1;
-X = [0 9 14 19 24 29 34 39 48 ];
+X = [0 9 14.5 19.5 24 28.5 35 40 49 ];
Y = [0 8.66 0 8.66 0 8.66 0 8.66 0];
L = zeros(18,1); L(9+5) = -3.92; \ No newline at end of file
diff --git a/maxLoad.m b/maxLoad.m
index faf0366..2ff279c 100755
--- a/maxLoad.m
+++ b/maxLoad.m
@@ -1,8 +1,11 @@
-function [ m ] = maxLoad(T, L, D, idx)
+function [ m ] = maxLoad(T, L, D, idx, weak)
L1 = abs(L(L ~= 0));
T1 = abs(T(idx));
ml = D(idx);
B = breaking(ml);
+ if weak
+ B = B - 1.0837;
+ end
ratio = T1/B;
m = L1 / ratio;
end
diff --git a/memberDistances.m b/memberDistances.m
index bd51f3d..b533850 100755
--- a/memberDistances.m
+++ b/memberDistances.m
@@ -6,6 +6,7 @@ function [ D ] = memberDistances(C, X, Y)
points = [X(memb == 1); Y(memb == 1)];
D(i) = dist(points(:,1), points(:,2));
end
+ D = D - 0.6;
end
diff --git a/pratt.m b/pratt.m
index b71ae70..3ec6de7 100644
--- a/pratt.m
+++ b/pratt.m
@@ -1,3 +1,10 @@
+% EK301, Section A1, Group 7, 4/09/12
+% Michael Abed, ID U55178419
+% Joseph Stone, ID U44434740
+% Ben Havey, ID
+
+% pratt truss
+
C = [
1 1 0 0 0 0 0 0 0 0 0 0
1 0 1 0 0 0 0 0 0 0 0 0
@@ -20,10 +27,10 @@ C = [
0 0 0 0 0 0 0 0 0 1 1 0
0 0 0 0 0 0 0 0 0 0 1 1
0 0 0 0 0 0 0 0 0 1 0 1
-]
+]';
-Sy = zeros(12,21); Sy(1,2) = 1; Sy(12,3)=1;
-Sx = zeros(12,21); Sx(1,1) = 1;
+Sy = zeros(12,3); Sy(1,2) = 1; Sy(12,3)=1;
+Sx = zeros(12,3); Sx(1,1) = 1;
X = [0 8 8 16 16 24 24 32 32 40 40 48];
Y = [0 8 0 0 8 8 0 0 8 8 0 0];
diff --git a/pratt2.m b/pratt2.m
new file mode 100755
index 0000000..e94b91d
--- /dev/null
+++ b/pratt2.m
@@ -0,0 +1,38 @@
+% EK301, Section A1, Group 7, 4/09/12
+% Michael Abed, ID U55178419
+% Joseph Stone, ID U44434740
+% Ben Havey, ID
+
+% modified pratt truss
+
+C = [
+ 1 1 0 0 0 0 0 0 0 0 0 0
+ 1 0 1 0 0 0 0 0 0 0 0 0
+ 0 1 1 0 0 0 0 0 0 0 0 0
+ 0 0 1 1 0 0 0 0 0 0 0 0
+ 0 1 0 1 0 0 0 0 0 0 0 0
+ 0 1 0 0 1 0 0 0 0 0 0 0
+ 0 0 0 1 1 0 0 0 0 0 0 0
+ 0 0 0 1 0 0 1 0 0 0 0 0
+ 0 0 0 1 0 1 0 0 0 0 0 0
+ 0 0 0 0 1 1 0 0 0 0 0 0
+ 0 0 0 0 0 1 1 0 0 0 0 0
+ 0 0 0 0 0 0 1 1 0 0 0 0
+ 0 0 0 0 0 1 0 1 0 0 0 0
+ 0 0 0 0 0 1 0 0 1 0 0 0
+ 0 0 0 0 0 0 0 1 1 0 0 0
+ 0 0 0 0 0 0 0 1 0 0 1 0
+ 0 0 0 0 0 0 0 1 0 1 0 0
+ 0 0 0 0 0 0 0 0 1 1 0 0
+ 0 0 0 0 0 0 0 0 0 1 1 0
+ 0 0 0 0 0 0 0 0 0 0 1 1
+ 0 0 0 0 0 0 0 0 0 1 0 1
+]';
+
+Sy = zeros(12,3); Sy(1,2) = 1; Sy(12,3)=1;
+Sx = zeros(12,3); Sx(1,1) = 1;
+
+X = [0 8 8 16 16 24 24 32.33 32.33 40.66 40.66 49];
+Y = [0 8 0 0 8 8 0 0 8 8 0 0];
+
+L = zeros(24,1); L(12+7) = -3.92;
diff --git a/printHeader.m b/printHeader.m
index 6209edb..bef5a55 100755
--- a/printHeader.m
+++ b/printHeader.m
@@ -1,7 +1,7 @@
function [] = printHeader()
- fprintf('\% EK301');
- fprintf('Michael Abed');
- fprintf('Joseph Stone');
- fprintf('Ben Havey');
+ fprintf('%% EK301, Section A1, Group 7, Team GNU, 4/09/12\n');
+ fprintf('%% Michael Abed, ID U55178419\n');
+ fprintf('%% Joseph Stone, ID U44434740\n');
+ fprintf('%% Ben Havey, ID \n');
end \ No newline at end of file
diff --git a/truss_data_1.m b/truss_data_1.m
index b3aca7f..b192b3e 100755
--- a/truss_data_1.m
+++ b/truss_data_1.m
@@ -1,7 +1,9 @@
-% EK301
-% Michael Abed
-% Ben Havey
-% Joseph Stone
+% EK301, Section A1, Group 7, 4/09/12
+% Michael Abed, ID U55178419
+% Joseph Stone, ID U44434740
+% Ben Havey, ID
+
+% sample problem truss
C = [
1 1 0 0 0 0 0 0 0 0 0 0 0
diff --git a/truss_solver.m b/truss_solver.m
index 50086f3..81e3cc8 100755
--- a/truss_solver.m
+++ b/truss_solver.m
@@ -13,8 +13,9 @@ D = memberDistances(C, X, Y);
cost = computeTrussCost(C,D);
weakest = weakestMember(D,forces);
-ml = maxLoad(forces,L,D,weakest);
+ml = maxLoad(forces,L,D,weakest,false);
+printHeader();
for i = 1:length(Ln)
fprintf('Load: %.3f N\n', abs(Ln(i)));
@@ -31,4 +32,10 @@ end
fprintf('Cost of truss: $%d\n', round(cost));
fprintf('Theoretical max load is %.4f\n', ml);
fprintf('Theoretical max load/cost ratio in N/$: %.4f\n', ml/cost);
-fprintf('First member to break is member %d\n', weakest); \ No newline at end of file
+fprintf('First member to break is member %d\n', weakest);
+fprintf('The buclking force is %.3f N\n' , bucklingStrength(D(weakest)));
+
+weak = maxLoad(forces,L,D,weakest,true);
+
+fprintf('Worst possible buckling strength is %.3f N\n', weak);
+fprintf('Theoretical worst load/cost ratio: %.4f\n', weak/cost); \ No newline at end of file
diff --git a/warren.m b/warren.m
index 6c5fc44..9f61689 100755
--- a/warren.m
+++ b/warren.m
@@ -1,4 +1,9 @@
-% warren
+% EK301, Section A1, Group 7, 4/09/12
+% Michael Abed, ID U55178419
+% Joseph Stone, ID U44434740
+% Ben Havey, ID
+
+% warren truss
C = [
1 1 0 0 0 0 0 0 0 0 0 0 0 0 0