Jump to content
MIHCool

CAESES input and response surface visualization

Recommended Posts

Dear All,

Hello 

 

I would like to ask some questions regarding my optimization project and would appreciate it if you could answer them.

I am working on the optimi9zation of the floating vessel's hull. I have done the simulations for 56 geometries and got the results (y1 and y2 in the attached file).

As you can see in the attached file, there are 4 design variables (x1, x2, x3 and x4) which each of them corresponds to specific y1 and y2.

1. now the question is how can I define these data in the CAESES, "CAD" section. Is there a way to tell the software that for specific (x1, x2, x3 and x4) there are specific (y1 and y2) ?

2. I have run the CAESES with some values just for testing, and I was wondering how can I plot 3D response surface using the results from Dakota?

Best Regards

Thank you in advance

Milad

 

Input.txt

Share this post


Link to post
Share on other sites

Hi Milad,

that looks to me as if you have generated these results manually (or through a different tool/script)? Usually, when you set up your design in CAESES and run the simulations through one of the optimization engines, you will have a result table which you can use right away. Alternatively, you could always use Dakota/Surfpack though the command line... In your case, with some changes to the formatting (I did a quick search and replace of \t\t with \t to get rid of the double-tabs), you should be able to import the existing results into CAESES and create a Surrogate aka. Response Surface Model from them. I quickly did that to take a look at the data -- see attached project file. To get a good fitting Surrogate I recommend using a more suitable sampling algorithm (usually Latin Hypercube or Sobol is what we recommend, Adaptive Sampling would be the more advanced option). For the model itself, there are different options available (Kriging works well for most cases I came across recently but depending on your problem you might also want to try out Artificial Neural Networks or Radial Basis Functions...).

image.png.b2ca06c603c7691ad3b62940a18032c7.png

For now, the parameters y1 and y2 are just dummies, so they do not return the correct evaluation. However, you can still run an optimization on the existing results and then look into the generated "finaldata1" file to check the predicted optimal designs. As I didn't know better, I specified to minimize y1 and y2 and attached the results. You can easily change that in the Dakota Design Engine.

image.thumb.png.f501c36040a8444fd741ac1b4a1d1afc.png

These are the predicted optimal candidates:

image.thumb.png.2ef04d9ef3970de5a7fa4df08e49a94d.png

Hope this gives you a good point to start.

Cheers,
Heinrich

importTable.cdb

Share this post


Link to post
Share on other sites

Dear Mr. Heinrich von Zadow,

 

Hello and thank you for your reply.

I am using CAESES version 4.4.  I have imported the variables using "import results pool" and allocated the variables and outputs to the columns and after that the software automatically ran the analysis. see 002.png

 

Do I need now to select the Dakota and run the simulation again. I need to generate a surrogate model and use it for my optimization.

 

Best Regards

 

 

002.png

001.png

Share this post


Link to post
Share on other sites

Hi Milad,

yes, that's exactly what I did. Is there any particular reason why you are using 4.4?

If you set up a Dakota Design Engine with the method "Global Optimization on Response" you can choose to use the existing result pool and when you start the Design Engine you can select the table you have just imported. Dakota will then generate a surrogate, run an optimization on it and return the predicted optimum (or multiple pareto-optimal designs in case you have a multi-objective problem and specify "solutions considered" > 1). You can look at the predicted optima in the "finaldata" file in you result directory. 

The procedure described above is more like a work-around. Usually the idea is, to couple your simulation tool with CAESES and then have the predicted optima evaluated automatically through CAESES. The surrogate model would then be re-generated with the new variants which increases the accuracy of the prediction. The procedure then repeats... 

Cheers,
Heinrich

Share this post


Link to post
Share on other sites

Hi again,

 

thank you for your reply.

I am using 5.0.11 now. it provides more options which is nice.

then it seems I have a surrogate model then and I can see blue dots which are Pareto fronts.

Would you please tell me how can I plot 3D surface response?

 

