Optimization Test Evaluators

Single-objective optimization test problems. Each evaluator minimizes one objective function, possibly subject to constraints.

class BoreholeMultiFiHi

Bases: BoreholeMultiFiBase

Hi-fidelity class for a borehole multifidelity problem

The Borehole function models water flow through a borehole. Its simplicity and quick evaluation makes it a commonly used function for testing a wide variety of methods in computer experiments. The response is water flow rate in 𝑚3/𝑦𝑟 .

Input Domain

Radius of borehole ( 𝑚 ) - 𝑟𝑤∈[0.05,0.15] Radius of influence ( 𝑚 ) - 𝑟∈[100,50000] Transmissivity of upper aquifier ( 𝑚2/𝑦𝑟 ) - 𝑇𝑢∈[63070,115600] Potentiometric head of upper aquifier ( 𝑚 ) - 𝐻𝑢∈[990,1110] Transmissivity of lower aquifier ( 𝑚2/𝑦𝑟 ) - 𝑇𝑙∈[63.1,116] Potentiometric head of lower aquifier ( 𝑚 ) - 𝐻𝑙∈[700,820] Length of borehole ( 𝑚 ) - 𝐿∈[1120,1680] Hydraulic conductivity of borehole ( 𝑚/𝑦𝑟 ) - 𝐾𝑤∈[9855,12045]


Problem Description

The Borehole function models water flow through a borehole. Its simplicity and quick evaluation makes it a commonly used function for testing a wide variety of methods in computer experiments. The response is water flow rate in \(m^3/yr\).

Input Domain:

Problem Metadata

Test Goal:

Optimization

Problem Type:

Continuous

Variables:

8

Continuous Variables:

8

Discrete Variables:

0

Constraints:

0

Equality Constraints:

0

Inequality Constraints:

0

Bounded Variables:

Yes


class BoreholeMultiFiLo

Bases: BoreholeMultiFiBase

Lo-fidelity class for a borehole multifidelity problem

The Borehole function models water flow through a borehole. Its simplicity and quick evaluation makes it a commonly used function for testing a wide variety of methods in computer experiments. The response is water flow rate in 𝑚3/𝑦𝑟 .

Input Domain

Radius of borehole ( 𝑚 ) - 𝑟𝑤∈[0.05,0.15] Radius of influence ( 𝑚 ) - 𝑟∈[100,50000] Transmissivity of upper aquifier ( 𝑚2/𝑦𝑟 ) - 𝑇𝑢∈[63070,115600] Potentiometric head of upper aquifier ( 𝑚 ) - 𝐻𝑢∈[990,1110] Transmissivity of lower aquifier ( 𝑚2/𝑦𝑟 ) - 𝑇𝑙∈[63.1,116] Potentiometric head of lower aquifier ( 𝑚 ) - 𝐻𝑙∈[700,820] Length of borehole ( 𝑚 ) - 𝐿∈[1120,1680] Hydraulic conductivity of borehole ( 𝑚/𝑦𝑟 ) - 𝐾𝑤∈[9855,12045]


Problem Description

The Borehole function models water flow through a borehole. Its simplicity and quick evaluation makes it a commonly used function for testing a wide variety of methods in computer experiments. The response is water flow rate in \(m^3/yr\).

Input Domain:

Problem Metadata

Test Goal:

Optimization

Problem Type:

Continuous

Variables:

8

Continuous Variables:

8

Discrete Variables:

0

Constraints:

0

Equality Constraints:

0

Inequality Constraints:

0

Bounded Variables:

Yes


class CantileveredBeam

Bases: CantileveredBeamContinuous

Cantilevered Beam Example Evaluator

The problem has four design variables with types as follows:

  • x0 - integer

  • x1 - double

  • x2 - double

  • x3 - double

There are three responses:

  • volume

  • stress

  • deflection

Note

The source for this instantiation of this evaluator is a white paper from Red Cedar Technology called “SHERPA - An Efficient and Robust Optimization/Search Algorithm”.

|<------ b1 ------>|
 __________________
|                  |
|                  | h1
|_____        _____|
      |      |
      |      |
      |<-b2->|   H - 2 * h1
      |      |
 _____|      |_____
|                  |
|                  | h1
|__________________|
  • x0 -> h1 in [0.1, 1.0] (accessed by indicies [1, 2, 3, 4, 5, 6, 7, 8] into a lookup table { .1, .25, .35, .5, .65, .75, .9, 1.0 } in this domain)

  • x1 -> b1 in [2.0, 12.0]

  • x2 -> b2 in [0.1, 2.0]

  • x3 -> H in [3.0, 7.0]


  • W = Load (hard coded to 1000 pounds)

  • E = Modulus of Elasticity (hard coded to 1.0e7 psi)

  • L = length (hard coded to 60 inches)

  • Z = I / z (section modulus of the cross-section of the beam)

  • z = H / 2 (Distance from neutral axis to extreme fiber (edge))

  • I = Moment of Inertia (of cross section about neutral axis)

I = (1/12) * ((H - 2 * h1) * b2 ^ 3) + (1/12) * (b1 * h1 ^ 3) + (1/12) * (b1 * h1 ^ 3) + b1 * h1 * ((H - h1) / 2 ) ^ 2 + b1 * h1 * ((H - h1) / 2) ^ 2 = (1/12) * ((H - 2 * h1) * b2 ^ 3) + 2 * (b1 * h1 ^ 3)) + (b1 * h1 *(H - h1) ^ 2) / 2

V = (2 * b1 * h1 + b2 * (H - 2 * h1)) * L stress(x) = W *(L - x) / Z = W * (L - x) * z / I = W * (L - x) * H / (2 * I) max stress = stress(0) = W * L * H / (2 * I) deflection = W * L ^ 3 / (3 * E * I)


Problem Description

Cantilevered Beam Example Evaluator

The problem has four design variables with types as follows:

  • x0 - integer

  • x1 - double

  • x2 - double

  • x3 - double

There are three responses:

  • volume

  • stress

  • deflection

Note

The source for this instantiation of this evaluator is a white paper from Red Cedar Technology called “SHERPA - An Efficient and Robust Optimization/Search Algorithm”.

|<------ b1 ------>|
 __________________
|                  |
|                  | h1
|_____        _____|
      |      |
      |      |
      |<-b2->|   H - 2 * h1
      |      |
 _____|      |_____
|                  |
|                  | h1
|__________________|
  • x0 -> h1 in [0.1, 1.0] (accessed by indicies [1, 2, 3, 4, 5, 6, 7, 8] into a lookup table { .1, .25, .35, .5, .65, .75, .9, 1.0 } in this domain)

  • x1 -> b1 in [2.0, 12.0]

  • x2 -> b2 in [0.1, 2.0]

  • x3 -> H in [3.0, 7.0]


  • W = Load (hard coded to 1000 pounds)

  • E = Modulus of Elasticity (hard coded to 1.0e7 psi)

  • L = length (hard coded to 60 inches)

  • Z = I / z (section modulus of the cross-section of the beam)

  • z = H / 2 (Distance from neutral axis to extreme fiber (edge))

  • I = Moment of Inertia (of cross section about neutral axis)

I = (1/12) * ((H - 2 * h1) * b2 ^ 3) + (1/12) * (b1 * h1 ^ 3) + (1/12) * (b1 * h1 ^ 3) + b1 * h1 * ((H - h1) / 2 ) ^ 2 + b1 * h1 * ((H - h1) / 2) ^ 2
= (1/12) * ((H - 2 * h1) * b2 ^ 3) + 2 * (b1 * h1 ^ 3)) + (b1 * h1 *(H - h1) ^ 2) / 2

V = (2 * b1 * h1 + b2 * (H - 2 * h1)) * L
stress(x) = W *(L - x) / Z = W * (L - x) * z / I = W * (L - x) * H / (2 * I)
max stress = stress(0) = W * L * H / (2 * I)
deflection = W * L ^ 3 / (3 * E * I)

Reference

The source for this instantiation of this evaluator is a white paper from Red Cedar Technology called “SHERPA - An Efficient and Robust Optimization/Search Algorithm”.

Problem Metadata

Test Goal:

Optimization

Problem Type:

Mixed

