How to run parameters optimization for my model using the GPU

3 Ansichten (letzte 30 Tage)
Emanuel Crespo
Emanuel Crespo am 6 Jun. 2019
Kommentiert: Emanuel Crespo am 8 Jun. 2019
Essentially, I have a model with given a set of parameters is able to calculate different thermodynamic properties for different compounds, let's say liquid densities and vapor pressures for example.
When I want to regress the model parameters (e.g. a,b,c,d,e) by fitting data for different compounds, I usually do a lot of sequential operations that I am sure I can easily improve their efficiency. I am thinking about multiobjective optimization or even better-using GPU or multicores of the CPU. But I am a bit lost on where to start from reading just the documentation.
So within my objetive function I usually have something like:
[fval]= objective_function(a,b,c,d,e)
input_comp1=f(constants,a,b,c,d,e)
input_comp2=f(constants,a,b,c,d,e)
exp_density1=load some text file or so.
exp_density2=load some text file or so.
exp_vaporpressure1=load some text file or so.
exp_vaporpressure2=load some text file or so.
densities_1=density(a,b,c,d,e,input_comp1)
vapor_pressures1=vapor_pressures(a,b,c,d,e,input_comp1)
densities_2=density(a,b,c,d,e,input_comp2)
vapor_pressures=vapor_pressures (a,b,c,d,e,input_comp2)
ARD_d1=expression for deviations between experimental and calculated values for density of comp.1
ARD_d2=...
ARD_p1=...
ARD_p2=...
fval= ARD_d1+ARD_d2+ARD_p1+ARD_p2
Which is then evaluated by something like fminsearch but I have also used others in the past, fminsearch worked the best for me. When I do this for just one component It works fast enough for my purpose (but I am a patient man). But now I've extended the model in a way that I need to regress parameters simultaneous from more than one component and it becomes impossible.
I am quite sure this way of doing the calculations can be improved because I can run the calculations for the different compounds simultaneous instead of doing them sequentially, and then evaluate fval when the calculations for all components are done. But how?
  3 Kommentare
Matt J
Matt J am 8 Jun. 2019
@Emanuel,
Are the number of parameters and data points always the same across the set of regressions you are trying to do?
Emanuel Crespo
Emanuel Crespo am 8 Jun. 2019
@Joss Knight fminsearch does not support useparallel but assuming I could use other optimization routine, I could try to have a parfor cycle that goes between 1 to the number of different components to which I want to fit my parameters. But I am not sure if that will work.
@Matt J The number of parameters is the same with those 5 or 6 parameters I know everything to calculate any component. However, the number of experimental data points may differ between components. But assuming I can decide to use the same number of data points for each component. I am not understanding why would that be helpful? Can you please ellaborate on it?
Thank you

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

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

Produkte


Version

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by