![]() This cell will display the delta between your experimental value and the theoretical value. Therefore, all you need to do is to insert the formula =ABS(J25-K25) in another cell. I'm not really sure you need to do this in VBA, as what you're looking for is exactly what the Solver ought to do - modify a set of parameters so that something else is maximized/minimized! IntTolerance:=1, SolveWithout:=False, MaxTimeNoImp:=30 :=False, RequireBounds:=True, MaxSubproblems:=0, MaxIntegerSols:=0, _ SolverOptions PopulationSize:=100, RandomSeed:=0, MutationRate:=0.075, Multistart _ :=0.00001, StepThru:=False, Scaling:=True, AssumeNonNeg:=True, Derivatives:=1 However, the macro compiles fine with no errors. ![]() ![]() When I run the following VBA code my parameters in $C$4, $C$5, $C$6 do not change from their initial values. My parameters that need to be optimized are $C$4, $C$5, $C$6 My theoretical value (calculated based on my model equations) is $J$25. ![]() However, I want to iterate this solver for loop (loop inside a loop) until the error in the experimental value and the theoretical value is less than some target value. I use Solver for each parameter, one at a time, in a for loop. I am trying to optimize three parameters in Excel in order to minimize the error between a experimental value and a theoretical value.
0 Comments
Leave a Reply. |