Jump to content
Mr. Alexandros Priftis

Dakota incremental LHS function

Recommended Posts

Hello,

 

After reading Dakota manual, I have noticed there is the possibility of running a sampling method (LHS) which can be incremental, i.e. first run can contain e.g. 50 samples and then I could use those samples to expand the results to double the initial amount (that would mean to 100) by only evaluating 50 more samples, but keeping the correct correlation etc. between all 100 results. That can be done by specifying a .rst file in the file which initiates Dakota (e.g. dakota -i input100.in -r dakota.50.rst) (Dakota 6.7 manual p. 78). However, since Dakota is initiated by pressing the 'run' button in CAESES, I was wondering if the above can be done by writing some extra lines in the input file read by Dakota, or in any other way...?

 

Thanks!

 

Alex

Share this post


Link to post
Share on other sites

Hi Alex,

 

I have to dig into it a bit deeper to give you a comprehensive answer. But one thing you could readily try is:

 

  • Run a study with 50 samples
  • Afterwards, change the number of samples to 100 for this design engine
  • Run it again

 

Since the second run has the same seed in the input file, CAESES will detect the existing 50 samples (recycling is activated). These won't be evaluated again, they simply show up in the new table again as recycled designs. The new 50 designs are then added to this run (and get evaluated). This "keeps" the original structure of the LHS run. 

 

The other option with the restart is basically simple and should not be a big deal, but since we run Dakota with a specific (fixed) call, this might not work out of the box.

 

Maybe you can check my suggestion first and give some feedback.

 

Best regards

Joerg

Share this post


Link to post
Share on other sites

Hello Joerg,

 

thanks for your reply! I had already tried what you proposed but it seems that once the initial samples number changes, the functionality of 'seed' option resets, i.e. it only works between two or more runs when the number of samples remains the same. I thought of adding the 'refinement_samples' option though under the method block and it did work (in conjunction with the use of an existing result pool)!

 

If I understood correctly, this only works when a sampling method (in this case LHS) is used and the variables are uniform_uncertain. Do you know if it is possible to do that using a DACE method (again LHS), in which case the variables are continuous_design? Or that would be only answered by Dakota? TBH, I am not sure it is even possible to do that (maybe because of the way DACE work...?).

 

Cheers,

 

Alex

Share this post


Link to post
Share on other sites

Hi Alex,

 

Yeah you are right, maybe I was a bit too fast with my reply. Sorry for confusing you. Indeed, the number needs to be the same for the Dakota LHS case, to make use of the result pool - which then does not result in what you need. I have been thinking of e.g. our Sobol algorithm which works as described before. The attachment shows this behavior for the Sobol run (run with 10 designs, and again with 20 where the first 10 are recycled - indicated by a different icon). post-8-0-76475400-1538656005_thumb.png

 

But ok, for the Dakota we'll have to find a different way. I guess this will take a little of effort in our code base, i.e. how we trigger Dakota. It needs some more options in the CAESES GUI for the user.

 

You said it did work, if I understood correctly. Can you share more information about what you did i.e. the steps, and possibly the templates you used? That would probably help as well. 

 

I would recommend that if you have more Dakota-related questions, you can make use of their email list, i.e., get in touch with them directly. Sure, feel free to update this ticket/forum with any news. I am sure other users can benefit of it, too. Does this variable type restriction limit you somehow? 

 

Thanks

Joerg

 

 

Share this post


Link to post
Share on other sites

Hi Joerg,

 

I suppose one way would be to run Dakota as an external application (not sure how Dakota runs outside CAESES, but if I understand correctly, it should be batch mode or similar?), but then CAESES functionality regarding presentation or results etc. is lost...?

 

Anyway, I am uploading a sample file where I used an example shown in Dakota manual (Rosenbrock test problem). First I used the "Sensitivity Analysis" template included in CAESES (that means sampling, LHS method used), and ran 10 samples (Dakota_01). Then I used a variant of "Sensitivity Analysis" where I just added a line in the .in file. Tried to upload the .in file here but it doesn't let me do so. Basically, everything is the same, but the method block looks like this (added the refinement_samples option):

 

method
  sampling
  sample_type lhs
  <samples, unsigned, 10, Samples, number of samples>
  <refinement_samples, unsigned, 10, Refinement Samples, number of samples>
  seed = 12345
 
Then, I ran Dakota using this updated template, choosing the option to use the result pool of Dakota_01. Samples value remains the same (10) and refinement samples have to be same number as the initial (that is 10) so that in the end 20 samples are created, 10 existing (from Dakota_01) and 10 new; all presented in Dakota_02.
 
As far as my last question is concerned, I would be interested in getting the same function using different kind of variables, but having read the manual in more detail since my last post here, I see that uniform_uncertain means that each variable is only characterised by an upper and lower value and no special distribution is considered - that means the probability of attaining an value between those bounds is equal...? Which could potentially be used for a design of experiment to use its results as a base to a response surface definition.
 
In any case I will contact Dakota directly if I have more specific questions on that topic and keep this topic updated.
 
Cheers,
 
Alex

Test.fdb

Share this post


Link to post
Share on other sites

Hi Alex,

 

Interesting, thanks a lot for this good input. I haven't used the incremental option so far within the CAESES GUI. Of course, Dakota is a batch tool so you could potentially run in separately, but then the workflow would be different where CAESES is potentially also triggered in batch mode. All the variant management of CAESES is then not available. So your proposal is a reasonable one from what I can guess right now. Thumbs up.

 

We often use LHS as a first step and as input for response surface methods (RSM). Note that CAESES 4.3.1 has a known problem with recycling samples within RSM creation. This is fixed in the upcoming version. If you want to try it out, get in touch with us directly and we can provide you a snapshot or beta version. But it will be released soon anyway ...

 

Best regards

Joerg

Share this post


Link to post
Share on other sites

Thanks! I will keep it that way for now.

 

What problem would that be...? As a first step, I was planning to do something similar to what you have already tried (https://www.caeses.com/blog/2017/how-to-create-a-response-surface-in-4-easy-steps/). Is this way affected by that issue? In any case I need some time to run the required simulations related to the design of experiment I am planning to do so the new version will probably be available by then.

 

Cheers,

 

Alex

Share this post


Link to post
Share on other sites

The recycling does not work properly for the RSM when you try to re-use the samples from a previous run. This is an issue that came up with newer versions of Dakota. 

 

Let us know as soon as you are ready to run optimizations on response surfaces based on your generated samples. Then we can check again.

 

 

Best regards and good luck for your DoE,

Joerg

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...