Variables:

4

Continuous Variables:

3

Discrete Variables:

1

Constraints:

3

Equality Constraints:

0

Inequality Constraints:

3

Bounded Variables:

Yes


class CantileveredBeamContinuous

Bases: TestEvaluator

Cantilevered Beam Example Evaluator with only continuous variables

This example is making the first variable (x0) double instead of integer, so it is a relaxation of the CantileveredBeam example.

The problem has four design variables with types as follows:

  • x0 - double

  • x1 - double

  • x2 - double

  • x3 - double

There are three responses:

  • volume

  • stress

  • deflection

Note

The source for this instantiation of this evaluator is a white paper from Red Cedar Technology called “SHERPA - An Efficient and Robust Optimization/Search Algorithm”.


Problem Description

Cantilevered Beam Example Evaluator with only continuous variables

This example is making the first variable (x0) double instead of integer, so it is a relaxation of the CantileveredBeam example.

The problem has four design variables with types as follows:

  • hc: Height of the cantilever beam (double)

  • b1: Width of the first section of the beam (double)

  • b2: Width of the second section of the beam (double)

  • H: Height of the beam (double)

There are three responses:

  • deflection: The deflection of the beam (bounded between 0.0 and 0.1)

  • stress: The stress experienced by the beam (bounded between 0.0 and 5000.0)

  • volume: The volume of the beam (bounded between 0.0 and 1200.0)

Objectives:

  • Minimize the volume of the beam.

Constraints:

  • The volume, stress, and deflection of the beam must meet specified limits.

Note

The source for this instantiation of this evaluator is a white paper from Red Cedar Technology called “SHERPA - An Efficient and Robust Optimization/Search Algorithm”.

Reference

The source for this instantiation of this evaluator is a white paper from Red Cedar Technology called “SHERPA - An Efficient and Robust Optimization/Search Algorithm”.

Problem Metadata

Test Goal:

Optimization

Problem Type:

Continuous

Variables:

4

Continuous Variables:

4

Discrete Variables:

0

Constraints:

3

Equality Constraints:

0

Inequality Constraints:

3

Bounded Variables:

Yes


class CantileveredBeamFixedVariable

Bases: CantileveredBeam

Cantilevered Beam with Fixed Variables Example Evaluator

This example initializes an optimization problem with six design variables, three responses, and specific objectives and constraints related to the structural analysis of a cantilevered beam. The design variables include both float and integer types, with defined bounds and default values.

The problem has 6 design variables with types as follows: - b1: Width of the first section of the beam (double) - b2: Width of the second section of the beam (double) - H: Height of the beam (double) - x0: An integer variable - C0: A fixed float variable - C1: A fixed integer variable

There are three responses: - deflection - stress - volume

The objectives and constraints for the optimization problem are set to minimize the volume while ensuring that the stress and deflection remain within specified limits.

Note

The source for this instantiation of this evaluator is a white paper from Red Cedar Technology called “SHERPA - An Efficient and Robust Optimization/Search Algorithm”.

|<------ b1 ------>|
 __________________
|                  |
|                  | h1
|_____        _____|
      |      |
      |      |
      |<-b2->|   H - 2 * h1
      |      |
 _____|      |_____
|                  |
|                  | h1
|__________________|
  • x0 -> h1 in [0.1, 1.0] (accessed by indicies [1, 2, 3, 4, 5, 6, 7, 8] into a lookup table { .1, .25, .35, .5, .65, .75, .9, 1.0 } in this domain)

  • x1 -> b1 in [2.0, 12.0]

  • x2 -> b2 in [0.1, 2.0]

  • x3 -> H in [3.0, 7.0]


  • W = Load (hard coded to 1000 pounds)

  • E = Modulus of Elasticity (hard coded to 1.0e7 psi)

  • L = length (hard coded to 60 inches)

  • Z = I / z (section modulus of the cross-section of the beam)

  • z = H / 2 (Distance from neutral axis to extreme fiber (edge))

  • I = Moment of Inertia (of cross section about neutral axis)

I = (1/12) * ((H - 2 * h1) * b2 ^ 3) + (1/12) * (b1 * h1 ^ 3) + (1/12) * (b1 * h1 ^ 3) + b1 * h1 * ((H - h1) / 2 ) ^ 2 + b1 * h1 * ((H - h1) / 2) ^ 2 = (1/12) * ((H - 2 * h1) * b2 ^ 3) + 2 * (b1 * h1 ^ 3)) + (b1 * h1 *(H - h1) ^ 2) / 2

V = (2 * b1 * h1 + b2 * (H - 2 * h1)) * L stress(x) = W *(L - x) / Z = W * (L - x) * z / I = W * (L - x) * H / (2 * I) max stress = stress(0) = W * L * H / (2 * I) deflection = W * L ^ 3 / (3 * E * I)


Problem Description

Cantilevered Beam with Fixed Variables Example Evaluator

This example initializes an optimization problem with six design variables, three responses, and specific objectives and constraints related to the structural analysis of a cantilevered beam. The design variables include both float and integer types, with defined bounds and default values.

The problem has 6 design variables with types as follows:

  • b1: Width of the first section of the beam (double)

  • b2: Width of the second section of the beam (double)

  • H: Height of the beam (double)

  • x0: An integer variable

  • C0: A fixed float variable

  • C1: A fixed integer variable

There are three responses:

  • deflection

  • stress

  • volume

The objectives and constraints for the optimization problem are set to minimize the volume while ensuring that the stress and deflection remain within specified limits.

Note

The source for this instantiation of this evaluator is a white paper from Red Cedar Technology called “SHERPA - An Efficient and Robust Optimization/Search Algorithm”.

|<------ b1 ------>|
 __________________
|                  |
|                  | h1
|_____        _____|
      |      |
      |      |
      |<-b2->|   H - 2 * h1
      |      |
 _____|      |_____
|                  |
|                  | h1
|__________________|
  • x0 -> h1 in [0.1, 1.0] (accessed by indicies [1, 2, 3, 4, 5, 6, 7, 8] into a lookup table { .1, .25, .35, .5, .65, .75, .9, 1.0 } in this domain)

  • x1 -> b1 in [2.0, 12.0]

  • x2 -> b2 in [0.1, 2.0]

  • x3 -> H in [3.0, 7.0]


  • W = Load (hard coded to 1000 pounds)

  • E = Modulus of Elasticity (hard coded to 1.0e7 psi)

  • L = length (hard coded to 60 inches)

  • Z = I / z (section modulus of the cross-section of the beam)

  • z = H / 2 (Distance from neutral axis to extreme fiber (edge))

  • I = Moment of Inertia (of cross section about neutral axis)

I = (1/12) * ((H - 2 * h1) * b2 ^ 3) + (1/12) * (b1 * h1 ^ 3) + (1/12) * (b1 * h1 ^ 3) + b1 * h1 * ((H - h1) / 2 ) ^ 2 + b1 * h1 * ((H - h1) / 2) ^ 2
= (1/12) * ((H - 2 * h1) * b2 ^ 3) + 2 * (b1 * h1 ^ 3)) + (b1 * h1 *(H - h1) ^ 2) / 2

V = (2 * b1 * h1 + b2 * (H - 2 * h1)) * L
stress(x) = W *(L - x) / Z = W * (L - x) * z / I = W * (L - x) * H / (2 * I)
max stress = stress(0) = W * L * H / (2 * I)
deflection = W * L ^ 3 / (3 * E * I)

Reference

The source for this instantiation of this evaluator is a white paper from Red Cedar Technology called “SHERPA - An Efficient and Robust Optimization/Search Algorithm”.

Problem Metadata

Test Goal:

Optimization

Problem Type:

Mixed

Variables:

6

Continuous Variables:

4

Discrete Variables:

2

Constraints:

3

Equality Constraints:

0

Inequality Constraints:

3

Bounded Variables:

Yes


class ConstrainedBetts

Bases: TestEvaluator

Linearly constrained Betts function.

\[\begin{split}\begin{aligned} \min\quad & f(x) = 0.01 x_1^2 + x_2^2 - 100 \\[1em] \text{s.t.}\quad & 10 x_1 - x_2 \geq 10 \\ & 2 \leq x_1 \leq 50 \\ & -50 \leq x_2 \leq 50 \end{aligned}\end{split}\]

