rbfopt_degree1_models module

Pyomo models with degree-one polynomial for RBFOpt.

This module creates all the auxiliary problems that rely on degree-one polynomials. The models are created and instantiated using Pyomo. This module does not solve the problems.

Licensed under Revised BSD license, see LICENSE. (C) Copyright Singapore University of Technology and Design 2014. (C) Copyright International Business Machines Corporation 2017.

rbfopt_degree1_models.add_integrality_constraints(model, integer_vars)[source]

Add integrality constraints to the model.

Add integrality constraints to the model by introducing extra variables.

Parameters:
model : pyomo.ConcreteModel

The model to which we want to add integrality constraints.

integer_vars : 1D numpy.ndarray[int]

List of indices of integer variables.

rbfopt_degree1_models.create_max_h_k_model(settings, n, k, var_lower, var_upper, integer_vars, node_pos, rbf_lambda, rbf_h, mat, target_val)[source]

Create the concrete model to maximize h_k.

Create the concrete model to maximize h_k, also known as the Global Search Step of the RBF method.

Parameters:
settings : rbfopt_settings.RbfoptSettings

Global and algorithmic settings.

n : int

The dimension of the problem, i.e. size of the space.

k : int

Number of nodes, i.e. interpolation points.

var_lower : 1D numpy.ndarray[float]

Vector of variable lower bounds.

var_upper : 1D numpy.ndarray[float]

Vector of variable upper bounds.

integer_vars : 1D numpy.ndarray[int]

List of indices of integer variables.

node_pos : 2D numpy.ndarray[float]

List of coordinates of the nodes (one on each row).

rbf_lambda : 1D numpy.ndarray[float]

The lambda coefficients of the RBF interpolant, corresponding to the radial basis functions. List of dimension k.

rbf_h : 1D numpy.ndarray[float]

The h coefficients of the RBF interpolant, corresponding to the polynomial. List of dimension n+1.

mat: numpy.matrix

The matrix necessary for the computation. This is the inverse of the matrix [Phi P; P^T 0], see paper as cited above. Must be a numpy.matrix of dimension ((k+1) x (k+1))

target_val : float

Value f* that we want to find in the unknown objective function.

Returns:
pyomo.ConcreteModel

The concrete model describing the problem.

rbfopt_degree1_models.create_max_one_over_mu_model(settings, n, k, var_lower, var_upper, integer_vars, node_pos, mat)[source]

Create the concrete model to maximize 1/mu.

Create the concrete model to maximize :math: 1/mu, also known as the InfStep of the RBF method.

See paper by Costa and Nannicini, equation (7) pag 4, and the references therein.

Parameters:
settings : rbfopt_settings.RbfoptSettings

Global and algorithmic settings.

n : int

The dimension of the problem, i.e. size of the space.

k : int

Number of nodes, i.e. interpolation points.

var_lower : 1D numpy.ndarray[float]

Vector of variable lower bounds.

var_upper : 1D numpy.ndarray[float]

Vector of variable upper bounds.

integer_vars : 1D numpy.ndarray[int]

List of indices of integer variables.

node_pos : 2D numpy.ndarray[float]

List of coordinates of the nodes (one on each row).

mat: numpy.matrix

The matrix necessary for the computation. This is the inverse of the matrix [Phi P; P^T 0], see paper as cited above. Must be a numpy.matrix of dimension ((k+1) x (k+1))

Returns:
pyomo.ConcreteModel

The concrete model describing the problem.

rbfopt_degree1_models.create_maximin_dist_model(settings, n, k, var_lower, var_upper, integer_vars, node_pos)[source]

Create the concrete model to maximize the minimum distance.

Create the concrete model to maximize the minimum distance to the interpolation nodes, which is the infstep of the MSRSM method.

Parameters:
settings : rbfopt_settings.RbfoptSettings

Global and algorithmic settings.

n : int

The dimension of the problem, i.e. size of the space.

k : int

Number of nodes, i.e. interpolation points.

var_lower : 1D numpy.ndarray[float]

Vector of variable lower bounds.

var_upper : 1D numpy.ndarray[float]

Vector of variable upper bounds.

integer_vars : 1D numpy.ndarray[int]

List of indices of integer variables.

