I would like to access the current Monte Carlo trial index inside an ADS simulation. I have an independent variable which indexes previously sampled data, and I would like to access this data once only across the entire simulation. I would also like to assign statistical distributions to other variables, hence why I want to use the Monte Carlo controller. I have seen the mcindex and mcTrials variables, but neither seem to be doing what I want. mcindex always returns zero, and mcTrial turns into a swept array by the end, but putting length(mcTrial) into a variable equation does not work.
Is there any way I can achieve my goal? Thanks for your help!
mcTrial is a variable reported by the simulator, and it cannot be used in a VarEqn. (This is a general rule.....simulation results, whether global variables like freq, mcTrial, etc or MeasEqns, cannot be used in a VarEqn.) I'm not quite understanding your objective, and I suggest you contact your local Technical Support department for investigation.