Tag management for uncertain parameters

I would like to couple persalys with an external calculation code. I have two questions…

  1. In my input file, a token @L@ is linked with un length variable L. I would like to reuse the value of the variable L to initialize another variable of my input file.
    DOes someone know if it is possible?
  2. Is it possible to deal with categorial variables?
    Best regards

Hello,

  1. If I understand correctly, you have a variable, let’s say X which is computed using the variable L. And this variable X is an input that should appear as a token in a input template file ?
    If this is right, the way to do it is to create a first command without any command but with a post processing function that will take L as input and return X

    def my_func(L):
        # evaluate X
        X = L + 3
        return X
    

    In the 2nd command, you can use the inputs AND the outputs of the 1st command as input of this 2nd command so in your template you can use both variable.

  2. In persalys you can define discrete random variables, so you can use it to model your categorical variables. However, the categorical variables should be defined as numerical values (integer in this case). But some methods (sensitivity and reliability) might not work properly with this kind of distributions.

Best regards,
Antoine