ROI_reformulate: Reformulate a Optimization Problem

Description Usage Arguments Details Value See Also Examples

View source: R/reformulations.R

Description

Register a new reformulation method.

Usage

1
ROI_reformulate(x, to, method = NULL)

Arguments

x

an object of class 'OP' giving the optimization problem.

to

a data.frame with the supported signatures.

method

a character string giving the name of the method.

Details

Currently ROI provides two reformulation methods.

  1. bqp_to_lp transforms binary quadratic problems to linear mixed integer problems.

  2. qp_to_socp transforms quadratic problems with linear constraints to second-order cone problems.

Value

the reformulated optimization problem.

See Also

Other reformulate functions: ROI_plugin_register_reformulation(), ROI_registered_reformulations()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
## Example from 
## Boros, Endre, and Peter L. Hammer. "Pseudo-boolean optimization."
## Discrete applied mathematics 123, no. 1 (2002): 155-225.

## minimize: 3 x y + y z - x - 4 y - z + 6

Q <- rbind(c(0, 3, 0), 
           c(3, 0, 1), 
           c(0, 1, 0))
L <- c(-1, -4, -1)
x <- OP(objective = Q_objective(Q = Q, L = L), types = rep("B", 3))

## reformulate into a mixed integer linear problem
milp <- ROI_reformulate(x, "lp")

## reformulate into a second-order cone problem
socp <- ROI_reformulate(x, "socp")

ROI documentation built on Aug. 29, 2020, 3:01 p.m.

Related to ROI_reformulate in ROI...