Known optimal solution:

\[x^* = (2, 0), \quad f(x^*) = -99.96\]

Verified using the unopy optimizer (Uno v2.7.3, IPOPT preset). See experimenting/solve_constrained_betts_with_unopy.ipynb for the full verification workflow.

Initial point (infeasible):

\[x_0 = (-1, -1)\]

Problem Description

Linearly constrained Betts function:

\[\begin{split}\begin{aligned} \min\quad & f(x) = 0.01 x_1^2 + x_2^2 - 100 \\[1em] \text{s.t.}\quad & 10 x_1 - x_2 \geq 10 \\ & 2 \leq x_1 \leq 50 \\ & -50 \leq x_2 \leq 50 \end{aligned}\end{split}\]

Known optimal solution:

\[x^* = (2, 0), \quad f(x^*) = -99.96\]

Initial point (infeasible):

\[x_0 = (-1, -1)\]

Problem Metadata

Test Goal:

Optimization

Problem Type:

Continuous

Variables:

2

Continuous Variables:

2

Discrete Variables:

0

Constraints:

1

Equality Constraints:

0

Inequality Constraints:

1

Bounded Variables:

Yes


Methods:

evaluate_analytic_gradient(sites, opt_problem)

Compute analytic gradients of the objective(s) at the provided sites.

evaluate_analytic_jacobian(sites, opt_problem)

Compute analytic Jacobian of constraints at the provided sites.

evaluate_analytic_gradient(sites, opt_problem)

Compute analytic gradients of the objective(s) at the provided sites.

Parameters:
  • sites (DataFrame) – DataFrame of input sites (one row per site).

  • opt_problem (OptProblem) – OptProblem instance providing mapping information.

Returns:

Gradient array with shape

(num_sites, num_objs_total, num_flat_vars).

Return type:

np.ndarray

evaluate_analytic_jacobian(sites, opt_problem)

Compute analytic Jacobian of constraints at the provided sites.

Parameters:
  • sites (DataFrame) – DataFrame of input sites (one row per site).

  • opt_problem (OptProblem) – OptProblem instance providing mapping information.

Returns:

Jacobian array with shape

(num_sites, n_cons_total, num_flat_vars).

Return type:

np.ndarray

class CosineTensorProduct

Bases: TestEvaluator

The cosine tensor product function approximates a step function which causes oscillation with some surrogate models. It is given by:

\[f(\mathbf{x}) = \prod_{i=1}^n \cos(a \pi x_i)\]

with \(-1 \leq x_i \leq 1\) for \(i = 1,\ldots,n\).


Problem Description

The cosine tensor product function approximates a step function which causes oscillation with some surrogate models. It is given by:

\[f(\mathbf{x}) = \prod_{i=1}^n \cos(a \pi x_i)\]
-1 <= x_i <= 1 for i = 1,…,n.

Reference

Mohamed Amine Bouhlel, John T. Hwang, Nathalie Bartoli, Rémi Lafage, Joseph Morlier and Joaquim R. R. A. Martins, A Python surrogate modeling framework with derivatives, Advances in Engineering Software (2019).

Problem Metadata

Test Goal:

Optimization

Problem Type:

Continuous

Variables:

1

Continuous Variables:

1

Discrete Variables:

0

Constraints:

0

Equality Constraints:

0

Inequality Constraints:

0

Bounded Variables:

Yes


Methods:

__init__([num_independent, num_dependent, ...])

Constructor method for the cosine tensor product function.

__init__(num_independent=1, num_dependent=1, name=None, comp_cost=100, **kwargs)

Constructor method for the cosine tensor product function.

Parameters:
  • num_independent (int, optional) – Number of independent variables. Must be >= 1. Defaults to 1.

  • num_dependent (int, optional) – Number of dependent variables. Must be >= 1. Defaults to 1.

  • name (str, optional) – Name to give the evaluator.

  • comp_cost (float, optional) – Computational cost of evaluating. Defaults to 100.

  • **kwargs (dict) – Additional keyword arguments, including options for a CosineTensorProductOptions instance.

Return type:

None

class ExponentialMultiFiHi

Bases: ExponentialMultiFiBase

Hi-fidelity class for a exponential multifidelity problem


Problem Description

This function is a two-dimensional example which occurs several times in the literature on computer experiments.

Problem Metadata

Test Goal:

Optimization

Problem Type:

Continuous

Variables:

2

Continuous Variables:

2

Discrete Variables:

0

Constraints:

0

Equality Constraints:

0

Inequality Constraints:

0

Bounded Variables:

Yes


class ExponentialMultiFiLo

Bases: ExponentialMultiFiBase

Lo-fidelity class for a exponential multifidelity problem. upper_right = input_vec + np.array([0.05, 0.05]) lower_right = input_vec + np.array([0.05, -0.05]) lower_right[1] = np.max([0.0, lower_right[1]]) upper_left = input_vec + np.array([-0.05, 0.05]) lower_left = input_vec + np.array([-0.05, -0.05]) lower_left[1] = np.max([0.0, lower_left[1]]) # Average outputs return 0.25 * (exp_high(upper_right) + exp_high(lower_right) + exp_high(upper_left) + exp_high(lower_left))


Problem Description

This function is a two-dimensional example which occurs several times in the literature on computer experiments.

Problem Metadata

Test Goal:

Optimization

Problem Type:

Continuous

Variables:

2

Continuous Variables:

2

Discrete Variables:

0

Constraints:

0

Equality Constraints:

0

Inequality Constraints:

0

Bounded Variables:

Yes


class ExponentialTensorProduct

Bases: TestEvaluator

The exponential tensor product function approximates a step function which causes oscillation with some surrogate models. It is given by:

\[f(\mathbf{x}) = \prod_{i=1}^n \exp(a \cdot x_i)\]

with \(-1 \leq x_i \leq 1\) for \(i = 1,\ldots,n\).


Problem Description

The exponential tensor product function approximates a step function which causes oscillation with some surrogate models. It is given by:

\[f(\mathbf{x}) = \prod_{i=1}^n \exp(a \cdot x_i)\]
-1 <= x_i <= 1 for i = 1,…,n.

Reference

Mohamed Amine Bouhlel, John T. Hwang, Nathalie Bartoli, Rémi Lafage, Joseph Morlier and Joaquim R. R. A. Martins, A Python surrogate modeling framework with derivatives, Advances in Engineering Software (2019).

Problem Metadata

Test Goal:

Optimization

Problem Type:

Continuous

Variables:

1

Continuous Variables:

1

Discrete Variables:

0

Constraints:

0

Equality Constraints:

0

Inequality Constraints:

0

Bounded Variables:

Yes


Methods:

__init__([name, comp_cost, num_independent, ...])

Constructor method for the exponential tensor product function.

__init__(name=None, comp_cost=100, num_independent=None, num_dependent=None, **kwargs)

Constructor method for the exponential tensor product function.

Parameters:
  • name (str)

  • comp_cost (float)

  • num_independent (int)

  • num_dependent (int)

Return type:

None

class ExtendedRosenbrock

Bases: TestEvaluator

The Extended Rosenbrock function.

This evaluator is an example function from “Numerical Methods for Unconstrained Optimization and Nonlinear Equations” by J.E. Dennis Jr. and R.B. Schnabel.

The problem has two independent variables, \(x_0\) and \(x_1\) and a single response:

\[f(x_0, x_1) = \left[10*\left(x_1-x_0^2\right)\right]^2 + (1-x_0)^2\]

Problem Description

The Extended Rosenbrock function.

This evaluator is an example function from “Numerical Methods for Unconstrained Optimization and Nonlinear Equations” by J.E. Dennis Jr. and R.B. Schnabel.

The problem has two independent variables, \(x_0\) and \(x_1\) and a single response:

\[f(x_0, x_1) = \left[10*\left(x_1-x_0^2\right)\right]^2 + (1-x_0)^2\]

Reference

    1. Dennis, Jr., Robert B. Schnabel, ‘Numerical Methods for Unconstrained Optimization and Nonlinear Equations’, Volume 16 of Classics in Applied Mathematics, 1996

