views:

71

answers:

2

Hi,

I am designing a structural optimisation program as part of my degree, and I need to run a sequence of optimisation code for a number of different structural sections.

For each section, a number of different imposed loads will be defined and then the optimum form generated in response to this loading.

In programming terms, I need to be able to define a set of loads for each section as an input and then execute the optimisation code for this (which is basically a while loop that cycles through and removes under-stressed material from the section).

I also need to be able to display the results of this optimisation onscreen simulataneously for the different sections.

Does anyone have an idea of the best way to go about doing this?

I've probably not been very clear, so please let me know if anything needs clarifying.

Thanks

A: 

Hi

You could help us to help you if you revealed a bit more of what you have already done or what you are already planning to do. This would help us to:

  1. Understand that you have made a good attempt to do your own work yourself, that you haven't just thought 'ask SO' when given a project to do. You are, after all, at university now.
  2. Give you specific answers to specific questions. This is likely to give you much better quality answers than vague questions.

Having written that, here are some vague parts of an answer:

  1. I suggest that you set up a 2-D array, each row (or column if you prefer) of which contains the input arguments for 1 execution of your optimisation code. You can then loop down the rows (across the columns) to execute the optimisation code multiple times.
  2. If a 2D array is not what you need, look at structures and cell arrays.
  3. As for display, it's relatively easy in Matlab to display an arbitrary set of line segments given an array of (x,y) coordinates.

To summarise:

  1. Get your input and output data structures right, all else can easily follow.

Regards

Mark

PS Why did you tag this question Matlab and parallel programming ?

High Performance Mark
A: 

Mark

Thank you for your response. I'm sorry if I made it sound like I was asking for suggestions on how to do the whole program, I have got the optimisation code to run for a single loop, with the screen output I want and I was trying to work out how to run it for multiple inputs.

The reason I tagged it with parallel programming is that MATLAB's (the program I am using) help literature suggested this may be the way to go about running code for multiple inputs, but I think your idea for a 2D array input may be a lot simpler.

Thanks again.

Richard

Chris

related questions