nasa / trick

Trick Simulation Environment. Trick provides a common set of simulation capabilities and utilities to build simulations automatically.
Other
34 stars 19 forks source link

MonteCarloGeneration: Provide more dispersion details when generate_meta_data is active #1574

Closed ddj116 closed 9 months ago

ddj116 commented 12 months ago

Some Ramtares users have requested added capability when monte_carlo.master.generate_meta_data = True, copied from the original GitLab thread:

we are looking to output the dispersion type, min/max, and mean/sigma for all monte carloed variables ... I see that this metadata output just says "random". We are looking for dispersionTypes like Gaussian, and uniform

Currently, the output of variables in the meta data file looks like this:

Screenshot 2023-09-15 at 1 45 19 PM

This might require a refactor of the underlying classes so that this information is available inside collate_meta_data().

Adding suggested implementation details from the original thread:

Add a virtual method to each "variable" type to return a string containing content specific to that type, then in mc_master, call the method on each "variable", appending the returned string to some list ready for output. Probably need to look at the specifics of each class to identify what sort of information gets returned -- e.g. for a normal distribution, do you also need information about applied truncations?

sharmeye commented 11 months ago

We'll put this on our list, but we're not super familiar with the section of code so we'll have to do some digging first.

ddj116 commented 11 months ago

Sorry for the confusion - I've already got an implementation from the needing user, and I'll be putting that together in a PR for y'all to take a look at when I get time (hopefully next week).