ResponseSurface#

Surrogate Model based on second order response surface equations.

Here is a simple example where the ResponseSurface surrogate is used to approximate the output of a sinusoidal component.

import numpy as np

import openmdao.api as om

prob = om.Problem()

sin_mm = om.MetaModelUnStructuredComp()
sin_mm.add_input('x', 2.1)
sin_mm.add_output('f_x', 0., surrogate=om.ResponseSurface())

prob.model.add_subsystem('sin_mm', sin_mm)

prob.setup()

# train the surrogate and check predicted value
sin_mm.options['train_x'] = np.linspace(0, 3.14, 20)
sin_mm.options['train_f_x'] = .5*np.sin(sin_mm.options['train_x'])

prob.set_val('sin_mm.x', 2.1)

prob.run_model()

print(prob.get_val('sin_mm.f_x'))
[1790952184.991726] [runnervm8df0l:7494 :0]        ib_iface.c:1269 UCX  ERROR mana_0: iface 0x5610f08d3800 failed to create UD QP TX wr:256 sge:6 inl:64 resp:0 RX wr:4096 sge:1 resp:0 failed: Operation not supported
[1790952184.992000] [runnervm8df0l:7494 :0]      ucp_worker.c:1412 UCX  ERROR uct_iface_open(ud_verbs/mana_0:1) failed: Input/output error
[0.43075734]
[runnervm8df0l:07494] pml_ucx.c:313  Error: Failed to create UCP worker