[ot-users] constraint error FORM

regis lebrun regis_anne.lebrun_dutfoy at yahoo.fr
Wed Mar 15 11:25:06 CET 2017

Hi Anita,

Here is how things are computed:
+ When you call FORM::run(), there is a call to Analytical::run(), then the AnalyticalResult is converted into a FORMResult.
+ The method Analytical::run() converts the event into a StandardEvent, which is used to build an OptimizationProblem formulated into the standard space. This optimization problem (minimize the squared norm of u subject to f(T(u)) >= s, assuming that your event is a threshold exceedance) is solved by the solver you provided up to the tolerances you wanted.
+ The corresponding OptimizationResult is stored into the AnalyticalResult, it is what you get when you call AnalyticalResult::getOptimizationResult() or FORMResult::getOptimizationResult(). You can then call 
+ The optimal point, found in the standard space, is also transformed back to the initial space. You get it when you call FORMResult::getPhysicalDesignPoint()

The most surprising thing in your problem is the fact that the value you get is *exactly* the correct value up to a shift of *exactly* 0.1. It looks like a kind of finite difference step has been added somewhere or something in the same spirit.

Could you please tell me the optimization solver you used for the computation? If there is a bug somewhere, it may be there, as the different error history are rebuilt after the resolution of the problem and not directly given by the algorithm.

Do you have something equal to 0.1 in your script?



De : Anita Laera <anita.laera87 at gmail.com>
À : regis lebrun <regis_anne.lebrun_dutfoy at yahoo.fr> 
Cc : "users at openturns.org" <users at openturns.org>
Envoyé le : Mercredi 15 mars 2017 9h47
Objet : Re: [ot-users] constraint error FORM

Hi Regis,
thank you for your reply.

I am going to explain how I address this problem, to understand if it is correct.

I have five input parameters and, every time the function _exec(x) is executed, I print the value of each variable and the result obtained from that combination of input values. The values I print are in the physical space.
At the end of the FORM analysis, I get the value of the design point in the physical space and I search for that combination of parameters in the list of printed input variables. The result associated to these parameters is the one that I compare with the threshold to calculate the constraint error.

To make an example with numbers, I have 5 input parameters with distributions:
param_1 = TruncatedNormal(20, 1, 16, 24)
param_2 = TruncatedNormal(17.5, 0.88, 14, 21)
param_3 = TruncatedNormal(20, 1, 16, 24)
param_4 = TruncatedNormal(20, 1, 16, 24)
param_5 = TruncatedNormal(20, 1, 16, 24)

The threshold of the criterion I have chosen is 850.

Every time _exec() is called (at each evaluation), I have a list of input parameters and the corresponding result, for example:
[20.0673673248819, 17.3184136978776, 19.9079471477259, 20.1402093633652, 20.0223766740268] and the result is [825.665964705004]

At the end of the analysis, the design point is:

standard_space_point: ['param_1 = 0.1997867549606676', 'param_2 = -0.055279300017051544', 'param_3 = -0.0628992654226241', 'param_4 = 0.5183599165842491', 'param_5 = -0.10839510883000002']

physical_space_point: ['param_1 = 20.199773930262452', 'param_2 = 17.451357610548104', 'param_3 = 19.937104724030977', 'param_4 = 20.518323977607277', 'param_5 = 19.89161178413688']

I take the values corresponding to the physical space point and I find the corresponding result, i.e. 845.307471892986. Does this correspond to f(x_opt)?
Then I calculate the constraint error as |845.307471892986 - 850| = 4.692528107014

Is this the correct procedure? If not, how do I get the constraint error without using getConstraintError()?
In this example, the value that is returned by getConstraintError() is 4.59252810701402 and I want to understand how this is calculated.

Thank you in advance for your time and your help!

2017-03-14 17:48 GMT+01:00 regis lebrun <regis_anne.lebrun_dutfoy at yahoo.fr>:

Hi Anita,
>You are right, the constraint error is an obsolute error on the constraint. It is equal to |f(x_opt) - s| = |f(T(u_opt)) - s| where f is your code, T the inverse iso-probabilistic transformation that maps the standard space into the physical space, u_opt the design point (so in the standard space) and x_opt = T(u_opt) its image in the physical space.
>Are you 100% sure that you compute f at the correct point in your verification? If you compare f(u_opt) with s, it is wrong (and I suspect that you did it ;-)). Otherwise there is a bug and we need more input from your side in order to catch it.
>______________________________ __
>De : Anita Laera <anita.laera87 at gmail.com>
>À : users at openturns.org
>Envoyé le : Mardi 14 mars 2017 15h25
>Objet : [ot-users] constraint error FORM
>Hi all,
>I have a simple question regarding the constraint error of a FORM analysis, the constraint error is defined as |f(u_n) - s| , i.e. the absolute difference between the result and the threshold.
>In my case, the result in the design point is 845.307471892986 and the threshold is 850 (in the physical space).
>I would expect the constraint error to be about 4.69, but the value obtained with the method getConstraintError() is 4.59. Why?
>If I calculate the difference between the result and the threshold for each performed evaluation, I never find 4.59.
>Could it be different because it is calculated in the standard space u? How could I verify the value?
>Thank you for your time!
>______________________________ _________________
>OpenTURNS users mailing list
>users at openturns.org
>http://openturns.org/mailman/ listinfo/users

OpenTURNS users mailing list
users at openturns.org

More information about the users mailing list