English Français

Documentation / User's manual in Python : PDF version

XI.3. Using minimisation techniques

XI.3. Using minimisation techniques

Warning

This method is fully relying on the Relauncher architecture so the only constructor available is the runner one (discussed in Section XI.2.3.1). This means there is no constructor based on TCode or function (respectively described in Section XI.2.3.2 and Section XI.2.3.3). This is explained as this method is a using the Nlopt-algorithm bank, introduced in Chapter IX but also the Vizir package for multi and many criteria algorithm.

Even though the theory behind this method is not revolutionary, these methods are interested and are, historically and conceptually, the simplest one, one can think of. Because of the way it has been organised, it can be used with all Relauncher assessors and can call all NLopt algorithms along with the Vizir ones. This is explained in Section XI.3.2.

XI.3.1. Constructing the instance

As stated above, the only constructor available is the one whose prototype contains an instance of TRun-inheriting object. This approach allows a simple way to change the evaluator (to pass from a C++ function to a python's one or a code) but also to use either a sequential approach (for a code) to a threaded one (to distribute locally the estimations).

The constructor in this case, should look like this

# Constructor with a runner
TMinimisation(tds, runner, ns=1, option="")

It takes up to four elements which are:

  1. tds: a TDataServer object containing only an attribute for every parameter to be calibrated. This is the TDataServer object called tdsPar, defined in Section XI.2.1.

  2. runner: a TRun-inheriting instance that contains all the model information and whose type is defining the way to distribute the estimation: it can either be a TSequentialRun instance or TThreadedRun for distributed computations.

  3. ns: the number of samples to be produced. This field does not apply here.

  4. option: the option that can be applied to the method. The option common to all calibration classes (so those defined in the TCalibration class) are discussed in Section XI.2.3.4.

The key step in this constructor is the TRun-inheriting instance creation. As already stated, its type is giving the lead on the way to distribute the estimations. When one is constructing such an object, it is done by passing an evaluator, whose list is already largely discussed in Section VIII.3.

XI.3.2. Setting the optimisation properties

Once the object is constructed, the optimisation properties must be set, to decide which algorithm must be used. This can be precised by calling the setOptimProperties, whose prototype is the following:

# Prototype for nlopt or vizie
setOptimProperties(solv, option="")

In both cases, the option field is there if some option shows up at some point, even though so far it is useless. There is only one difference between these two prototype: the kind of solver to be used knowing that the minimisation will be done on the distance function value disregarding the number of parameter to calibrate.

Once the optimisation solver is chosen and configured, is provided to the TMinimisation instance, which we'll create automatically the optimisation master depending on the nature of the solver:

TNlopt

This is the optimisation master used for any TNloptSolver instance. An example can be found in Section XIV.12.1.

TVizir2

This is the optimisation master used for any TVizirSolverShare instance. Even though the optimisation will remain mono-criterion, this might be useful for some intricate issues, as discussed in Section XIV.12.6.

As shown in the latter example, it is possible to get a hand at the optimisation master by calling the getOptimMaster method. This method returns a pointer to the TOptimShare-newly created instance. This might be useful to set some properties (for instance the tolerance).

Apart from the discussion above, there are no specific options and methods in the TMinimisation class, and more information on method can be found in Section XI.2. Examples are also provided in the use-case sections (see Section XIV.12), particularly one can have a loot at the residue distributions both a priori and a posteriori for a point-estimation, which are shown in Figure XIV.96.

/language/en