Problem Metadata

Test Goal:

Optimization

Problem Type:

Continuous

Variables:

2

Continuous Variables:

2

Discrete Variables:

0

Constraints:

0

Equality Constraints:

0

Inequality Constraints:

0

Bounded Variables:

No


class ForresterMultiFiHi

Bases: ForresterMultiFiBase

Hi-fidelity class for a forrester multifidelity problem


Problem Description

Multifidelity analysis occurs when different analysis or simulation codes predict the same response. Often in engineering different analysis codes are distinguished by their computational complexity and accuracy, for example, a quick calculation may be done using empirical equations while an expensive calculation may be cone using finite element analysis. Mathematically, we have a greater quanitity of low-fidelity data 𝑋𝑙,𝑦𝑙 and a more accurate but lower quantity of high-fidelity data 𝑋ℎ,𝑦ℎ . We would like to build a model that leverages all collected data.

One method for accomplishing is to construct a correction model of the form

𝑦ℎ=𝑍𝜌𝑦𝑙+𝑍𝑑

Problem Metadata

Test Goal:

Optimization

Problem Type:

Continuous

Variables:

1

Continuous Variables:

1

Discrete Variables:

0

Constraints:

0

Equality Constraints:

0

Inequality Constraints:

0

Bounded Variables:

Yes


class ForresterMultiFiLo

Bases: ForresterMultiFiBase

Lo-fidelity class for a forrester multifidelity problem. User can set values for A,B & C while defining the problem that affects the low-fidelity evaluator value as the values of A, B & C are then multiplied with high-fidelity evaluator value : A*f_high(x) + B*(x-0.5)**2 + C End user can modify values of A, B & C by passing them as functional argumnets while instantiating ForresterMultiFiLo() e.g. ForresterMultiFiLo(A = 0.6, B = 3.0, C = -1.2)


Problem Description

Multifidelity analysis occurs when different analysis or simulation codes predict the same response. Often in engineering different analysis codes are distinguished by their computational complexity and accuracy, for example, a quick calculation may be done using empirical equations while an expensive calculation may be cone using finite element analysis. Mathematically, we have a greater quanitity of low-fidelity data 𝑋𝑙,𝑦𝑙 and a more accurate but lower quantity of high-fidelity data 𝑋ℎ,𝑦ℎ . We would like to build a model that leverages all collected data.

One method for accomplishing is to construct a correction model of the form

𝑦ℎ=𝑍𝜌𝑦𝑙+𝑍𝑑

Problem Metadata

Test Goal:

Optimization

Problem Type:

Continuous

Variables:

1

Continuous Variables:

1

Discrete Variables:

0

Constraints:

0

Equality Constraints:

0

Inequality Constraints:

0

Bounded Variables:

Yes


class G6Problem

Bases: TestEvaluator

Implement the G6 constrained optimization benchmark problem.

\[\begin{split}\begin{aligned} \min\quad & f(x) = (x_1 - 10)^3 + (x_2 - 20)^3 \\[1em] \text{s.t.}\quad & g_1(x) = -(x_1 - 5)^2 - (x_2 - 5)^2 + 100 \leq 0 \\ & g_2(x) = (x_1 - 6)^2 + (x_2 - 5)^2 - 82.81 \leq 0 \end{aligned}\end{split}\]

Variable bounds:

\[13 \leq x_1 \leq 100, \quad 0 \leq x_2 \leq 100\]

Known optimal solution:

\[x^* = (14.095, 0.84296), \quad f(x^*) \approx -6961.81388\]

Initial guess (feasible):

\[x_0 = (20.0, 5.5)\]

Problem Description

\[\begin{split}\begin{aligned} \min\quad & f(x) = (x_1 - 10)^3 + (x_2 - 20)^3 \\ \text{s.t.}\quad & g_1(x) = -(x_1 - 5)^2 - (x_2 - 5)^2 + 100 \leq 0 \\ & g_2(x) = (x_1 - 6)^2 + (x_2 - 5)^2 - 82.81 \leq 0 \end{aligned}\end{split}\]

Variable bounds:

\[13 \leq x_1 \leq 100, \quad 0 \leq x_2 \leq 100\]

Known optimal solution:

\[x^* = (14.095, 0.84296), \quad f(x^*) \approx -6961.81388\]

Reference

Floudas, C.A. and Pardalos, P.M., “A Collection of Test Problems for Constrained Global Optimization Algorithms”, Springer-Verlag, 1990.

Problem Metadata

Test Goal:

Optimization

Problem Type:

Continuous

Variables:

2

Continuous Variables:

2

Discrete Variables:

0

Constraints:

2

Equality Constraints:

0

Inequality Constraints:

2

Bounded Variables:

Yes


class G7Problem

Bases: TestEvaluator

G7 constrained optimization benchmark (10D, 8 constraints).

Minimise:
f = x1² + x2² + x1·x2 − 14·x1 − 16·x2 + (x3−10)²
  • 4·(x4−5)² + (x5−3)² + 2·(x6−1)² + 5·x7²

  • 7·(x8−11)² + 2·(x9−10)² + (x10−7)² + 45

Subject to g1–g8 ≤ 0:

g1 = −105 + 4·x1 + 5·x2 − 3·x7 + 9·x8 g2 = 10·x1 − 8·x2 − 17·x7 + 2·x8 g3 = −8·x1 + 2·x2 + 5·x9 − 2·x10 − 12 g4 = 3·(x1−2)² + 4·(x2−3)² + 2·x3² − 7·x4 − 120 g5 = 5·x1² + 8·x2 + (x3−6)² − 2·x4 − 40 g6 = x1² + 2·(x2−2)² − 2·x1·x2 + 14·x5 − 6·x6 g7 = 0.5·(x1−8)² + 2·(x2−4)² + 3·x5² − x6 − 30 g8 = −3·x1 + 6·x2 + 12·(x9−8)² − 7·x10

with x_i ∈ [-10, 10] for i = 1, …, 10.

Citation:

Hock, W. and Schittkowski, K., “Test Examples for Nonlinear Programming Codes”, Springer-Verlag, 1981.


Problem Description

G7 constrained optimization benchmark (10D, 8 constraints). Hock & Schittkowski, 1981.

Minimise:

\[f = x_1^2 + x_2^2 + x_1 x_2 - 14 x_1 - 16 x_2 + (x_3 - 10)^2 + 4(x_4 - 5)^2 + (x_5 - 3)^2 + 2(x_6 - 1)^2 + 5 x_7^2 + 7(x_8 - 11)^2 + 2(x_9 - 10)^2 + (x_{10} - 7)^2 + 45\]

Subject to:

g1 = -105 + 4*x1 + 5*x2 - 3*x7 + 9*x8 <= 0
g2 = 10*x1 - 8*x2 - 17*x7 + 2*x8 <= 0
g3 = -8*x1 + 2*x2 + 5*x9 - 2*x10 - 12 <= 0
g4 = 3*(x1-2)^2 + 4*(x2-3)^2 + 2*x3^2 - 7*x4 - 120 <= 0
g5 = 5*x1^2 + 8*x2 + (x3-6)^2 - 2*x4 - 40 <= 0
g6 = x1^2 + 2*(x2-2)^2 - 2*x1*x2 + 14*x5 - 6*x6 <= 0
g7 = 0.5*(x1-8)^2 + 2*(x2-4)^2 + 3*x5^2 - x6 - 30 <= 0
g8 = -3*x1 + 6*x2 + 12*(x9-8)^2 - 7*x10 <= 0

with x_i in [-10, 10] for i = 1, …, 10.

Reference

Hock, W. and Schittkowski, K., “Test Examples for Nonlinear Programming Codes”, Springer-Verlag, 1981.

Problem Metadata

Test Goal:

Optimization

Problem Type:

Continuous

Variables:

10

Continuous Variables:

10

Discrete Variables:

0

Constraints:

8

Equality Constraints:

0

Inequality Constraints:

8

Bounded Variables:

Yes


class HS100

Bases: TestEvaluator