node_pos : 2D numpy.ndarray[float]

List of coordinates of the nodes (one on each row).

Returns:
pyomo.ConcreteModel

The concrete model describing the problem.

rbfopt_degree1_models.create_min_bump_model(settings, n, k, Phimat, Pmat, node_val, node_err_bounds)[source]

Create a model to find RBF coefficients with min bumpiness.

Create a quadratic problem to compute the coefficients of the RBF interpolant that minimizes bumpiness and lets all points deviate by a specified amount from their value.

Parameters:
settings : rbfopt_settings.RbfoptSettings

Global and algorithmic settings.

n : int

The dimension of the problem, i.e. size of the space.

k : int

Number of nodes, i.e. interpolation points.

Phimat : numpy.matrix

Matrix Phi, i.e. top left part of the standard RBF matrix.

Pmat : numpy.matrix

Matrix P, i.e. top right part of the standard RBF matrix.

node_val : 1D numpy.ndarray[float]

List of values of the function at the nodes.

node_err_bounds : 2D numpy.ndarray[float]

Allowed deviation from node values for nodes affected by error. This is a matrix with rows (lower_deviation, upper_deviation).

Returns:
pyomo.ConcreteModel

The concrete model describing the problem.

rbfopt_degree1_models.create_min_msrsm_model(settings, n, k, var_lower, var_upper, integer_vars, node_pos, rbf_lambda, rbf_h, dist_weight, dist_min, dist_max, fmin, fmax)[source]

Create the concrete model to optimize the MSRSM objective.

Create the concreate model to minimize a weighted combination of the value of the RBF interpolant and the (negative of the) distance from the closes interpolation node. This is the Global Search Step of the MSRSM method.

Parameters:
settings : rbfopt_settings.RbfoptSettings

Global and algorithmic settings.

n : int

The dimension of the problem, i.e. size of the space.

k : int

Number of nodes, i.e. interpolation points.

var_lower : 1D numpy.ndarray[float]

Vector of variable lower bounds.

var_upper : 1D numpy.ndarray[float]

Vector of variable upper bounds.

integer_vars : 1D numpy.ndarray[int]

List of indices of integer variables.

node_pos : 2D numpy.ndarray[float]

List of coordinates of the nodes (one on each row).

rbf_lambda : 1D numpy.ndarray[float]

The lambda coefficients of the RBF interpolant, corresponding to the radial basis functions. List of dimension k.

rbf_h : 1D numpy.ndarray[float]

The h coefficients of the RBF interpolant, corresponding to the polynomial. List of dimension n+1.

dist_weight : float

The weight paramater for distance and RBF interpolant value. Must be between 0 and 1. A weight of 1.0 corresponds to using solely distance, 0.0 to objective function.

dist_min : float

The minimum distance between two interpolation nodes.

dist_max : float

The maximum distance between two interpolation nodes.

fmin : float

The minimum value of an interpolation node.

fmax : float

The maximum value of an interpolation node.

Returns:
pyomo.ConcreteModel

The concrete model describing the problem.

rbfopt_degree1_models.create_min_rbf_model(settings, n, k, var_lower, var_upper, integer_vars, node_pos, rbf_lambda, rbf_h)[source]

Create the concrete model to minimize the RBF.

Create the concrete model to minimize the RBF.

Parameters:
settings : rbfopt_settings.RbfoptSettings

Global and algorithmic settings.

n : int

The dimension of the problem, i.e. size of the space.

k : int

Number of nodes, i.e. interpolation points.

var_lower : 1D numpy.ndarray[float]

Vector of variable lower bounds.

var_upper : 1D numpy.ndarray[float]

Vector of variable upper bounds.

integer_vars : 1D numpy.ndarray[int]

List of indices of integer variables.

node_pos : 2D numpy.ndarray[float]

List of coordinates of the nodes (one on each row).

rbf_lambda : 1D numpy.ndarray[float]

The lambda coefficients of the RBF interpolant, corresponding to the radial basis functions. List of dimension k.

rbf_h : 1D numpy.ndarray[float]

The h coefficients of the RBF interpolant, corresponding to the polynomial. List of dimension n+1.

Returns:
pyomo.ConcreteModel

The concrete model describing the problem.