I'm trying to make a Profiler with simulator options turned on and some of the inputs have random distributions. The type of distribution and parameters of that distribution are saved as table variables to be querried as necessary. But the JSL inside the Profiler() function doesn't seem to recognize if statements.
For example, this code works fine
Profiler(
Y( :a, :b ),
Profiler(
1,
Simulator(
1,
Factors(
c << Fixed( 3.5 ),
d << Random( Normal( :dist_p1, :dist_p2 ) )
),
Resimulate
)
)
)but this code doesn't load the distribution info for "d"
Profiler(
Y( :a, :b ),
Profiler(
1,
Simulator(
1,
Factors(
c << Fixed( 3.5 ),
if(
dist_type == "Normal", d << Random( Normal( :dist_p1, :dist_p2 ) ),
dist_type == "Weibull", d << Random( Weibull( :dist_p1, :dist_p2 ) )
)
),
Resimulate
)
)
)