\[\begin{split}\begin{aligned} \min\quad & (x_1 - 10)^2 + 5(x_2 - 12)^2 + x_3^4 + 3(x_4 - 11)^2\\ & + 10x_5^6 + 7x_6^2 + x_7^4 - 4x_6x_7 - 10x_6 - 8x_7\\[1em] \text{s.t.}\quad & 2x_1^2 + 3x_2^4 + x_3 + 4x_4^2 + 5x_5 \leq 127\\ & 7x_1 + 3x_2 + 10x_3^2 + x_4 - x_5 \leq 282\\ & 23x_1 + x_2^2 + 6x_6 - 8x_7 \leq 196\\ & 4x_1^2 + x_2^2 - 3x_1x_2 + 2x_3^2 + 5x_6 - 11x_7 \geq 0 \end{aligned}\end{split}\]

The following bounds are placed on the variables:

\[-10 \leq x_i \leq 10.075 \qquad i = 1,...,7\]

This has a known solution of

\[f(2.330499, 1.951372, -0.4775414, 4.365726, -0.6244870, 1.038131, 1.594227) = 680.6300573\]

An initial guess is also defined for this class as

\[f(1, 2, 0, 4, 0, 1, 1) = 714\]

Problem Description

\[\begin{split}\begin{aligned} \min\quad & (x_1 - 10)^2 + 5(x_2 - 12)^2 + x_3^4 + 3(x_4 - 11)^2\\ & + 10x_5^6 + 7x_6^2 + x_7^4 - 4x_6x_7 - 10x_6 - 8x_7\\[1em] \text{s.t.}\quad & 2x_1^2 + 3x_2^4 + x_3 + 4x_4^2 + 5x_5 \leq 127\\ & 7x_1 + 3x_2 + 10x_3^2 + x_4 - x_5 \leq 282\\ & 23x_1 + x_2^2 + 6x_6 - 8x_7 \leq 196\\ & 4x_1^2 + x_2^2 - 3x_1x_2 + 2x_3^2 + 5x_6 - 11x_7 \geq 0 \end{aligned}\end{split}\]

The following bounds are placed on the variables:

\[-10 \leq x_i \leq 10.075 \qquad i = 1,...,7\]

Reference

Hock, Willi, and Klaus Schittkowski. “Test examples for nonlinear programming codes.” Journal of optimization theory and applications 30 (1980): 127-129.

Problem Metadata

Test Goal:

Optimization

Problem Type:

Continuous

Variables:

7

Continuous Variables:

7

Discrete Variables:

0

Constraints:

4

Equality Constraints:

0

Inequality Constraints:

4

Bounded Variables:

Yes


class HS118

Bases: TestEvaluator

Implement the Hock-Schittkowski number 118 problem

x0 = ( 20.0, 55.0, 15.0, 20.0, 60.0, 20.0, 20.0, 60.0, 20.0, 20.0, 60.0, 20.0, 20.0, 60.0, 20.0 )

f(x0) = 942.7162499999998

x* = ( 8.0, 49.0, 3.0, 1.0, 56.0, 0.0, 1.0, 63.0, 6.0, 3.0, 70.0, 12.0, 5.0, 77.0, 18.0 )

f(x*) = 664.82045000


Problem Description

\[\begin{split}\begin{aligned} x0 &= ( 20.0, 55.0, 15.0, 20.0, 60.0, 20.0, 20.0, 60.0, 20.0, 20.0, 60.0, 20.0, 20.0, 60.0, 20.0 ) \\ f(x0) &= 942.7162499999998 \\ x^* &= ( 8.0, 49.0, 3.0, 1.0, 56.0, 0.0, 1.0, 63.0, 6.0, 3.0, 70.0, 12.0, 5.0, 77.0, 18.0 ) \\ f(x^*) &= 664.82045000 \end{aligned}\end{split}\]

Reference

Hock, Willi, and Klaus Schittkowski. “Test examples for nonlinear programming codes.” Journal of optimization theory and applications 30 (1980): 127-129.

Problem Metadata

Test Goal:

Optimization

Problem Type:

Continuous

Variables:

15

Continuous Variables:

15

Discrete Variables:

0

Constraints:

17

Equality Constraints:

0

Inequality Constraints:

17

Bounded Variables:

Yes


class HS38

Bases: TestEvaluator

Implement the Hock-Schittkowski number 38 problem.

\[\min f(x) = 100(x_2 - x_1^2)^2 + (1 - x_1)^2 + 90(x_4 - x_3^2)^2 + (1-x_3)^2 + 10.1[(x_2-1)^2 + (x_4-1)^2] + 19.8(x_2-1)(x_4-1)\]

x0 = (-3.0, -1.0, -3.0, -1.0)

f(x0) = 19192.0

x* = (1.0, 1.0, 1.0, 1.0)

f(x*) = 0.0


Problem Description

\[\min f(x) = 100(x_2 - x_1^2)^2 + (1 - x_1)^2 + 90(x_4 - x_3^2)^2 + (1-x_3)^2 + 10.1[(x_2-1)^2 + (x_4-1)^2] + 19.8(x_2-1)(x_4-1)\]

x0 = (-3.0, -1.0, -3.0, -1.0)

f(x0) = 19192.0

x* = (1.0, 1.0, 1.0, 1.0)

f(x*) = 0.0

Reference

Hock, Willi, and Klaus Schittkowski. “Test examples for nonlinear programming codes.” Journal of optimization theory and applications 30 (1980): 127-129.

Problem Metadata

Test Goal:

Optimization

Problem Type:

Continuous

Variables:

4

Continuous Variables:

4

Discrete Variables:

0

Constraints:

0

Equality Constraints:

0

Inequality Constraints:

0

Bounded Variables:

Yes


class HS47

Bases: TestEvaluator

Implement the Hock-Schittkowski number 47 problem.

\[\begin{split}\begin{aligned} \min\quad & f(x) = (x_1 - x_2)^2 + (x_2 - x_3)^3 +(x_3 - x_4)^4 + (x_4 - x_5)^4\\[1em] \text{s.t}\quad & c_1 = x_1 + x_2^2 + x_3^3 - 3 = 0\\ & c_2 = x_2 - x_3^2 + x_4 - 1 = 0\\ & c_3 = x_1x_5 - 1 = 0 \end{aligned}\end{split}\]

\(x_0 = (2.0,~ \sqrt{2.0},~ -1.0,~ 2.0 - \sqrt{2.0},~ 0.5)\)

f(x0) = 12.4954368

x* = (1.0, 1.0, 1.0, 1.0, 1.0)

f(x*) = 0.0


Problem Description

\[\begin{split}\begin{aligned} \min\quad & f(x) = (x_1 - x_2)^2 + (x_2 - x_3)^3 +(x_3 - x_4)^4 + (x_4 - x_5)^4\\[1em] \text{s.t}\quad & c_1 = x_1 + x_2^2 + x_3^3 - 3 = 0\\ & c_2 = x_2 - x_3^2 + x_4 - 1 = 0\\ & c_3 = x_1x_5 - 1 = 0 \end{aligned}\end{split}\]

The initial point is given by:

\[x_0 = (2.0,~ \sqrt{2.0},~ -1.0,~ 2.0 - \sqrt{2.0},~ 0.5)\]

Reference

Hock, Willi, and Klaus Schittkowski. “Test examples for nonlinear programming codes.” Journal of optimization theory and applications 30 (1980): 127-129.

Problem Metadata

Test Goal:

Optimization

Problem Type:

Continuous

Variables:

5

Continuous Variables:

5

Discrete Variables:

0

Constraints:

3

Equality Constraints:

3

Inequality Constraints:

0

Bounded Variables:

No


class HelicalValley

Bases: TestEvaluator

Small dimensional example function

\[\begin{split}\begin{aligned} \min\quad & f = f_1^2 + f_2^2 + x_3^2\\[1em] \text{where}\quad & \theta = \begin{cases} \frac{\arctan(x_2/x_1)}{2\pi} & x_1 \geq 0\\ \frac{\arctan(x_2/x_1)}{2\pi} + 0.5 & x_1 < 0 \end{cases}\\ & f_1 = 10(x_3 - 10\theta)\\ & f_2 = 10(\sqrt{x_1^2 + x_2^2} - 1) \end{aligned}\end{split}\]

Problem Description

