hi, i have some questions with regards to the above.
i am able to record a macro while running the solver manually, and it is not too difficult understanding the codes. however, i do not know how to modify it to fit the following scenario:
- sheet1 contains the model function that i want to fit, with the model outputs in M1:M10
- sheet 2 contains the data points that i want to optimise against. for instance, my data is divided into sets of 8, whereby each set occupies 8 vertical cells, ie A1:A8 is 1 set, B1:B8 is the next set, and so on, until XFD1:XFD8, then the next set would occupy A9:A16, and so on.
- the quantity that has to be minimized is the sum of the squared residues between the model and data, and this quantity is placed in a cell in sheet1 (together with the model), say on M11
- there are 8 parameters to be optimised. lets call these p1, p2...p8
my questions are, how do i make the solver run iteratively (i suppose using a Do Until loop) through all the data sets on sheet2, and then output the parameters on separate sheets (ie p1 on sheet3, p2 on sheet4 etc)?
on a side note, i realise that it takes about a second for 1 solver run, when executed manually. can i linearly extrapolate this to say that it takes 1 hr to run solver 3,600 times? if so, it is mightily slower compared to, say a C program that does the same thing.
thanks for any help!
Bookmarks