Sim-OPTS version 0.36.11
============================

INSTALLATION

To install this module type the following:

   perl Makefile.PL
   make
   make test
   make install

DEPENDENCIES

This module requires these other modules and libraries:

  Math::Trig
  Data::Dumper
  List::Util
  Devel::Repl

COPYRIGHT AND LICENCE

Copyright (C) 2008-2014 by Gian Luca Brunetti and Politecnico di Milano.
This is free software.  You can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2 or later.

Sim::OPTS is a command-line morpher and optimizer managing parametric explorations through the ESP-r building performance simulation platform. It morphs models by propagation of constraints and performs multiobjective optimization through overlapping block coordinate search.

(Information about ESP-r is available at the web address http://www.esru.strath.ac.uk/Programs/ESP-r.htm.)

OPTS may modify directories and files in a work directory, so it is necessary to examine how it works before attempting to use it.

To install OPTS, the following command should be issued in the shell as a superuser: < cpanm Sim::OPTS >. That way Perl will take care to install all the   dependencies. After loading the program (which is made possible by the commands < use Sim::OPTS >) only the command < opts > will be available to the user. That command will activate the OPTS functions following the setting specified in a previously prepared configuration file. As an anternative, the batch file "opt" (it can be found in the "example" folder in this distribution) may be copied in a work directory. To lauch the program in that case < opt > should be issued at the shell. 

When launched, OPTS will ask  to write the path to the OPTS configuration file to be considered. After receiving it, its activity will start and go on until completion, without checking for errors.

In the OPTS configuration file the description of the task to be accomplished by the program will have to be specified. Most of the activity of preparation to run OPTS will indeed happen in the OPTS configuration file, which has to point to an existing ESP-r model. In the module distribution, there is a template file with explanations and an example of an OPTS configuration file. Currently, the creation of those file can only be done by example.

To run OPTS without having it act on files, the setting < $exeonfiles = "n"; > should be specified in the configuration file. The path for the text file that will receive the commands in place of the shell should also be specified in it, by setting the variable < $outfilefeedbacktoshell > to the address of it.

OPTS can give instruction to ESP-r in order to make it modify a model in several different copies. OPTS will make ESP-r perform actions on a target ESP-r model by copying it several times and morphing each copy. Them it will run simulations and retrieve the results. After that, it can extract some results and order them as requested. 

Besides an OPTS configuration file, also configuration files for propagation of constraints may be specified by the user. The same morphing operations that can be obtained without propagation of constraints can also be obtained through propagation of contraints in OPTS, plus many others, in series or parallel.

The model folders and the result files that will be created through ESP-r will be named as the root model, followed by a "_" character,  followed by a variable number referred to the first morphing phase, followed by a "-" character, followed by an iteration number for the variable in question, and so on for all morphing phases. For example, the model instance produced in the first iteration for a model named "model" in a search constituted by 3 morphing phases and 5 iteration steps each may be named "model_1-1_2-1_3-1"; and the last one may be named "model_1-5_2-5_3-5".

The propagation of constraints on which some OPTS operations on models may be based can regard the geometry of the model, solar shadings, mass/flow network, and/or controls, and how they affect each other and daylighting (as calculated throuch the Radiance lighting simulation program). To examine what propagation on constraint can do for the program, the template file included in the OPTS Perl module distribution may be inspected.

To describe a block search, the most important variables to be taken into account in the configuration file are @varn (which is the sequence of variable numbers) and @casegroup (which is the sequence of decomposition cases to be taken into account). OPTS joins @varnumbers with two copies of itself, then works in the middle of the so-obtained sequence. How @varn and @casegroup should be specified is more quikcly described with a couple of examples. 

a) If brute force optimization is wanted on for 1 case composed by 4 parameters, the following settings should be specified: @varn = (1, 2, 3, 4); @casegroup = ( [ [4, 4] ] ) ;

b) If a block search is wanted based on 3 parameters, with 2 overlapping active block composed by 2 parameters each having the leftmost parameters in position 3 and 4 repectively of the mentioned tripled list, the following settings should be specified: @varn = ( [ [1, 2, 3] ] ); @casegroup = ( [ [3, 2], [4, 2] ] ) ;

OPTS presently works for UNIX and UNIX-like systems, but could be easily adapted to Windows.

OPTS is a program I have written as a side project since 2008 with no funding. It was the first real program I attempted to write. From time to time I add some parts to it. The parts of it that have been written earlier are the ones that are coded in the strangest manner. For instance, I wrote many functions nested in other functions to avoid specifying the calling parameters and write more quickly (in theory), but I have not finished extract the functions from the main file to split it in parts.
Gian Luca Brunetti, Politecnico di Milano
gianluca.brunetti@polimi.it


