0

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?

rinkert
  • 6,593
  • 2
  • 12
  • 31
ECrespo
  • 135
  • 1
  • 1
  • 8
  • Do you have the Parallel Computing Toolbox? What GPU do you have? – dweth Jun 06 '19 at 17:23
  • Yes I have all the toolboxes. I can either use my PC in the office which has a 1060 or probably try to run code in the cluster of the institute. – ECrespo Jun 07 '19 at 11:09

0 Answers0