Run Model Batch File after running input components

Hi,

I am trying to automate a simulation that I have to run 1,000 times to do a sensitivity analysis. I would much rather not have to manually press “run” 1,000 times, but am running into an issue. I am using PANDO, which is all in Python components currently. The script has two parts, an input part where you input your variables into several components. Each of these components has a boolean toggle set to TRUE. When you update these components, they write .dat files to the specified folder. They also create a “run maespa.bat” file, which you must run after putting in your inputs.

I am looking for a way to automate it so that grasshopper automatically calls the batch file after each iteration of the inputs. See here some screenshots:

I have all of these components, and I will be changing 7 inputs. I already have that figured out on how to automate.

These components make the following folder:


The batch file has to be run for the simulation to commence.

I need a way for Grasshopper to automatically run this batch file upon creation, and then run it again x number of times after each time I change the variables.

This then feeds into a “read” results, which is set to “true” and the output I am worried about is Tcan, which is fed into an RMSE script that is recorded.

I need to have 1,000 RMSE #s at the end that I can then run a sensitivity analysis on.

Thanks in advance!

OK, so here is an update. The GH files are attached at the end. The “Run MAESPA Bat” file calls the MAESPA.exe file, which is located in C:\PANDO. I suspect this might be part of the issue? i.e., when I call the bat file, it must also call the MAESPA.exe…but I am not sure, I do not know enough about how this kind of execution works.

I made a simple C# Component that can run the bat:

I have that component in my larger GH script for the simulation:

Each of the components is set to TRUE w/ the boolean toggle, and that creates the input files as seen in the images above.

AFTER the input files are created, you run the bat file. As I said I want to animate this so I can run through 1,000 iterations of different numbers and have it run the bat file automatically after each iteration of numbers (i.e. after the input files created).

The problem i am having, is that running the .bat file from GH with the component does not seem to do anything, it does not actually run it…I just see something pop up and then dissapear, but it does not run through all 365 days.
SALib_Reader_Pando.gh (85.4 KB)

Hi Remy -
It sounds like you should get in touch with the developer of that Pando plug-in. I haven’t seen that mentioned before and you probably won’t get much of an answer regarding that around here.
-wim