NAME
Sim::OPT.
SYNOPSIS
use Sim::OPT;
opt;
DESCRIPTION
Sim::OPT is an optimization and parametric exploration environment conceived to work alongside any simulation program that uses text files as input and output. It has been written to support systematic model exploration while preserving the natural decomposition of complex problems into simpler, partially overlapping subspaces. Within this framework, optimization proceeds through block search: the parameter space is partitioned into blocks that may overlap, and each block can be explored sequentially, in parallel, or in any combination of the two. Sequential searches correspond to an inexact Gauss–Seidel method, while parallel ones correspond to an inexact Jacobi scheme, and the user is free to intermix them according to the problem structure and the computational resources available.
The core modules, Sim::OPT and Sim::OPT::Descent, carry out these block searches, handling the interaction among subspaces and coordinating the communication with external simulation engines. The companion module Sim::OPT::Takechange extends the search capability by detecting the least explored paths in the parameter space and directing the search toward them. Its logic follows the principles illustrated in my 2016 paper “Cyclic overlapping block coordinate search for optimizing building design” (Automation in Construction, 71(2), 242–261).
A separate component, Sim::OPT::Morph, is responsible for morphing simulation models, that is, for manipulating text-based model descriptions so that new parameter combinations can be automatically generated. Other modules expand Sim::OPT’s reach in more specialized directions: Sim::OPT::Parcoord3d transforms two-dimensional parallel-coordinate plots into AutoLISP instructions that produce three-dimensional plots inside AutoCAD; Sim::OPT::Interlinear constructs metamodels from sparse multidimensional data; and Sim::OPT::Modish can modify the solar-shading values computed by the ESP-r building-performance simulation platform. Both the morphing and reporting modules include additional functions designed specifically for ESP-r, making Sim::OPT an especially effective companion to that system.
Installation follows the standard Perl practice: issuing cpanm Sim::OPT as a superuser installs the distribution, which can then be loaded with use Sim::OPT;. For convenience, a small batch launcher named opt is provided in the package’s examples directory; copying it into a working folder and executing opt will start the program, which then requests the path to a configuration file describing the optimization task and pointing to the base simulation model. The configuration file specifies, among other variables, the working directory, the structure of the block searches, and the number of iterations per parameter. Separate configuration files may also be created to govern the propagation of constraints, allowing the morphing operations to act coherently on geometry, shading, mass-flow networks, controls, or any other text-based representation of a model.
When a parametric search is executed, Sim::OPT automatically assigns unique names to all generated model folders and result files, keeping an internal correspondence table that links the file names to the logical instance identifiers. These identifiers encode the position of each instance within the multidimensional search matrix, so that the optimization history can be reconstructed or reused later.
The structure of each block search is defined by the @sweeps variable in the configuration file. Each case in @sweeps corresponds to a sequence of subspaces, and each subspace lists the parameters included in that block. For instance, a two-stage sequential search first acting on parameters 1, 2, 3 and then on 3, 4, 5, 6 would be written as @sweeps = ( [ [1,2,3], [3,4,5,6] ] );. Other variables such as @varnumbers and @miditers specify, respectively, how many values each parameter should take and which iteration represents the base case.
Sim::OPT can operate either by launching new simulations or by analyzing existing result sets. It can randomize the order of the search and the initial parameter levels, and by default it behaves sequentially. However, it can also perform different types of searches within each block: star searches, factorial designs, face-centered composite designs, random or Latin hypercube samplings, and even nested cumulative searches that aggregate results across multiple stages. When operating on metamodels, Sim::OPT can perform variance-based preliminary sensitivity analyses to identify the most influential parameters before committing to a full simulation campaign.
Although designed with the building-performance domain in mind, Sim::OPT is entirely general. It simply reads and writes text files, orchestrates the generation of new model variants, and coordinates the evaluation of results, thus serving as a flexible driver for any external simulator. The program runs under Linux and can be adapted to a wide range of optimization and design-space-exploration tasks where the model to be optimized is a text-based computational tool.
EXPORT
"opt".
SEE ALSO
Annotated examples (which include "esp.pl" for ESP-r, "ep.pl" for EnergyPlus - the two perform the same morphing operations on models describing the same building -, "des.pl" about block search, and "f.pl" about a search in a pre-simulated dataset, and other) can be found packed in the "optw.tar.gz" file in "examples" directory in this distribution. They constitute all the available documentation besides these pages and the source code. A full example related to ESP-r complete with ESP-r models can be found at the address: https://figshare.com/articles/software/greenhouse_archetypes/19664415.
AUTHOR
Gian Luca Brunetti, <gianluca.brunetti@polimi.it>
COPYRIGHT AND LICENSE
Copyright (C) 2008-2024 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 3.
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 3142:
 Non-ASCII character seen before =encoding in 'Gauss–Seidel'. Assuming UTF-8