File Formats Used by External Executable Optimization Plug-ins

The files used for communication between Isight and the external executable program must each follow a particular format. The format of each individual file required for the external executable optimization plug-in is described in the sections that follow.

Technique Options File

The technique options file uses a value name format. Each line contains one technique option value followed by the name of the option. The name is separated from the value by a tab character. All Boolean type options (true or false) are converted into integer values (true = 1, false = 0) to simplify reading of the values for the external executable program. The order of the options in the file is not guaranteed to match the display order in the Optimization Component Editor. The executable program must rely on the option names to determine which option value is on the next line. The following is an example technique options file:

25

Number of Iterations

0.1

Gradient Step Size

0.05

Convergence Epsilon

Problem Formulation File

The problem formulation file has two sections. The first three lines of the file contain the number of design variables, the number of output constraints (total number, both inequality and equality output constraints), and the number of equality output constraints. The second section of the file is a table where each row is a definition of one design variable. Each row of the table contains: initial value of the design variable, lower bound, upper bound, variable type (0 – real valued variable, 1 – integer valued variable), and the name of the variable. All values in the table are separated by a tab character. The following is an example of a problem formulation file:

4

Number of design variables

   

3

Number of output constraints (total)

   

0

Number of equality (target) constraints

   

12.0

2.0

20.0

0

Length

5.0

1.0

10.0

0

Width

5.0

1.0

10.0

0

Height

0.1

0.01

1.0

0

Wall Thickness

Input Values File

The input values file is created by the external executable program and must be in a table format. For each design point to be evaluated by Isight, the file must contain one line with design variable values, each value separated from the next value by any white space character (space, tab). The order of the design variable values must be exactly the same as in the problem formulation file. Isight reads all lines from this file and assigns input values to the corresponding design variables, then runs a subflow analysis for each design point. The following is an example input values file:

12.0

5.0

5.0

0.1

12.12

5.0

5.0

0.1

12.0

5.05

5.0

0.1

12.0

5.0

5.05

0.1

12.0

5.0

5.0

0.101

Signal File to Execute Subflow Analyses

The signal file to execute subflow analyses is created by the external executable program when it is done writing input values to the input values file. The creation of this file indicates to Isight that it must start subflow evaluations. Isight deletes this file when all subflow evaluations are completed. The deletion of this file serves as the signal to the external executable program that subflow evaluations are done and the output results are ready. There are no required contents for this signal file. It can be empty or contain any text. Isight does not read this file, but it does check that it exists.

Subflow Results File

The subflow results file is created by Isight after all subflow evaluations are completed. This file has a table format similar to the input values file. Each line of the file corresponds to one design point evaluated by Isight. Each line of the file contains the following:

  • all constraint values, starting with the equality (target) constraints, followed by inequality constraints;

  • objective function value;

  • penalty function value.

The constraint values are always ordered the same way for all design point evaluations. All values are separated by a tab character. The following is an example subflow results file:

–1

–1

–1

1e6

0

–1.1

–1

–1

1.1e6

0

–1

–1.1

–1

1.1e6

0

–1

–1

–1

1.1e6

0

–1

–1

–1.1

1.1e6

0

The constraint values written in the file are not the raw output parameter values, but rather the optimization constraints calculated as:

  • Constraint Value (Lower Bound) = (LBParm) × W/S

  • Constraint Value (Upper Bound) = (ParmUB) × W/S

  • Constraint Value (Target) = (ParmT) × W/S

where LB is the lower bound value, UB is the upper bound value, T is the target value, Parm is the parameter value, W is the weight factor, and S is the scale factor. Inequality optimization constraints in Isight are satisfied (feasible) when the constraint value is negative.

The objective function value is calculated as the sum of all objective components with corresponding weight and scale factors:

Objective = Sum (OBJi × Wi / Si),

where OBJi is the contribution to the objective function of the i-th objective component (parameter), Wi is the corresponding weight factor, and Si is the corresponding scale factor.

If the direction of a specific objective parameter is set to minimize, its contribution to the objective function equals the parameter value itself:

OBJi = Parmi

If the direction of a specific objective parameter is set to maximize, its contribution to the objective function equals the parameter value multiplied by –1 to reverse the direction, because the Optimization component always minimizes the objective function:

OBJi = –1.0 × Parmi

If the direction of a specific objective parameter is target, its contribution to the objective function is calculated as:

OBJi = Sqrt [(Parmi - Targeti)2 + 0.04]– 0.2

The penalty function is calculated as:

Penalty = 1000 × Sum(Violationi2),

where Violationi is the violation of i-th output constraint. The violation is calculated differently for inequality and equality (target) constraints.

For inequality constraints, the violation is:

Violationi = 0, if constraint value ≤ 1 × 10–6 (1 × 10–6 is a constraint tolerance);

Violationi = constraint value, otherwise.

For equality (target) constraints, the violation is calculated as follows:

Violationi = 0, if Abs(constraint value) ≤ 1 × 10–6 (absolute value of target constraint is used);

Violationi = Abs(constraint value), otherwise (absolute value of target constraint is used).

Your external executable program can use the constraint values, objective function, and penalty function values in any way that is appropriate for your optimization algorithm. Some optimization algorithms are designed to work with output constraints directly. Other algorithms work only with the objective and penalty function values.