Error in Morris criblage

Hi
I just had a problem with Morris Criblage
I built a symbolic model (about 40 input parameters for 10 outputs)
A single direct evaluation works

I set min/max value for all input parameters, 10 initial points (= 10 trajectories) and 4 levels
but when I ran the morris experiment I had an error
“you are requiring 10 trajectories whereas number of possibilities is zero”

I check my inputs : min value is always < max value

I join a screen copy

image

I do not understand why it doesn’t work

my symbolic model is very basic (strictly linear)

could you help me please ? thanks a lot !
Flore

Hello Flore,

It would help to have the model and the screening settings, could you export it to python ? (right click on the study name, then choose Export Python)

Ok I export my model in a python script
how to send it ? or just copy it entirely here ?

You can paste it between triple back quotes

Also what version of persalys do you have ? This may have been fixed in version 10.0.8

Persalys Version 9.0.3

“”"
#!/usr/bin/env python

coding: utf-8

from future import print_function
import openturns as ot
import persalys

study_flore = persalys.Study(‘study_flore’)
persalys.Study.Add(study_flore)
P1 = persalys.Input(‘P1’, 0.34, 'Plane_Cathode.HConcavite
')
P2 = persalys.Input(‘P2’, 7.3, 'Plane_Cathode.RC_cathode
')
P3 = persalys.Input(‘P3’, 2.26, 'Plane_Cathode.Rext1
')
P4 = persalys.Input(‘P4’, 2.11, 'Plane_Cathode.Rext2
')
P5 = persalys.Input(‘P5’, 6.72, 'Plane_Anode.LCathodeAnode
')
P6 = persalys.Input(‘P6’, 0, 'Plane_Anode.RDecentrage
')
P7 = persalys.Input(‘P7’, 15, 'Plane_Anode.ADecentrage1 (Rotate about X)
')
P9 = persalys.Input(‘P9’, 0, 'Plane_Anode.Aparallelisme (Rotate about Z)
')
P10 = persalys.Input(‘P10’, 1.3, 'Plane_Anode.RsectionAnode1
')
P11 = persalys.Input(‘P11’, 2.8, 'Plane_Anode.RextSectionAnode1
')
P13 = persalys.Input(‘P13’, 0.47, 'Plane_Anode.RsectionAnode2
')
P14 = persalys.Input(‘P14’, 60, 'Plane_Anode.AngleRetrecis
')
P15 = persalys.Input(‘P15’, 1, 'Plane_Anode.LAnodeTube
')
P16 = persalys.Input(‘P16’, 0.95, 'Plane_WehneltGrille.LCathodeGrilleWehnelt
')
P17 = persalys.Input(‘P17’, 0, 'Plane_WehneltGrille.RDecentrageGW
')
P18 = persalys.Input(‘P18’, -75, 'Plane_WehneltGrille.ADecentrage1 (Rotate about X)
')
P20 = persalys.Input(‘P20’, 0, 'Plane_WehneltGrille.AParallelismeGW (Rotate about Z)
')
P21 = persalys.Input(‘P21’, 2.85, 'Plane_WehneltGrille.RintAxe
')
P22 = persalys.Input(‘P22’, 0.15459, 'Plane_WehneltGrille.EpaisSupportG
')
P25 = persalys.Input(‘P25’, 3.9, 'Plane_WehneltGrille.RW1axe
')
P26 = persalys.Input(‘P26’, 4.6, 'Plane_WehneltGrille.RW2axe
')
P27 = persalys.Input(‘P27’, 5.215, 'Plane_WehneltGrille.RW3axe
')
P28 = persalys.Input(‘P28’, 0.5, 'Plane_WehneltGrille.RcBW
')
P29 = persalys.Input(‘P29’, 0.97, 'Plane_WehneltGrille.LongBW2
')
P30 = persalys.Input(‘P30’, 0.51, 'Plane_WehneltGrille.HconcaviteGrille
')
P31 = persalys.Input(‘P31’, 7.15, 'Plane_WehneltGrille.RcGrille
')
P32 = persalys.Input(‘P32’, 2.35, 'Plane_WehneltGrille.RextGrilles
')
P33 = persalys.Input(‘P33’, 0.04, 'Plane_GrilleShape.EpaisBar1
')
P34 = persalys.Input(‘P34’, 0.04, ‘Plane_GrilleShape.EpaisBar2’)
P35 = persalys.Input(‘P35’, 0.04, ‘Plane_GrilleShape.EpaisBar3’)
P36 = persalys.Input(‘P36’, 0.04, ‘Plane_GrilleShape.EpaisBar4’)
P37 = persalys.Input(‘P37’, 0.04, ‘Plane_GrilleShape.EpaisBar6’)
P38 = persalys.Input(‘P38’, 0.775, 'Plane_GrilleShape.Rint1
')
P39 = persalys.Input(‘P39’, 0.815, 'Plane_GrilleShape.Rint2
')
P41 = persalys.Input(‘P41’, 0, 'PlaneTubeRFIn.RDecentrageTube (Rotate about Z)
')
P42 = persalys.Input(‘P42’, 0, 'PlaneTubeRFIn.AParallelismeTube (Rotate about X)
')
P44 = persalys.Input(‘P44’, -30, 'PlaneTubeRFIn.ADecentrage1
')
P45 = persalys.Input(‘P45’, 0.5695, 'CylinderTubeInteractions.RSectionTube
')
P47 = persalys.Input(‘P47’, 3.63, 'Plane_Anode.LFrontanodeSupport
')
P48 = persalys.Input(‘P48’, 10.5, 'Plane_Anode.LSectionAnode
')
P49 = persalys.Input(‘P49’, 33.273, 'Plane_WehneltGrille.AngleWehnelt
')
P50 = persalys.Input(‘P50’, 1.52, 'Plane_WehneltGrille.LongBW1
')
P61 = persalys.Input(‘P61’, 80, 'potential wehnelt potential [V]
')
P65 = persalys.Input(‘P65’, 8800, 'potential anode potential [V]
')
P51 = persalys.Output(‘P51’, 'main results Elapsed time during simulation [seconds]
')
P51.setValue(9.9)
P52 = persalys.Output(‘P52’, 'main results Elapsed time during solving [seconds]
')
P52.setValue(25.13)
P53 = persalys.Output(‘P53’, 'main results Elapsed time during mesh edition [seconds]
')
P53.setValue(65.22)
P54 = persalys.Output(‘P54’, 'Beam characteristics CurrentAll [mA]
')
P54.setValue(-71.99541)
P55 = persalys.Output(‘P55’, 'Beam characteristics BeamWaist R95 [mm] (min)
')
P55.setValue(25.235)
P56 = persalys.Output(‘P56’, 'Beam characteristics BeamWaist R95 Pos [mm]
')
P56.setValue(0.16)
P57 = persalys.Output(‘P57’, 'Body current on grille Ih [mA] (total for selected)
')
P57.setValue(1.59)
P58 = persalys.Output(‘P58’, 'Body current on anode Ih [mA] (total for selected)
')
P58.setValue(-25.8005)
P59 = persalys.Output(‘P59’, 'Body currents on helix Ih [mA] (total for selected)
')
P59.setValue(48.923)
P69 = persalys.Output(‘P69’, 'Beam characteristics BeamWaist R100 Pos [mm]
')
P69.setValue(80)
P70 = persalys.Output(‘P70’, 'Beam characteristics BeamWaist R100 [mm] (min)
')
P70.setValue(8800)
inputs = [P1, P2, P3, P4, P5, P6, P7, P9, P10, P11, P13, P14, P15, P16, P17, P18, P20, P21, P22, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P41, P42, P44, P45, P47, P48, P49, P50, P61, P65]
outputs = [P51, P52, P53, P54, P55, P56, P57, P58, P59, P69, P70]
formulas = [‘P1+P2+P3’, ‘P4+P5+P6+P7+P9+P10’, ‘P11+P13+P14+P15+P16+P17’, ‘P18+P20+P21+P22’, ‘P25+P26+P27+P28+P29+P30+P31+P32+P33’, ‘P34+P35+P36+P37’, ‘P38+P39+P41’, ‘P42+P44+P45+P47’, ‘P47+P48+P49+P50’, ‘P61’, ‘P65’]
symbolic_model = persalys.SymbolicPhysicalModel(‘symbolic_model’, inputs, outputs, formulas)
study_flore.add(symbolic_model)
criblage_0 = persalys.MorrisAnalysis(‘criblage_0’, symbolic_model)
criblage_0.setTrajectoriesNumber(10)
criblage_0.setBounds(ot.Interval([0.33, 7.3, 2.25, 2.1, 6.68, 0, 15, 0, 1.29, 2.775, 0.46, 57.5, 0.95, 0.92, 0, -75, 0, 2.8, 0.1346, 3.895, 4.575, 5.165, 0.495, 0.9, 0.49, 7.1, 2.325, 0.03, 0.03, 0.03, 0.03, 0.03, 0.765, 0.81, 0, 0, -60, 0.5695, 3.63, 10.45, 32.283, 1.5, 72, 8650], [0.35, 7.32, 2.26, 2.11, 6.88, 0.02, 60, 1, 1.3, 2.8, 0.48, 62.5, 1.05, 1.01, 0.03, -30, 1, 2.85, 0.1646, 3.905, 4.625, 5.265, 0.505, 1.04, 0.53, 7.3, 2.35, 0.06, 0.06, 0.06, 0.06, 0.06, 0.78, 0.825, 0.03, 1, -15, 0.57, 3.65, 10.5, 34.283, 1.54, 92, 8800]))
criblage_0.setLevel(4)
criblage_0.setSeed(0)
study_flore.add(criblage_0)

“”"

my purpose is to generate the morris DOE with persalys
in order to launch these computations inside Ansys

Hello Flore,

I can confirm the script you provided works with persalys-10.0.8 and the bug you are facing has been fixed in the latest release

1 Like

thanks
I installed openturns v1.17 and otmorris v0.10
I managed to generate a MorrisExperimentGrid with level=k=4 for all inputs
I specify the bounds for each input with an ot.interval

“”"

Number of trajectories

r = 10

Define a k-grid level (so delta = 1/(k-1))

k = 4
dim = len(inputs_tokens)

premier plan experiences, avec le meme level pour chaque parametre d’entree

experiment1 = otmorris.MorrisExperimentGrid([k] * dim, inputs_interval, r)
morris_sample1 = experiment1.generate()

“”"

After that I tried to generate MorrisExperimentGrid with different levels for inputs
I had again same error “you are requiring 10 trajectories whereas number of possibilities is zero”

why ? is it corrected with otmorris version 0.11 ? or a specific case not yet corrected ?

and could I define different level for inputs with Persalys GUI ? when I tried with Persalys v9.0.3 I’m only able to specify same level for all inputs. But in my case I would like to specify different levels (3, 4 or 5 depending on input characteristics)

Hello,
Persalys 10 uses otmorris 0.11 so I think this is why you still have the error.
Unfortunately, levels in Persalys are the same for all inputs.

Hi
Thanks
I post another message on openturns forum

I installed openturns and otmorris independantly from persalys
In this way I managed to build a morris experiment with levels equal for all inputs (level=4 for each)
but I encountered a bug when I tried to build a morris experiment with different level, whereas it’s possible in a python script
so I think there is a persistent error ?

See you