How to eliminate a variable from a JuMP model?

For example, with the help of Polyhedra.jl one can eliminate variable y from model m (or project m onto x space) and obtain a polyhedron P with respect to x:

using JuMP, Polyhedra, CDDLib
m = Model()
@variable(m, x)
@variable(m, 0 <= y <= 1)
@constraint(m, x == y + 1)
all_variables(m) # To check the dimension names.
p = polyhedron(m, CDDLib.Library(:exact))
P = eliminate(p, 2)

My question is can I perform elimination or projection without using Polyhedra and get a JuMP model w.r.t. x?

My question is can I perform elimination or projection without using Polyhedra and get a JuMP model w.r.t. x ?

No. JuMP does not contain any built-in functionality for presolve or simplification routines that would project out a subset of the decision variables.

1 Like