NAME
Sim::OPT::Interlinear
SYNOPSIS
# As a Perl function:
re.#!/usr/bin/env perl
use Sim::OPT::Interlinear
Sim::OPT::Interlinear::interlinear( "./sourcefile.csv", "./confiinterlinear.pl", "./obtainedmetamodel.csv" );
# or as a script, from the command line:
perl ./Interlinear.pm  .  ./sourcefile.csv
# (note the dot).
# or, again, from the command line, for beginning with a dialogue question:
interlinear interstart
DESCRIPTION
Sim::OPT::Interlinear is a program devoted to metamodelling — the reconstruction of missing data in multivariate series. It operates by estimating the values of unsimulated instances through distance-weighted interpolation of local rates of change. In simple terms, it examines how known data points differ from one another and uses those differences to infer the shape of the design space where information is missing.
The method at its core is the Distance-Weighted Rate-of-Change Network (DWGN), first described in Gian Luca Brunetti’s paper “Increasing the efficiency of simulation-based design explorations via metamodelling” (Journal of Building Performance Simulation, 13:1, pp. 79–99, 2020; DOI: 10.1080/19401493.2019.1707875 ). DWGN belongs to the family of zero-order, instance-based methods: it makes no global assumption about the mathematical form of the underlying function. Instead, it reconstructs local curvatures by weighting the known rates of change inversely to their distance from the points being estimated. In comparative tests it has outperformed classical techniques such as Kriging, MARS, and polynomial regression, particularly when handling irregularly distributed samples.
By default, Interlinear activates DWGN automatically. A simplified global version, DWGN-simple, is also available. It sacrifices some local accuracy for greater speed and can be selected by setting @modality = ("simple") in the configuration file. Two additional strategies can be invoked: a pure linear interpolation—useful on factorial grids—and a pure nearest-neighbour method, intended as a fallback when the dataset is too sparse for more refined approaches.
DWGN and DWGN-simple work best when the available samples are locally clustered, as happens in star, coordinate-descent, or overlapping-block explorations. They are less effective with uniformly scattered points, such as those produced by Latin hypercube or random sampling. For such cases, a preliminary pass of linear or nearest-neighbour interpolation can be used to seed the data before DWGN refinement. Alternatively, in DWGN the third element of the variable $minreq_forgrad in the configuration file (by default confinterlinear.pl) can be set above 1—e.g. $minreq_forgrad = [1,1,2]—to make the algorithm also consider the second-nearest, third-nearest, and so on, neighbouring samples.
A configuration file should follow the examples provided in the package’s examples directory. When incomplete or absent, Interlinear automatically uses default settings and applies the DWGN strategy. The only mandatory variable is $sourcefile, which gives the Unix path to the input data file. Each column in this file represents a parameter, and the last column contains the objective-function values.
For example, a dataset with three parameters and up to three levels per parameter may appear as:
1,1,1,1,1.234 1,2,3,2,1.500 2,1,3,1,1.534 2,2,3,2,0.000 2,3,3,1,0.550 3,2,3,2,0.670
Interlinear converts this conventional tabular form into Sim::OPT’s tensor-based notation:
1-1_2-1_3-1,1.234 1-2_2-3_3-2,1.500 2-1_2-3_3-1,1.534 2-2_2-3_3-2,0.000 2-3_2-3_3-1,0.550 3-2_2-3_3-2,0.670
Only the objective-function entries may be missing; the parameter listings must be complete if Interlinear is used without Sim::OPT. After computation, Interlinear outputs a new dataset with all missing values filled in. The completed series can then be passed to OPT for block optimization, greatly reducing the number of expensive simulations required—especially useful when each run demands substantial computational time, such as in CFD-based building analyses.
Because the computational load of metamodelling grows exponentially with the number of samples, Interlinear provides limiters to keep the process tractable. The parameters $nfiltergrads, $limit_checkdistgrads, and $limit_checkdistpoints control, respectively, the number of original rate-of-change samples, derived rate-of-change relations, and derived points considered in each pass. When left blank, no limits are imposed; typical values might be twice the square root of the total number of samples for $nfiltergrads, and one-fifth or one-tenth of that total for the two distance limits.
Interlinear can also weld two related problem-space models together, provided they share the same parametric structure. This operation, described in Brunetti’s article “Grafting of design-space models onto models of different scope or resolution” (Journal of Building Performance Simulation, 13:3, pp. 227–246, 2020; DOI: 10.1080/19401493.2020.1712477 ), merges datasets on a neighbour-by-neighbour basis rather than by simple averaging, producing a continuous, reconciled design space. Its behaviour is set in the configuration file through the arrays @weldsprepared, @parswelds, and @recedes, which define, respectively, the path to the secondary dataset, the parameters involved, and the directions along which the first dataset yields precedence to the second.
Interlinear can be called directly from Perl with:
use Sim::OPT::Interlinear; Sim::OPT::Interlinear::interlinear("./sourcefile.csv", "./confinterlinear.pl", "./obtainedmetamodel.csv");
When run as a script, one may also execute:
perl ./Interlinear.pm . "./sourcefile.csv" "./confinterlinear.pl"
or simply start an interactive session with
./Interlinear.pm interstart
Once executed, Interlinear produces a completed data series that Sim::OPT can immediately use for further optimization. A minimal workflow therefore consists of preparing a configuration file (for instance, by adapting caravantrial.pl in the examples folder), copying the .csv dataset and the launcher opt into the working directory, and starting the search with ./opt.
Sim::OPT::Interlinear thus acts as the intelligent bridge between sparse simulation data and full optimization, reconstructing the hidden surfaces of the design space through the careful weighting of local rates of change—a process that turns scattered results into a continuous, intelligible landscape ready for exploration.
EXPORT
interlinear, interstart.
AUTHOR
Gian Luca Brunetti (2018-24) <gianluca.brunetti@polimi.it>
COPYRIGHT AND LICENSE
Copyright (C) 2018-22 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 or newer.
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 2320:
 Non-ASCII character seen before =encoding in '—'. Assuming UTF-8