Unmet Hours - RSS feedhttps://unmethours.com/questions/Question-and-Answer Resource for the Building Energy Modeling CommunityenFri, 10 Aug 2018 08:54:41 -0500Optimization algorithm using OpenStudio PAT or terminalhttps://unmethours.com/question/4387/optimization-algorithm-using-openstudio-pat-or-terminal/ Hello everyone,
I have been learning OpenStudio for the last few days and I think I am finally understanding the whole idea. It is great! thanks for making it possible.
Anyway, I have been trying to figure out how to implement a real Optimization algorithm using OpenStudio. I mean, I know that PAT can actually run A LOT of simulations, but I am not sure I like the "randomness" of how measures are impleented (or I think they are implemented)... it seems to me that the "lets run all these models, and see what happens" approach can be enhanced.
I am thinking on something more like "lets apply these measures, run a simulation, check the results and then figure out what the next measure to try should be". Does that make any sense to you guys? Is it possible to do that from PAT itself (can it be scripted or something?) Is it possible to do it from Command line (Terminal) from the existing binaries?
```#this kind of code is what I am picturing```
```seed_model=load_osm("seed.osm")```
```measure_1=load_measure("measure)```
```iteration_1=apply_measure(seed_model, measure_1)```
```results_1=simulate(first_iteration)```
```measure_2=figure_out_next_measure_from_results(results_1)```
```#repeat for iteration 2 with measure 2```
THANKS VERY MUCH, I may be speaking nonsense, but I think OpenStudio is not far from allowing this, if it does not already does.
Mon, 13 Apr 2015 09:35:10 -0500https://unmethours.com/question/4387/optimization-algorithm-using-openstudio-pat-or-terminal/Comment by David Goldwasser for <p>Hello everyone, </p>
<p>I have been learning OpenStudio for the last few days and I think I am finally understanding the whole idea. It is great! thanks for making it possible.</p>
<p>Anyway, I have been trying to figure out how to implement a real Optimization algorithm using OpenStudio. I mean, I know that PAT can actually run A LOT of simulations, but I am not sure I like the "randomness" of how measures are impleented (or I think they are implemented)... it seems to me that the "lets run all these models, and see what happens" approach can be enhanced.</p>
<p>I am thinking on something more like "lets apply these measures, run a simulation, check the results and then figure out what the next measure to try should be". Does that make any sense to you guys? Is it possible to do that from PAT itself (can it be scripted or something?) Is it possible to do it from Command line (Terminal) from the existing binaries? </p>
<p><code>#this kind of code is what I am picturing</code></p>
<p><code>seed_model=load_osm("seed.osm")</code></p>
<p><code>measure_1=load_measure("measure)</code></p>
<p><code>iteration_1=apply_measure(seed_model, measure_1)</code></p>
<p><code>results_1=simulate(first_iteration)</code></p>
<p><code>measure_2=figure_out_next_measure_from_results(results_1)</code></p>
<p><code>#repeat for iteration 2 with measure 2</code></p>
<p>THANKS VERY MUCH, I may be speaking nonsense, but I think OpenStudio is not far from allowing this, if it does not already does.</p>
https://unmethours.com/question/4387/optimization-algorithm-using-openstudio-pat-or-terminal/?comment=4388#post-id-4388Here is a link to our [Lare Scale Analysis documentation](http://nrel.github.io/OpenStudio-user-documentation/tutorials/large_scale_analysis/). That should get you started. I'll let @BrianLBall or someone else go into more detail on specific optimization algorithms that are available with the server.Mon, 13 Apr 2015 09:49:34 -0500https://unmethours.com/question/4387/optimization-algorithm-using-openstudio-pat-or-terminal/?comment=4388#post-id-4388Comment by gmolina for <p>Hello everyone, </p>
<p>I have been learning OpenStudio for the last few days and I think I am finally understanding the whole idea. It is great! thanks for making it possible.</p>
<p>Anyway, I have been trying to figure out how to implement a real Optimization algorithm using OpenStudio. I mean, I know that PAT can actually run A LOT of simulations, but I am not sure I like the "randomness" of how measures are impleented (or I think they are implemented)... it seems to me that the "lets run all these models, and see what happens" approach can be enhanced.</p>
<p>I am thinking on something more like "lets apply these measures, run a simulation, check the results and then figure out what the next measure to try should be". Does that make any sense to you guys? Is it possible to do that from PAT itself (can it be scripted or something?) Is it possible to do it from Command line (Terminal) from the existing binaries? </p>
<p><code>#this kind of code is what I am picturing</code></p>
<p><code>seed_model=load_osm("seed.osm")</code></p>
<p><code>measure_1=load_measure("measure)</code></p>
<p><code>iteration_1=apply_measure(seed_model, measure_1)</code></p>
<p><code>results_1=simulate(first_iteration)</code></p>
<p><code>measure_2=figure_out_next_measure_from_results(results_1)</code></p>
<p><code>#repeat for iteration 2 with measure 2</code></p>
<p>THANKS VERY MUCH, I may be speaking nonsense, but I think OpenStudio is not far from allowing this, if it does not already does.</p>
https://unmethours.com/question/4387/optimization-algorithm-using-openstudio-pat-or-terminal/?comment=4419#post-id-4419Thanks, Dan and David.
I did not fully undertand the available documentation on Large Scale Analysis... however, I think I am already learning how to do it using Ruby scripts. It is kind of tricky at the beggining, but I am learning.
Bye!Tue, 14 Apr 2015 13:09:58 -0500https://unmethours.com/question/4387/optimization-algorithm-using-openstudio-pat-or-terminal/?comment=4419#post-id-4419Answer by BrianLBall for <p>Hello everyone, </p>
<p>I have been learning OpenStudio for the last few days and I think I am finally understanding the whole idea. It is great! thanks for making it possible.</p>
<p>Anyway, I have been trying to figure out how to implement a real Optimization algorithm using OpenStudio. I mean, I know that PAT can actually run A LOT of simulations, but I am not sure I like the "randomness" of how measures are impleented (or I think they are implemented)... it seems to me that the "lets run all these models, and see what happens" approach can be enhanced.</p>
<p>I am thinking on something more like "lets apply these measures, run a simulation, check the results and then figure out what the next measure to try should be". Does that make any sense to you guys? Is it possible to do that from PAT itself (can it be scripted or something?) Is it possible to do it from Command line (Terminal) from the existing binaries? </p>
<p><code>#this kind of code is what I am picturing</code></p>
<p><code>seed_model=load_osm("seed.osm")</code></p>
<p><code>measure_1=load_measure("measure)</code></p>
<p><code>iteration_1=apply_measure(seed_model, measure_1)</code></p>
<p><code>results_1=simulate(first_iteration)</code></p>
<p><code>measure_2=figure_out_next_measure_from_results(results_1)</code></p>
<p><code>#repeat for iteration 2 with measure 2</code></p>
<p>THANKS VERY MUCH, I may be speaking nonsense, but I think OpenStudio is not far from allowing this, if it does not already does.</p>
https://unmethours.com/question/4387/optimization-algorithm-using-openstudio-pat-or-terminal/?answer=7827#post-id-7827There are several optimization algorithms available in the [https://github.com/NREL/OpenStudio-analysis-spreadsheet/](https://github.com/NREL/OpenStudio-analysis-spreadsheet/). Currently the list is:
NSGA2 (Non-dominated Sorting Genetic Algorithm)
- Multi-objective
- Parallel F evaluations Mixed
- Continuous or Discrete variables
SPEA2 (Strength Pareto Evolutionary Algorithm)
- Multi-objective
- Parallel F evaluations
- Continuous variables only
Rgenoud (GENetic Optimized Using Derivatives)
- Single-objective
- Parallel F evaluations for genetic search
- Parallel gradient calculation for continuous variables
Optim (quasi-Newton method with bounds)
- Single-objective
- Parallel gradient calculation
- Continuous variables only
There are also sampling, design of experiment, batch running and a few other algorithms available.
A calibration example lives here: [https://github.com/NREL/OpenStudio-analysis-spreadsheet/tree/develop/Calibration_example](https://github.com/NREL/OpenStudio-analysis-spreadsheet/tree/develop/Calibration_example)
A user guide is currently being drafted and lives here: [https://github.com/NREL/OpenStudio-analysis-spreadsheet/tree/develop/documentation](https://github.com/NREL/OpenStudio-analysis-spreadsheet/tree/develop/documentation).Fri, 15 May 2015 10:50:05 -0500https://unmethours.com/question/4387/optimization-algorithm-using-openstudio-pat-or-terminal/?answer=7827#post-id-7827Comment by pow_skier for <p>There are several optimization algorithms available in the <a href="https://github.com/NREL/OpenStudio-analysis-spreadsheet/">https://github.com/NREL/OpenStudio-analysis-spreadsheet/</a>. Currently the list is:</p>
<p>NSGA2 (Non-dominated Sorting Genetic Algorithm)</p>
<ul>
<li>Multi-objective</li>
<li>Parallel F evaluations Mixed</li>
<li>Continuous or Discrete variables</li>
</ul>
<p>SPEA2 (Strength Pareto Evolutionary Algorithm)</p>
<ul>
<li>Multi-objective</li>
<li>Parallel F evaluations</li>
<li>Continuous variables only</li>
</ul>
<p>Rgenoud (GENetic Optimized Using Derivatives)</p>
<ul>
<li>Single-objective</li>
<li>Parallel F evaluations for genetic search</li>
<li>Parallel gradient calculation for continuous variables</li>
</ul>
<p>Optim (quasi-Newton method with bounds)</p>
<ul>
<li>Single-objective</li>
<li>Parallel gradient calculation</li>
<li>Continuous variables only</li>
</ul>
<p>There are also sampling, design of experiment, batch running and a few other algorithms available.
A calibration example lives here: <a href="https://github.com/NREL/OpenStudio-analysis-spreadsheet/tree/develop/Calibration_example">https://github.com/NREL/OpenStudio-analysis-spreadsheet/tree/develop/Calibration_example</a></p>
<p>A user guide is currently being drafted and lives here: <a href="https://github.com/NREL/OpenStudio-analysis-spreadsheet/tree/develop/documentation">https://github.com/NREL/OpenStudio-analysis-spreadsheet/tree/develop/documentation</a>.</p>
https://unmethours.com/question/4387/optimization-algorithm-using-openstudio-pat-or-terminal/?comment=33384#post-id-33384@particleswarm
You are right. Unmet has a lot on here already.Fri, 10 Aug 2018 08:54:41 -0500https://unmethours.com/question/4387/optimization-algorithm-using-openstudio-pat-or-terminal/?comment=33384#post-id-33384Answer by macumber for <p>Hello everyone, </p>
<p>I have been learning OpenStudio for the last few days and I think I am finally understanding the whole idea. It is great! thanks for making it possible.</p>
<p>Anyway, I have been trying to figure out how to implement a real Optimization algorithm using OpenStudio. I mean, I know that PAT can actually run A LOT of simulations, but I am not sure I like the "randomness" of how measures are impleented (or I think they are implemented)... it seems to me that the "lets run all these models, and see what happens" approach can be enhanced.</p>
<p>I am thinking on something more like "lets apply these measures, run a simulation, check the results and then figure out what the next measure to try should be". Does that make any sense to you guys? Is it possible to do that from PAT itself (can it be scripted or something?) Is it possible to do it from Command line (Terminal) from the existing binaries? </p>
<p><code>#this kind of code is what I am picturing</code></p>
<p><code>seed_model=load_osm("seed.osm")</code></p>
<p><code>measure_1=load_measure("measure)</code></p>
<p><code>iteration_1=apply_measure(seed_model, measure_1)</code></p>
<p><code>results_1=simulate(first_iteration)</code></p>
<p><code>measure_2=figure_out_next_measure_from_results(results_1)</code></p>
<p><code>#repeat for iteration 2 with measure 2</code></p>
<p>THANKS VERY MUCH, I may be speaking nonsense, but I think OpenStudio is not far from allowing this, if it does not already does.</p>
https://unmethours.com/question/4387/optimization-algorithm-using-openstudio-pat-or-terminal/?answer=4390#post-id-4390 Glad you like the idea @gmolina, there is already an answer to this question on [this post](https://unmethours.com/question/2969/how-to-create-all-possible-combination-for-pat/).Mon, 13 Apr 2015 09:57:18 -0500https://unmethours.com/question/4387/optimization-algorithm-using-openstudio-pat-or-terminal/?answer=4390#post-id-4390