ParX

ParX Models

The models presented below are full working samples. You can copy and paste them into a .parx file and load them into ParX. Measurement data is provided for most model samples as well. The data should be downloaded to a .json file. ParX can then be used to convert the data to a .csv file, if so desired.

The models range from the trivial to the highly complex. But complexity is not always determined by the number of equations or even the number of parameters. Discontinuities, extreme value ranges and lack of precision are far more problematic. When formulating the model it pays to avoid these traps. Some countermeasures are demonstrated in the samples.

The intermediate variables are respected during model evaluation. A strategic choice of intermediates can greatly improve the numerical quality of the model.

The numerical methods employed for extracting the model parameters also require the first-order derivatives of the equations with respect to the variables and parameters. These are derived in analytical form by the model compiler. Here the choice of intermediates plays an even greater role.

Many of the special functions employed in the model equations do not allow the complete set of real numbers as their input. The sqrt and log functions come to mind, but also a division by zero. Normally, the model would not stray there during normal operation, but while solving the equations, the algorithms can and will try values for the variables and parameters that will cause the evaluation of the model equations to fail. The algorithms are designed to handle these failures gracefully, so it is usually not required to limit the variables and parameters in the model declaration.

The limits in the model declaration are intended to solve another problem, that of multiple solutions. They can be used to delimit the “collection region” of the intended solution, though their effect is often counterintuitive. So use them sparingly, and never to enforce a physical interpretation on a variable or parameter. This is the main cause of the extraction-error: “No better solution can be found”.

Since ParX provides an animated plot of the model curves, use it to find good initial values for the parameters. Optimization of non-linear equations is a hard problem, and any help is always appreciated.

A worked-out example is provided in Test Sample.