Closed Thread
Results 1 to 7 of 7

Thread: Bridge Design Optimizer

  1. #1
    Timbydade is offline Newbie
    Join Date
    Feb 2010
    Posts
    3
    Rep Power
    0

    Bridge Design Optimizer

    So here's a little background.
    I'm making a program that optimizes the cost of a bridge in a bridge designing program, given the length, the compression it has to support, and the tension it has to support.
    Each bar in the bridge (truss bridge design) has two variables you can edit (for the purposes of this program): size (x mm by x mm) and material.

    With each size, each material gets stronger, but the strongest of the size before is weaker than the weakest of the current size. Ex: 120x120 M3 is weaker than 130x130 M1 (M3 being the strongest, M1 being weakest).

    There are 32 somewhat arbitrary sizes which I already put into my program, and three materials that have been also.
    I have also input the 96 values for each of the costs for each cross section of material (all combinations) possible.

    What I have done so far:
    My program will take in any number of members, given their length, compression force, and tensile force, and optimize them individually--that is, make each bar the lowest it can be. I have thoroughly tested this part of the program, and it is very successful. It will correctly output the type of material and size needed to minimize individual costs.

    How it works:
    I have a main class and a Member class. The Member class holds basic information:
    -The size "number" (the sizes are held in an array in the main class, and the Members just hold the index)
    -The needed compression strength
    -The needed tensile strength
    -The length
    -The current material

    The main class iterates through each member (all are stored in one array) with a basic for loop. Inside this loop, there is a while statement that checks if the bar will hold. If not, it makes it the next biggest material, or the next size and the weakest material.

    I am very confident that this part of the program works.

    What I need to do:
    Optimize lowest cost. Now, it sounds like my program already does it, but here's the catch: each unique kind of bar (120x120 M1 and 120x120 M2 are different) costs an extra $1000. What I was originally going to do was to have the program iterate through every single possibility and calculate the cost, giving the lowest cost and the corresponding members. I soon realized that with an average of about 25 members, this would be (32 x 3)^25 possibilities, which would take years to compute. I have never really worked with a program that needs such a high efficiency as this one.

    In addition, 25 "for" loops nested within each other wouldn't be practical, as the number of members can vary greatly.

    So, I'm not asking for help in the form of code. I need someone to help me create an algorithm that would be able to test only a few reasonable possibilities, in addition to making a program that can work for a varying number of members. Don't worry about the specifics, I only need the concepts, as I have much experience coding. I guess I'm just having trouble solving this problem.

    Thanks for your time! (even if you're not going to answer, you still read a lot of my rambling )

    P.S.--Putting filters of "has to be higher than the lowest and lower than the highest" don't work, as this still leaves you with 25 nested "for" loops and a long, long time to wait.

  2. CODECALL Circuit advertisement
    Join Date
    Always
    Posts
    Many

     
  3. #2
    Join Date
    Jul 2006
    Posts
    16,491
    Blog Entries
    75
    Rep Power
    143

    Re: Bridge Design Optimizer

    Are you familiar with linear programming?
    Programming is a branch of mathematics.
    My CodeCall Blog | My Personal Blog

  4. #3
    Timbydade is offline Newbie
    Join Date
    Feb 2010
    Posts
    3
    Rep Power
    0

    Re: Bridge Design Optimizer

    I am somewhat familiar with linear programming, I have done moderate work with it. I'm not sure how it could be used here though. If you do know, could you please share it with me?

    (I'm not sure because the equations for the forces are somewhat complex. Aside from that, though, I'm not sure how I would be able to recreate the $1000-for-each-value part of it).

  5. #4
    Join Date
    Jul 2006
    Posts
    16,491
    Blog Entries
    75
    Rep Power
    143

    Re: Bridge Design Optimizer

    Perhaps I'm oversimplifying this. Can you give a couple sample formulas? I suspect the complicated formulas might be simpler than you thought.
    Programming is a branch of mathematics.
    My CodeCall Blog | My Personal Blog

  6. #5
    Timbydade is offline Newbie
    Join Date
    Feb 2010
    Posts
    3
    Rep Power
    0

    Re: Bridge Design Optimizer

    OK. Get ready.

    lambda = (length / (sqrt(1/A) x pi)^2*yield force/200000000

    A = area of the cross section
    yield force is a value that is different force each of the 3 materials, but is not dependent on size or length

    If lambda <= 2.25,

    Max force=0.9*((0.66)^lambda)*yield force*A //same A as up there

    If lambda > 2.25,

    Max force = 0.9*0.88*yield force*A/lamda

    If you can use linear programming to solve it, I would be very, very happy.

  7. #6
    Join Date
    Jul 2006
    Posts
    16,491
    Blog Entries
    75
    Rep Power
    143

    Re: Bridge Design Optimizer

    It seems like what you're looking at is a combination of problems where the parameters create the linear programming problem on the fly.

    For each material, lambda is only a function of length, as is Max force. It looks like each bar, in reality, has a constant max force for each type (size/material) and length. It seems like the only actual tricky part is accounting for the 1000 for each type of material used.
    Programming is a branch of mathematics.
    My CodeCall Blog | My Personal Blog

  8. #7
    Join Date
    Jul 2006
    Posts
    16,491
    Blog Entries
    75
    Rep Power
    143

    Re: Bridge Design Optimizer

    It seems like what you're looking at is a combination of problems where the parameters create the linear programming problem on the fly.

    For each material, lambda is only a function of length, as is Max force. It looks like each bar, in reality, has a constant max force for each type (size/material) and length. It seems like the only actual tricky part is accounting for the 1000 for each type of material used.
    Programming is a branch of mathematics.
    My CodeCall Blog | My Personal Blog

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. The Bridge between Machine and Assembly Language
    By Cory Duchesne in forum General Programming
    Replies: 0
    Last Post: 03-23-2010, 04:31 AM
  2. Need help with Ice.net Optimizer
    By Thunderstroke in forum General Programming
    Replies: 6
    Last Post: 03-07-2009, 04:56 AM
  3. VMware and bridge networking
    By C3P0 in forum Linux Networking
    Replies: 1
    Last Post: 06-20-2007, 07:43 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts