Please Note. Pre ExceLab 7.0 versions utilized criterion functions ARRAYVAL, ODEVAL and PDEVAL for imposing constraints on array results.
These functions have been deprecated and are no longer supported in ExceLab 7.0 or later. You can now define arbitrary constraint formulas
on the array result by referencing any value or range of values in the array result in your constraint formulas by using DYNVAL.
DYNVAL is a dummy function that simply returns the value of its argument but in an optimization context, it ensures that its
argument is dynamically evaluated during the optimization.
A criterion function enables you to define a simple constraint formula on an array solution obtained by any of the differential equation’s solvers. A constraint formula typically computes the difference between a value from your obtained solution and your desired value. Once you have defined all necessary constraint formulas, you can use NLSOLVE to solve the system of constraints formulas to obtain optimal values for the model parameters which can include any parameters that influence the system behavior.
NLSOLVE interprets (equality and inequality) constraints formulas in relation to zero. You can specify a criterion constraint formula in the following form:
= Criterion function value – Target Value
Let the array below represent the results of an initial value problem simulation using IVSOLVE.
to constrain the value in B5 (which corresponds to the value of Disp at Time =0.3 to be 0.5.
=DYNVAL(B5) - 0.5
to constrain the value of the variable Disp at Time=0.35 to be 0.6.
=INTERPXY(A2:A12, DYNVAL(B2:B12), 0.35) – 0.6
In a parametric optimization, NLSOLVE will find optimal values for your design parameters that will drive your defined constraints to zero.