Also I did not connect my simulation tool to the CAESES. I have input and simulated outputs. I can use these data (56 rows) in CAESES (without connecting it to the external simulation tool) to find the reasonable Pareto fronts, right?

 

Regards

 

Share this post


Link to post
Share on other sites

Hi Milad,

there is no option to visualize them currently -- we are definitely planning to introduce that at some point though.

The finaldata file (especially, if you choose a high number of "solutions considered") basically contains the points that lie -- according to the model -- on the pareto frontier. However, the results will definitely be improved a lot if you integrate your calculations into CAESES. The design engine would then automatically verify these candidates and add the new results to the model. This will not just increase the accuracy of the model, but it will do so particularly in the region of interest --> that' why we see such fast convergence with this optimization technique in many cases.

Cheers,
Heinrich

 

Share this post


Link to post
Share on other sites

Dear Mr. Heinrich von Zadow,

 

Hello again and thank you for your reply

 

I could get the suitable results for my work. 

 

Now I want to plot the Pareto fronts and other graphs in python and excel. Is there any way to export the results from CAESES to Excel?

 

Regards

Share this post


Link to post
Share on other sites

Hi Milad,

very good! Yes, you can export the content of tables to csv like this:

image.png.1e0c1973a506269ca106065d5f03094b.png

If you want to plat any of the other designs (i.e. the "finaldata" designs returned by dakota) you would have to do the formatting by yourself.

Cheers,
Heinrich

Share this post


Link to post
Share on other sites

Dear Mr. Heinrich von Zadow,

Hello again and thank you for your reply

I need some help regarding a Pareto fronts obtained from the Dakota code.

I have used LHS to generate 2000 samples, and then I used Dakota with Kriging approximation based on LHS samples to generate a surrogate model. the graph shows less points and Pareto fronts, why after running the Dakota we cannot see those 2000 points anymore. It seems Dakota somehow select some points based on some algorithm and remove other points. How can I explain this in my report?

Please see the attached pictures.2121.jpg.68a46827d6bbcff458262bcb78cee941.jpg

Best Regards21212.jpg.4baaa1f2132d78aaea54df4143cbed91.jpg

Share this post


Link to post
Share on other sites

Hi Milad,

I am not quite sure if I understand the question. You mean that out of the 2000 LHS samples only a few are shown after you have calculated the pareto designs? Do you create the plots in Excel and add the pareto designs from the finaldata file?

Cheers,
Heinrich

Share this post


Link to post
Share on other sites

Hi,

Yes, out of 2000 samples from LHS, only fewer points are shown in Kriking.

What I did is:

2000 samples with LHS

then, running the Dakota (Kriking) and I ticked the LHS before running.

after that, there are not 2000 points but less.

Regards

Share this post


Link to post
Share on other sites

What exactly did you do when "running Dakota". Did you run an optimization or just calculated one set of pareto designs? Could it be that the blue dots in the second plot are additional samples that where generated before the generation of the first Surrogate?

 

Share this post


Link to post
Share on other sites

Hi again,

I believe the Dakota code somehow hide some of points after running the simulation.

I have used the LHS to simulate 2000 samples. Then I used those 2000 points for Kriging surrogate model. The Pareto front looks good but with fewer points than LHS.

I want to know this is normal or I missed something?

 

Regards

Share this post


Link to post
Share on other sites

Dear Milad,

If I understand correctly, then yes, that is perfectly normal. The 2000 LHS samples is what you use to train the model. If you'd evaluate your model at these exact points, the prediction would perfectly match the training data (at least for Kriging that is the case). However, the model cannot just predict a pareto front "out of the blue". Usually, what we do is, to run a MOGA (multi objective genetic algorithm) optimization on the model. With large enough populations sizes and number of generations this allows to quickly find pareto-optimal designs (that means that for those designs there is not other designs better in one objective without being worse in an other objective). 

Best regards,
Heinrich

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...