IM3S / LDAR_Sim

MIT License
2 stars 0 forks source link

Input_Parameter_Samples #134

Open soroushojagh opened 2 years ago

soroushojagh commented 2 years ago

Hi all,

For the input parameter, I need some samples, especially in JSON format.

Based on what I read in the "User manual", LDAR-Sim will accept JSON file format.

LDAR-Sim includes a flexible input parameter mapper that accepts a variety of input parameter formats. Choose the one that you like the best. YAML is the easiest to read for humans, allows inline comments, and is recommended. The following formats are accepted:

  • yaml files (extension = '.yaml' or '.yml')
  • json files (extension = '.json')

I am however a little confused and stuck at this stage due to not having a clear understanding of input parameters. Please help me prepare some sample parameter files in JSON format so that I can figure out how to implement it in Celery.

I think preparing some JSON based on different scenarios would be enough. As an example, I want to run LDAR-Sim with:

Thank you!

tbarchyn commented 2 years ago

Yes, this is important - several related topics:

  1. are there curated defaults for the web app? (or are the default defaults the ones to use?)
  2. @soroushojagh - do you want to very much limit the number of parameters that users in the web app can adjust. For two reasons, to reduce your work making and maintaining widgets - and also to deliberately simplify the whole thing (to improve the experience for users).

I don't have answers for either of these questions - but they pertain to the design of the web app and making it as awesome an experience for people as possible. I know we had some discussions on this and I don't want to answer the questions because I think I may have missed some of these discussions. My opinions are: 'make it simple so users have a fun experience and get hooked for life'. The hooked will be able to justify the effort to install and learn the intricacies of parameters - but successfully getting from choosing a few parameters to getting an answer with no errors is such a delicate and important few minutes and worth the effort to get it right.

soroushojagh commented 2 years ago

Thanks @tbarchyn for the quick response,

To answer your questions:

  1. The default values for parameters are based on the first version of LDAR-Sim input files in .txt format. I designed the DB with default values and it won't be hard to change them in future.
  2. I tried to limit the number of modifiable parameters. And there is a limited number of changeable parameters in the current version of the API.

The first step for me is getting a solid understanding of the hierarchies of parameters in form of JSON file formats. And, that's the reason why I am asking for the JSON format of Input parameters. I think it would be very valuable to enrich the User Manual document with some JSON samples. I mean some ready-to-use sample JSON files for typical scenarios.

tbarchyn commented 2 years ago

These are good questions. The full canonical hierarchy should be here for the global level, program level, and method level:

https://github.com/IM3S/LDAR_Sim/tree/master/LDAR_Sim/src/default_parameters

@KeeganShaw-GIS @tarcadius - do you have a default set of simulations that should be the 'default' simulation that users who first arrive at the web app should run. Ideally it is satisfying to the users.

KeeganShaw-GIS commented 2 years ago

@tbarchyn @soroushojagh

  1. I agree we should include examples of json in the user manual.
  2. Default parameters should typically not be modified by a user (although it is possible). Users should create files simulation files which over write the parameters.
  3. Currently the hierarchy is The Global object has Programs which have Methods. None of the files will over write each other, unless they are a program or a method with the same name.
  4. I have included the jsons of the default parameters which have default values in them. Note that "str", "int" , etc, or "_placeholderint" etc (if you are using a previous version) allow type validation when a default parameter is None.

p_default.txt m_default.txt g_default.txt

soroushojagh commented 2 years ago

Thank you @tbarchyn and @KeeganShaw-GIS,

Using with Yaml files are even easier than working with JSON files. However, this would be supper complicated to understand and implement hierarchies in the backend DB and especially when users are going to have their own output files (considering the situation that different users are running the simulation and different input and output folders need to be created and all dependencies in the hierarchy need to be kept in the DB). Complicated!!!!

For this reason, I need to see JSON input files for at least two scenarios to clarify how to model the dependency in order to avoid any misinterpretation in the output files or saving modified parameters for future uses.

Preparing JSON files would help me a lot because without that I am pretty sure that outputs won't be error free.

Thanks.

tbarchyn commented 2 years ago

Hi @soroushojagh - do you want to meet on this? Or make sure it is on agenda for this week IM3S meeting @KeeganShaw-GIS ? Whichever you prefer.

I would like to ensure you are satisfied and have precisely what you need by the end of this week so you don't get delayed in any way.

soroushojagh commented 2 years ago

Hi @tbarchyn - I think you made a great suggestion to have a meeting. Then, I can prepare some scenarios in advance and while you are running the LDAR-Sim for those scenarios, I can capture the screen.

I am available for a meeting tomorrow afternoon from 1 pm to 6 pm. Please feel free to set a time or suggest your available slots at your convenience.

soroushojagh commented 2 years ago

I will try to send you scenarios in advance so that you can prepare input files accordingly. @tbarchyn

tbarchyn commented 2 years ago

Sure, I sent a teams invite for tomorrow afternoon.

soroushojagh commented 2 years ago

Hi @tbarchyn: These are scenarios that I need to see how you run the LDAR-Sim per each one:

  1. 10 programs are defined in the dropdown widget that user can select each:

image

However, I am not able to find either YAML or JSON input files for all of them. Here are those defined in the Simulation folder of our repository: Also, the names of programs are different.

image

  1. What should be the default setting for the users to run the LDAR-Sim? I mean defaults programs in the following form:

image

  1. Are users allowed to run only one program? I mean something like following:

image

  1. Consider the situation that the user selected 10 as the number of simulations for the P_base, and also 2 as the number of simulations for the P_count. Is this a valid query that needs to be run by the LDAR-Sim? If yes, please run it.

  2. Same situation as question number 4, adding a different numbers of Processes and simulations the P_base and also the P_count. Is this a valid query that needs to be run by the LDAR-Sim? If yes, please run it.

  3. How to run the LDAR-Sim with more alternative programs? Please run the LDAR-Sim with the following programs:

  1. Is there any max number for the alternative programs? For example, is the user allowed to add a ref program with all the rest 9 as the alternative programs?

  2. Is there any limitation to selecting the reference program? For example, can the user select P_sat as the reference program and 4 others like P_base, P_dev_OGI, P_truck, and P_ref as the alternative programs? If yes, please run the LDAR-Sim.

Thank you!

KeeganShaw-GIS commented 2 years ago

@soroushojagh @tbarchyn I think I can answer a few of those questions,

  1. We can definitely make a default file for all of those, we will discuss default parameters.
  2. Great question. We will discuss in meeting on Oct 21, 2021.
  3. Yes.
  4. N sims is a global file (G_default) or a input parameter yaml with parameter level = global. You cannot run multiple programs with different n_sim values.
  5. See g_default file, or the global json file I provided.
  6. To run files other than default you change them with an input parameter yaml file, or those in the ./simulation folder.
  7. I am not sure, we have ran up to 8 different programs at once ( 6 different aircraft based programs) , but that might be overkill for the educational tool.
  8. IN V2 there is no limitaition to setting the reference program as long as the user sets it in the input parameter yaml with parameter level = global.
soroushojagh commented 2 years ago

I am waiting to receive YAML files for all the programs and methods that we are going to run in LDAR_Sim. I need these files ASAP because I require to design the DB again according to existing input programs and methods.

I was wondering if you can prioritize this request. Thank you all. @tbarchyn @tarcadius @KeeganShaw-GIS @AkaMrmuffin