If you do not have a cost formula to maximize or minimize, use NLSOLVE to solve the system of constraints formulas for the unknown model parameters.The final step is to solve for the optimal model parameters that will satisfy your constraints formula (i.e., drive their values to zero). The only requirement is that when referencing any value or range of values in the initial solution result in your constraint formulas you must do so using the auxiliary function DYNVAL.ĭYNVAL is a dummy function that simply returns the value of its argument but in this context, it ensures that its argument is dynamically evaluated during the optimization. On the other hand, if your initial solution is an array result (e.g., ODE or PDE solution), you can still define arbitrary formula constraints on a single or a range of values in the result array. If your initial solution is a single value (e.g., an integral evaluation) you can reference it directly in your constraint formulas. Typically you specify a constraint formula in the following form: NLSOLVE interprets equality constraints in relation to zero and inequality constraints in relation to greater than or equal to zero. The next step is to define constraint formulas to penalize the deviation of your initial solution from your target value. Your design parameters can be any parameters that influence the system behavior including coefficients, bcs, initial values, etc. Instead of just hardcoding their values into your model formulas. Make sure to use variables with initial reasonable values for the model parameters you want to optimize Solve your model as you would normally do using the relevant calculus solvers. If you have learned how to obtain a solution with the calculus functions, you are almost done! Setting up a parameter or dynamical optimization problem is straightforward with just a couple more steps: You can combine ExceLab calculus functions with either native Excel Solver or NLSOLVE to solve a variety of parameter estimation and dynamical optimization problems. Solving Dynamical Optimization Problems in Excel
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |