Cost Function is now a synonym for Weight Function.
Consider a truss,
Since a member can have variable thickness, i.e. more internal force in a member means thicker the member should be. I therefore assume that
Define function
This cost function is easy to implement, with the downside being it completely ignores the extra weight iccured by
- Truss should be
$40\pm 1$ cm long and$10\pm 0.5$ cm tall truss that can handle the largest load-to-weight ratio. - The truss should be loaded at the middle of the bridge.
- A minimum load-to-mass ratio of 100 is required, this is the lower threshold requirement.
- Member in tension: Rupture and Member Tearing
- Member in compression: Buckling and Bearing Stress
- Pin Shear (bending, don't worry about it here)
This is an over estimation
Where
Truss configuration should be entered as a textfile. To run the application, enter truss-optimizer some_truss.txt
in the command prompt.
The first line consists of 3 inputs
The next 'T'
/'F'
(separated by space). If the first character is T
, it means its a free joint. if the second character is T
, it means it's the highest point that should be used to maintain the dimension of the truss bridge.
Note that each joints entered are indexed from
The next
The next
Example:
3 3 3
0 0 F F
20 10 T T
40 0 F F
0 1
1 2
0 2
0 1
1 -2
2 1
Output the most optimized truss configuration to optimized.txt
in the following format:
- First Line:
Score: $SCORE
where$SCORE
is Cost divided by the Force applied. - Next
$P$ lines:($X, $Y)
representing the coordinate of each joint.
On the console, print whatever.