Scale-up Suite Help
Fitting runs slowly
Fitting > Troubleshoot fitting > Fitting runs slowly

If Fitting runs slowly, there could be several reasons:

 The model runs slowly in Simulator

Some models contain very rapid changes in the species concentrations or other variables being integrated by the solver. The solver will therefore need to take very small timesteps to capture these rapid changes, which results in a longer run time.

Typical examples include fast reactions (e.g. pH adjustment / neutralization, reactions with ionic equilibria); fast mass transfer (high kLa to ensure equilibrium between phases), models where phases appear or disappear. The variable causing the small timestep can be identified by viewing the Event Log in Simulator. This should give an indication of the source of the problem.

To correct this try modifying the model (either reduce very large parameter values or simplify the model). If this cannot be done, then some other options are available to reduce run times:

  1. Try another Simulator solver / integration method. Occasionally the default solver (Rosenbrock) is slower or less robust than one of the other solvers. Try running in simulator with a different solver. If significant speed-ups are obtained by changing solver, this solver can be selected in the fitting exercise using the advanced options window.
  2. Try reducing Simulator solver accuracy in the Advanced Options window (click  to open). As a rule, the higher the accuracy, the longer the solver run time will be. It may be possible to reduce the solver accuracy without affecting the solver results significantly. This will normally have only a small effect on the run time, but in some cases can be significant.
 Too many Scenarios have been selected

The more scenarios are selected for fitting, the longer the time for each fitting iteration as each selected scenario requires a proportional increase in run time per fitting iteration. In order to reduce the overall time for fitting, it is recommended to begin fitting with one scenario. This will enable good estimates of the parameters, which will then speed up fitting when other scenarios and data are included.

 Too many parameters have been selected

As with scenarios, the more parameters selected, the longer the run time will be. One of the temptations of automated fitting is to select too many parameters. This will normally result in a slow run, and large confidence intervals on parameters (i.e. there is not enough information in the experimental data to fit all of the selected parameters). Try to keep the number of parameters to be fitted low (e.g. less than 8 if possible). Alternatively, do the fitting exercise in stages, selecting a few parameters at a time to fit (this will refine the initial guesses for these parameters) before fitting all parameters. For example, fit the main reaction first (this will dominate the mole balance) before fitting the impurity-forming reactions. A sensible strategy for fitting can significantly reduce the time taken in fitting parameters and, in many cases, it will be the only method that results in success.