\[\begin{split}\begin{aligned} \min\quad & f = f_1^2 + f_2^2 + x_3^2\\[1em] \text{where}\quad & \theta = \begin{cases} \frac{\arctan(x_2/x_1)}{2\pi} & x_1 \geq 0\\ \frac{\arctan(x_2/x_1)}{2\pi} + 0.5 & x_1 < 0 \end{cases}\\ & f_1 = 10(x_3 - 10\theta)\\ & f_2 = 10(\sqrt{x_1^2 + x_2^2} - 1) \end{aligned}\end{split}\]

Reference

    1. More, B. S. Garbow and K. E. Hillstrom, “Testing Unconstrained Optimization Software,” ACM Transac tions on Mathematical Software, Vol. 7, No. 1, 1981, pp. 19-31. doi:10.1145/355934.355936

Problem Metadata

Test Goal:

Optimization

Problem Type:

Continuous

Variables:

3

Continuous Variables:

3

Discrete Variables:

0

Constraints:

0

Equality Constraints:

0

Inequality Constraints:

0

Bounded Variables:

No


class HyperbolicTangentTensorProduct

Bases: TestEvaluator

The hyperbolic tangent tensor product function approximates a step function which causes oscillation with some surrogate models. It is given by:

\[f(\mathbf{x}) = \prod_{i=1}^n \tanh(a \cdot x_i)\]

with \(-1 \leq x_i \leq 1\) for \(i = 1,\ldots,n\).


Problem Description

The hyperbolic tangent tensor product function approximates a step function which causes oscillation with some surrogate models. It is given by:

\[f(\mathbf{x}) = \prod_{i=1}^n \tanh(a \cdot x_i)\]
-1 <= x_i <= 1 for i = 1,…,n.

Reference

Mohamed Amine Bouhlel, John T. Hwang, Nathalie Bartoli, Rémi Lafage, Joseph Morlier and Joaquim R. R. A. Martins, A Python surrogate modeling framework with derivatives, Advances in Engineering Software (2019).

Problem Metadata

Test Goal:

Optimization

Problem Type:

Continuous

Variables:

1

Continuous Variables:

1

Discrete Variables:

0

Constraints:

0

Equality Constraints:

0

Inequality Constraints:

0

Bounded Variables:

Yes


Methods:

__init__([num_independent, num_dependent, ...])

Constructor method for the hyperbolic tangent tensor product function.

__init__(num_independent=1, num_dependent=1, name=None, comp_cost=100, **kwargs)

Constructor method for the hyperbolic tangent tensor product function.

Parameters:
  • num_independent (int, optional) – Number of independent variables. Must be >= 1. Defaults to 1.

  • num_dependent (int, optional) – Number of dependent variables. Must be >= 1. Defaults to 1.

  • name (str, optional) – Name to give the evaluator.

  • comp_cost (float, optional) – Computational cost of evaluating. Defaults to 100.

  • **kwargs (dict) – Additional keyword arguments, including options for a HyperbolicTangentTensorProductOptions instance.

Return type:

None

class OptlibTest

Bases: TestEvaluator

The example can be found in the Optlib 6.2 manual on page 308. The example can be found in the SOCS 7.1 manual on page 625.

\[\begin{split}\begin{aligned} \min\quad & f = (x_1 - 1)^2 + (x_1 - x_2)^2 + (x_2 - x_3)^4\\[1em] \text{s.t.}\quad & c = x_1(1 + x_2^2) + x_3^4 - 4 - 3\sqrt{2} = 0 \end{aligned}\end{split}\]

The optimal solution in the SOCS manual is

x* = [1.104859034205678, 1.196674180655277, 1.535262258200661]

with f = 0.032568200256415, c = 1.253397385880817e-010


Problem Description

The example can be found in the Optlib 6.2 manual on page 308. The example can be found in the SOCS 7.1 manual on page 625.

\[\begin{split}\begin{aligned} \min\quad & f = (x_1 - 1)^2 + (x_1 - x_2)^2 + (x_2 - x_3)^4\\[1em] \text{s.t.}\quad & c = x_1(1 + x_2^2) + x_3^4 - 4 - 3\sqrt{2} = 0 \end{aligned}\end{split}\]

The optimal solution in the SOCS manual is

x* = [1.104859034205678, 1.196674180655277, 1.535262258200661]

with f = 0.032568200256415, c = 1.253397385880817e-010

Problem Metadata

Test Goal:

Optimization

Problem Type:

Continuous

Variables:

3

Continuous Variables:

3

Discrete Variables:

0

Constraints:

1

Equality Constraints:

1

Inequality Constraints:

0

Bounded Variables:

Yes


class PowellSingularFunction

Bases: TestEvaluator

The Extended Powell Singular function.

This function comes from “Numerical Methods for Unconstrained Optimization and Nonlinear Equations” by J.E. Dennis Jr. and R.B. Shnabel.

\[\begin{split}\begin{aligned} \min \quad& f = f_1^2 + f_2^2 + f_3^2 + f_4^2\\[.75em] \text{where} \quad& f_1 = x_1 + 10x_2\\ & f_2 = \sqrt{5}\cdot(x_3 - x_4)\\ & f_3 = x_2 - 2x_3\\ & f_4 = \sqrt{10}\cdot(x_1 - x_4) \end{aligned}\end{split}\]

The initial guess provided for this problem is

\[f(3, -1, 0, 1) = 95\]

Problem Description

The Extended Powell Singular function.

This function comes from “Numerical Methods for Unconstrained Optimization and Nonlinear Equations” by J.E. Dennis Jr. and R.B. Schnabel.

\[\begin{split}\begin{aligned} \min \quad& f = f_1^2 + f_2^2 + f_3^2 + f_4^2\\[.75em] \text{where} \quad& f_1 = x_1 + 10x_2\\ & f_2 = \sqrt{5}\cdot(x_3 - x_4)\\ & f_3 = x_2 - 2x_3\\ & f_4 = \sqrt{10}\cdot(x_1 - x_4) \end{aligned}\end{split}\]

The initial guess provided for this problem is:

\[f(3, -1, 0, 1) = 95\]

Reference

J.E. Dennis Jr. and R.B. Schnabel, ‘Numerical Methods for Unconstrained Optimization and Nonlinear Equations’

Problem Metadata

Test Goal:

Optimization

Problem Type:

Continuous

Variables:

4

Continuous Variables:

4

Discrete Variables:

0

Constraints:

0

Equality Constraints:

0

Inequality Constraints:

0

Bounded Variables:

No


class Rosenbrock

Bases: TestEvaluator

The Rosenbrock function is a continuous, nonlinear, and non-convex function used in optimization. It is given by:

\[f(\mathbf{x}) = \sum_{i=1}^{n-1} \left[(x_{i+1} - x_i^2)^2 + (x_i - 1)^2\right]\]

with \(-2 \leq x_i \leq 2\) for \(i = 1,\ldots,n\).


Problem Description

The Rosenbrock function is a continuous, nonlinear, and non-convex function used in optimization. It is given by:

\[f(\mathbf{x}) = \sum_{i=1}^{n-1} \left[(x_{i+1} - x_i^2)^2 + (x_i - 1)^2\right]\]
-2 <= x_i <= 2 for i = 1,…,n.

Reference

Mohamed Amine Bouhlel, John T. Hwang, Nathalie Bartoli, Rémi Lafage, Joseph Morlier and Joaquim R. R. A. Martins, A Python surrogate modeling framework with derivatives, Advances in Engineering Software (2019).

Problem Metadata

Test Goal:

Optimization

Problem Type:

Continuous

Variables:

2

Continuous Variables:

2

Discrete Variables:

0

Constraints:

0

Equality Constraints:

0

Inequality Constraints:

0

Bounded Variables:

Yes


Methods:

__init__([name, comp_cost, num_independent, ...])

Constructor method for the Rosenbrock function.

__init__(name=None, comp_cost=100, num_independent=None, num_dependent=None, **kwargs)

Constructor method for the Rosenbrock function.

Parameters:
  • name (str)

  • comp_cost (float)

  • num_independent (int)

  • num_dependent (int)

Return type:

None

class SimpleMultiFiHi

Bases: SimpleMultiFiBase

Hi-fidelity class for a simple multifidelity problem

