(THIS MIGHT BE CONFUSING. YOU CAN JUST JUMP TO MODELING)
Aoa. I am a student of civil engineering and i am attempting to make a spreadsheet to help me design structural members but i am at the best a novice at programming. So any help is appreciated.
Say i need a total steel area “A” and the steel available is as 0.11, 0.2, 0.31, 0.44,0.6, 0.79, 1, 1.27, 1.56, 2.25 and 5 squared inches. Moreover if i use a single type of steel bar, i can take either even or odd number of bars but if i use multiple bars, i can have an odd number of only type of bars, the rest must be even. Odd bars are not a necessity, i can have even number of all types of bars.
A’ = aX + bY using two types of bars.
X or Y = [0.11, 0.2, 0.31, 0.44, 0.6, 0.79, 1, 1.27, 1.56, 2.25, 5].
a = [0,2,4,6,…,(A/0.11 rounded up to nearest multiple of 2)].
b = [0,1,2,3,4,…,(A/0.11 rounded up to nearest whole number)].
A is the area required and A’ is what i get. I want a very small difference.
a = [0,2,4] and
b = [0,1,2,3].
So what i need is the 10 out of the ~1500 possibilities that give me the least value of |A-A’|. Positive / negative does not matter.
I know this is a lot to ask and really appreciate your consideration and help.