Skip to content
This repository has been archived by the owner on Jun 14, 2020. It is now read-only.

Farkas duals for variable bounds #41

Open
odow opened this issue Jul 30, 2018 · 4 comments
Open

Farkas duals for variable bounds #41

odow opened this issue Jul 30, 2018 · 4 comments

Comments

@odow
Copy link
Member

odow commented Jul 30, 2018

Currently we only get the farkas dual for constraints:

get_farkas_dual!(m, m.constraint_dual_solution)

However, linear12 needs it for variable bounds.

@joaquimg
Copy link
Member

I talked about this with @blegat once. Part of the problem is due to the fact that xpress gurobi and cplex only return data for constraints. They ignore bounds.
We can have a method for computing that.

@blegat
Copy link
Member

blegat commented Jul 30, 2018

Yes, this is the dual analogous to computing the ConstraintPrimals using the VariablePrimals and the ConstraintFunctions

@odow
Copy link
Member Author

odow commented Aug 1, 2018

I don't really know what I'm talking about, but for the linear case, it seems we just need a matrix multiplication: https://orinanobworld.blogspot.com/2011/07/farkas-certificates-in-cplex.html

get_farkas_dual!(m, m.constraint_dual_solution)
A = get_constraint_matrix(m)  # doesn't exist
m.variable_dual_solution .= m.constraint_dual_solution' * A
# plus some +/- corrections

It seems we have two options

  1. add a get_constraint_matrix(model) method
  2. add a get_farkas_dual_variables!(model, m.variable_dual_solution) method
    2a. with a fallback that loops through the linear constraints querying the constraint functions.

@joaquimg
Copy link
Member

joaquimg commented Sep 5, 2018

basic infra structure is on #59 should we close?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants