I’m currently working on integrating the Sobol sensitivity analysis method into my Grasshopper model using Python. The goal is to study the impact of different design parameters on energy performance metrics such as cooling, heating, and daylight.
I’ve created a Python script to perform Sobol sampling, as shown in the image below, and I’m able to generate different parameter sets for each iteration. However, I’m facing a challenge: I want to run a simulation after each iteration/sample and ensure that the output results (cooling, heating, daylight) are recorded before launching the next simulation, I am considering using Colibri to save the results efficiently.
Could someone please advise on the best way to handle this iterative simulation process? Is my current approach suitable, or is there an alternative way to ensure that simulations run sequentially, outputs are saved correctly ?
Your approach in using Colibri is suitable. Colibri has an option to save the files in different format. You can use the saved data for the post processing work you have.
The problem is that Colibri runs all the possible iterations. For my case, I want to use the Sobol sampling method to reduce the number of simulations to run. I should modify my Python script to run the simulations automatically.
The Colibri plug-in itself does record all possible combinations, but sensitivity analysis requires running the specified samples in batches. Iterative running and batch recording are key means to achieve the goal. I have also involved the corresponding running process, and I have also implemented this process. My opinion is that by combining Colibri and the Sea Anemone component, batch loading, batch recording, and the entire process can be automated.
@BBd I’m still having the same problem. To use Colibri, I need to run all possible combinations, which results in a huge number of simulations. I’m working on a Python script to run only the samples I need and automate the simulations.
So, I have a question: can we perform sensitivity analysis using the Sobol method directly in Python within Rhino, or do we need to simulate and obtain the results from Rhino and then run the Sobol calculations in another software?
That’s my question as well. If you have a low number of parameters, you can use Colibri to run all possible combinations, save the results, and then use Python to analyze the data and run the Sobol calculations.
In my case, though, I have a large number of parameters, so using Colibri for all possible combinations isn’t feasible, it would take far too long to complete all the simulations. Instead, I’ve been trying to use Sobol sampling in Python to run a reduced set of simulations. However, I haven’t yet managed to run the simulations one by one for each sample generated.
Hi, you can try using standard GH Data Recorder to record cooling, heating and daylight performance metrics. If you already know the set of experiments to run, then you can have them as a list of inputs in the honeybee components and the results of the simulations will be captured with data recorder.
If you want to vary set of experiments based on the simulation results, then it becomes trickier. You can try looking into Galapagos, which is a GH native optimisation component, but I am not sure if this will be suitable for your task.
@dmitry Thank you for the suggestion! I do have a predefined set of experiments to run. Could you please guide me on how to execute these simulations automatically in Grasshopper?