This class represents the high-fidelity version of a simple multifidelity optimization problem with two independent variables and three dependent responses. The problem is designed to test optimization algorithms in a multifidelity context, where the high-fidelity model provides more accurate but computationally expensive evaluations.

Problem Definition:

Variables:
  • x: Independent variable bounded between 0 and π

  • y: Independent variable bounded between 0 and π

Responses:
  • f: Objective function to be minimized, defined as f(x, y) = -sin(x) * sin(y)

  • c1: Constraint 1, defined as c1(x, y) = exp(x) * y - 5 ≤ 0

  • c2: Constraint 2, defined as c2(x, y) = sin(x) * cos(y) - 1 ≤ 0

Objective:

Minimize the function f(x, y).

Constraints:
  • c1(x, y) ≤ 0

  • c2(x, y) ≤ 0

Bounds:
  • 0 ≤ x ≤ π

  • 0 ≤ y ≤ π

Notes:

  • The objective function is nonlinear and smooth.

  • The constraints are nonlinear and define feasible regions in the design space.

  • This high-fidelity model is intended to be more accurate than lower-fidelity approximations, and thus is typically more computationally expensive to evaluate.

  • The known optimal solution is approximately (x, y) = (1.2963, 1.3677).

References:

  • Original problem inspired by Joe Simonis and adapted by Mark Abramson.

  • Date of creation: June 12, 2015.


Problem Description

Source code for a simple multifidelity problem capturing the common information. author: Mark Abramson (Joe Simonis invented the test problem) date Jun 12, 2015

Problem Metadata

Test Goal:

Optimization

Problem Type:

Continuous

Variables:

2

Continuous Variables:

2

Discrete Variables:

0

Constraints:

2

Equality Constraints:

0

Inequality Constraints:

2

Bounded Variables:

Yes


class SimpleMultiFiLo

Bases: SimpleMultiFiBase

Source code for a simple multifidelity problem, invented by Joe Simonis, at lowest fidelity. Low-fidelity class for a simple multifidelity problem This class represents the low-fidelity version of a simple multifidelity optimization problem with two independent variables and three dependent responses. The low-fidelity model provides a simplified and computationally cheaper approximation of the high-fidelity problem, useful for multifidelity optimization strategies.

Problem Definition:

Variables:
  • x: Independent variable bounded between 0 and π (inherited from base)

  • y: Independent variable bounded between 0 and π (inherited from base)

Responses:
  • f: Objective function to be minimized, defined as f(x, y) = -x * y

  • c1: Constraint 1, defined as c1(x, y) = (1 + x) * y - 5 ≤ 0

  • c2: Constraint 2, defined as c2(x) = x - 1 ≤ 0

Objective:

Minimize the function f(x, y).

Constraints:
  • c1(x, y) ≤ 0

  • c2(x) ≤ 0

Bounds:
  • 0 ≤ x ≤ π

  • 0 ≤ y ≤ π

Notes:

  • The objective and constraints are linear or simpler compared to the high-fidelity model, making this model computationally cheaper but less accurate.

  • This low-fidelity model is intended to be used in conjunction with higher-fidelity models in multifidelity optimization frameworks.

  • The known optimal solution is approximately (x, y) = (2.0, 1.6667).

References:

  • Problem inspired by Joe Simonis and adapted by Mark Abramson.

  • Date of creation: June 12, 2015.


Problem Description

Source code for a simple multifidelity problem capturing the common information. author: Mark Abramson (Joe Simonis invented the test problem) date Jun 12, 2015

Problem Metadata

Test Goal:

Optimization

Problem Type:

Continuous

Variables:

2

Continuous Variables:

2

Discrete Variables:

0

Constraints:

2

Equality Constraints:

0

Inequality Constraints:

2

Bounded Variables:

Yes


class SimpleMultiFiMid

Bases: SimpleMultiFiBase

Source code for a simple multifidelity problem, which was invented by Joe Simonis Mid-fidelity class for a simple multifidelity problem This class represents the mid-fidelity version of a simple multifidelity optimization problem with two independent variables and three dependent responses. The mid-fidelity model provides a balance between computational cost and accuracy, serving as an intermediate approximation between the low- and high-fidelity models.

Problem Definition:

Variables:
  • x: Independent variable bounded between 0 and π (inherited from base)

  • y: Independent variable bounded between 0 and π (inherited from base)

Responses:
  • f: Objective function to be minimized, approximated as

    ( f(x, y) = -sin(x) sin(y) ) using Taylor series expansions of sine functions

  • c1: Constraint 1, approximated as

    ( c_1(x, y) = e^x y - 5 leq 0 ) using a truncated Taylor series expansion for ( e^x )

  • c2: Constraint 2, approximated as

    ( c_2(x, y) = sin(x) cos(y) - 1 leq 0 ) using Taylor series expansions for sine and cosine

Objective:

Minimize the function ( f(x, y) ).

Constraints:
  • ( c_1(x, y) leq 0 )

  • ( c_2(x, y) leq 0 )

Bounds:
  • ( 0 leq x leq pi )

  • ( 0 leq y leq pi )

Notes:

  • The mid-fidelity model uses Taylor series expansions to approximate nonlinear functions, reducing computational complexity compared to the high-fidelity model.

  • This model is intended to provide a compromise between accuracy and computational cost, useful in multifidelity optimization frameworks.

  • The known optimal solution is approximately (x, y) = (1.33475, 1.38051).

References:

  • Problem inspired by Joe Simonis and adapted by Mark Abramson.

  • Date of creation: June 12, 2015.


Problem Description

Source code for a simple multifidelity problem capturing the common information. author: Mark Abramson (Joe Simonis invented the test problem) date Jun 12, 2015

Problem Metadata

Test Goal:

Optimization

Problem Type:

Continuous

Variables:

2

Continuous Variables:

2

Discrete Variables:

0

Constraints:

2

Equality Constraints:

0

Inequality Constraints:

2

Bounded Variables:

Yes


class SpeedReducer

Bases: TestEvaluator

Speed reducer (gear box) design optimization problem.

Minimizes the weight of a speed reducer subject to 11 constraints on bending stress, surface stress, transverse deflection of shafts, and geometric restrictions.

\[\min\quad f(\mathbf{x}) = 0.7854\,x_1 x_2^2 (3.3333\,x_3^2 + 14.9334\,x_3 - 43.0934) - 1.508\,x_1 (x_6^2 + x_7^2) + 7.4777\,(x_6^3 + x_7^3) + 0.7854\,(x_4 x_6^2 + x_5 x_7^2)\]

subject to 11 inequality constraints g_1, ldots, g_{11} leq 0.

Variables and bounds:

Var

Description

Lower

Upper

x1

Face width

2.6

3.6

x2

Module of teeth

0.7

0.8

x3

Number of teeth

17

28

x4

Length of shaft 1

7.3

8.3

x5

Length of shaft 2

7.8

8.3

x6

Diameter of shaft 1

2.9

3.9

x7

Diameter of shaft 2

5.0

5.5

Reference:

Golinski, J., “An Adaptive Optimization System Applied to Machine Synthesis”, Mechanism and Machine Theory, 8(4), pp. 419-436, 1973.


Problem Description

Speed reducer (gear box) weight minimization with 11 constraints on stress, deflection, and geometry.

Reference

Golinski, J., “An Adaptive Optimization System Applied to Machine Synthesis”, Mechanism and Machine Theory, 8(4), pp. 419-436, 1973.

Problem Metadata

Test Goal:

Optimization

Problem Type:

Continuous

Variables:

7

Continuous Variables:

7

Discrete Variables:

0

Constraints:

11

Equality Constraints:

0

Inequality Constraints:

11

Bounded Variables:

Yes


class Sphere

Bases: TestEvaluator

The sphere function is quadratic, continuous, and convex. It is given by:

\[f(\mathbf{x}) = \sum_{i=1}^n x_i^2\]

with \(-10 \leq x_i \leq 10\) for \(i = 1,\ldots,n\).


Problem Description

The sphere function is quadratic, continuous, and convex. It is given by:

\[f(\mathbf{x}) = \sum_{i=1}^n x_i^2\]
-10 <= x_i <= 10 for i = 1,…,n.

