Parallel computing workers overwrite each other files in optimization

4 Ansichten (letzte 30 Tage)
Ehsan
Ehsan am 6 Mai 2015
Beantwortet: Matt J am 12 Okt. 2017
Hello everybody, I am trying to optimize a function, the function do the following steps:
  1. get the parameters from the optimizer
  2. write the parameters to a file
  3. recall another program to do the simulation
  4. load the the result file to matlab
  5. calculate the objective function for the optimizer.
The problem is when matlab do this process simultaneously in parallel optimization, the files keep overwriting each other, I tried to make a different folder for each worker and put all of files in each folders but then I don't know how to put different objective functions in this folders, because objective function m-file must be in same folder with other files to make the simulation happen!? I will be very appreciated if you give me some ideas, thank you very much.

Antworten (1)

Matt J
Matt J am 12 Okt. 2017
because objective function m-file must be in same folder with other files to make the simulation happen!?
I don't see why it should. Can't you specify paths when saving files?

Kategorien

Mehr zu Problem-Based Optimization Setup finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by