Reference

Mohamed Amine Bouhlel, John T. Hwang, Nathalie Bartoli, Rémi Lafage, Joseph Morlier and Joaquim R. R. A. Martins, A Python surrogate modeling framework with derivatives, Advances in Engineering Software (2019).

Problem Metadata

Test Goal:

Optimization

Problem Type:

Continuous

Variables:

1

Continuous Variables:

1

Discrete Variables:

0

Constraints:

0

Equality Constraints:

0

Inequality Constraints:

0

Bounded Variables:

Yes


Methods:

__init__([name, comp_cost, num_independent, ...])

Constructor method for the sphere function.

__init__(name=None, comp_cost=100, num_independent=None, num_dependent=None, **kwargs)

Constructor method for the sphere function.

Parameters:
  • name (str)

  • comp_cost (float)

  • num_independent (int)

  • num_dependent (int)

Return type:

None

class TP37

Bases: TestEvaluator

Implement the Rosenbrock Post Office problem, with derivatives minimize y1 subject to

0 <= x(i) <= 42, i=1,…,3

y2 <= 0.0

y3 >= 0.0

x* = ( 0.24000000E+02 0.12000000E+02 0.12000000E+02 )

at x* (y1, y2, y3) = (-3456.0, 0.0, 72.0)


Problem Description

Implement the Rosenbrock Post Office problem, with derivatives

minimize y1 subject to

0 <= x(i) <= 42, i=1,…,3

y2 <= 0.0

y3 >= 0.0

x* = ( 0.24000000E+02 0.12000000E+02 0.12000000E+02 )

at x* (y1, y2, y3) = (-3456.0, 0.0, 72.0)

Problem Metadata

Test Goal:

Optimization

Problem Type:

Continuous

Variables:

3

Continuous Variables:

3

Discrete Variables:

0

Constraints:

2

Equality Constraints:

0

Inequality Constraints:

2

Bounded Variables:

Yes


Methods:

__gradient__(sites)

Calculate the TP37_WD function gradient :param df: The dataframe that contains the input values :type df: DataFrame :return: The Gradient values :rtype: DataFrame

__gradient__(sites)

Calculate the TP37_WD function gradient :param df: The dataframe that contains the input values :type df: DataFrame :return: The Gradient values :rtype: DataFrame

Parameters:

sites (DataFrame)

Return type:

DataFrame

class Trigonometric

Bases: TestEvaluator

Trigonometric function “Numerical Methods for Unconstrained Optimization and Nonlinear Equations” by J.E. Dennis Jr. and R.B. Shnabel.

minimize f where

\[f = f_1^2 + f_2^2\]
\[f_1 = 1 - [\cos(x_1) + 2(1 - \cos(x_1)) - \sin(x_1)] - [\cos(x_2) + 2(1 - \cos(x_1)) - \sin(x_1)]\]
\[f_2 = 1 - [\cos(x_1) + 2(1 - \cos(x_2)) - \sin(x_2)] - [\cos(x_2) + 2(1 - \cos(x_2)) - \sin(x_2)]\]

Problem Description

Trigonometric function from “Numerical Methods for Unconstrained Optimization and Nonlinear Equations” by J.E. Dennis Jr. and R.B. Schnabel.

minimize f where:

\[f = f_1^2 + f_2^2\]
\[\begin{split}\begin{aligned} f_1 &= 1 - [\cos(x_1) + 2(1 - \cos(x_1)) - \sin(x_1)] \\ &\quad - [\cos(x_2) + 2(1 - \cos(x_1)) - \sin(x_1)] \end{aligned}\end{split}\]
\[\begin{split}\begin{aligned} f_2 &= 1 - [\cos(x_1) + 2(1 - \cos(x_2)) - \sin(x_2)] \\ &\quad - [\cos(x_2) + 2(1 - \cos(x_2)) - \sin(x_2)] \end{aligned}\end{split}\]

Reference

J.E. Dennis Jr. and R.B. Schnabel, ‘Numerical Methods for Unconstrained Optimization and Nonlinear Equations’

Problem Metadata

Test Goal:

Optimization

Problem Type:

Continuous

Variables:

2

Continuous Variables:

2

Discrete Variables:

0

Constraints:

0

Equality Constraints:

0

Inequality Constraints:

0

Bounded Variables:

No


class TwoBarTruss

Bases: TestEvaluator

The Two Bar Truss evaluator. This evaluator is a concrete class which inherits from the abstract DE::Evaluator class. This is to be used as an example for deriving Design Explorer Evaluators and for testing future optimization methods.

The example is a two-bar truss. See A robust design method using variable transformation and Gauss-Hermite integration by Beiqing Huang and Xiaoping Du, INTERNATIONAL JOURNAL FOR NUMERICAL METHODS IN ENGINEERING Int. J. Numer. Meth. Engng 2006; 66:1841-1858

The problem has five design variables with types as follows:
  • X1 - double, cross-sectional area of the truss

  • X2 - double, half distance between two bottom rollers.

  • rho - double, the density of the bar material

  • Q - double, magnitude of the external force Q applied on the top of the truss

  • S - double, the bar material’s tensile strength

There are three responses:
  • f, double, weight

  • g1, double, strength 1

  • g2, double, strength 2

The objective of the design is to minimize the weight of the two-bar truss subject to the two strength constraints about the axial stress in each bar.


Problem Description

The Two Bar Truss evaluator. This evaluator is a concrete class which inherits

from the abstract DE::Evaluator class. This is to be used as an example for deriving Design Explorer Evaluators and for testing future optimization methods.

The example is a two-bar truss. See A robust design method using variable transformation and Gauss-Hermite integration by Beiqing Huang and Xiaoping Du, INTERNATIONAL JOURNAL FOR NUMERICAL METHODS IN ENGINEERING Int. J. Numer. Meth. Engng 2006; 66:1841-1858

The problem has five design variables with types as follows:
  • X1 - double, cross-sectional area of the truss

  • X2 - double, half distance between two bottom rollers.

  • rho - double, the density of the bar material

  • Q - double, magnitude of the external force Q applied on the top of the truss

  • S - double, the bar material’s tensile strength

There are three responses:
  • f, double, weight

  • g1, double, strength 1

  • g2, double, strength 2

The objective of the design is to minimize the weight of the two-bar truss subject to the two strength constraints about the axial stress in each bar.

Reference

Beiqing Huang and Xiaoping Du, “A robust design method using variable transformation and Gauss-Hermite integration,” INTERNATIONAL JOURNAL FOR NUMERICAL METHODS IN ENGINEERING, Int. J. Numer. Meth. Engng 2006; 66:1841-1858.

Problem Metadata

Test Goal:

Optimization

Problem Type:

Continuous

Variables:

5

Continuous Variables:

5

Discrete Variables:

0

Constraints:

2

Equality Constraints:

0

Inequality Constraints:

2

Bounded Variables:

No


class WrkBkPrb1

Bases: TestEvaluator

work book problem 1 from the SOCS user’s guide page 23

minimize f(x1, x2)

subject to

1.0e-8 <= x1, x2 <= 10.0

1.0 <= c <= 100.0

where

\(c(x_1, x_2) = x_1x_2\)

\(f(x_1, x_2) = x_1^2 + x_2^2 + \ln(c)\)

x0 = (0.5, 2.0)


Problem Description

work book problem 1 from the SOCS user’s guide page 23

minimize f(x1, x2)

subject to

1.0e-8 <= x1, x2 <= 10.0

1.0 <= c <= 100.0

where

\(c(x_1, x_2) = x_1x_2\)

\(f(x_1, x_2) = x_1^2 + x_2^2 + \ln(c)\)

x0 = (0.5, 2.0)

Reference

Beiqing Huang and Xiaoping Du, “A robust design method using variable transformation and Gauss-Hermite integration,” International Journal for Numerical Methods in Engineering, Int. J. Numer. Meth. Engng 2006; 66:1841-1858.

Problem Metadata

Test Goal:

Optimization

Problem Type:

Continuous

Variables:

2

Continuous Variables:

2

Discrete Variables:

0

Constraints:

1

Equality Constraints:

0

Inequality Constraints:

1

Bounded Variables:

Yes