How to use FarkasDual and FarkasProof ?

681 views
Skip to first unread message

Ata

unread,
Feb 21, 2015, 5:38:58 PM2/21/15
to gur...@googlegroups.com
I want to use the farkas method in my code to use the infeasibility conditions of subproblem.
I am confused how to use the FarkasProof and FarkasDual ?

                    aryConstraints = submodel.GetConstrs();
                    if (submodel.Get(GRB.IntAttr.Status) == GRB.Status.INFEASIBLE)
                    {
                        fksvalues = new double[aryConstraints.Length];
                        for (int k = 0; k < aryConstraints.Length; ++k)
                        {
                            GRBConstr fksConstraint = aryConstraints[k];
                            fksvalues[k] = fksConstraint.Get(GRB.DoubleAttr.FarkasDual);
                        }
                    }
I will be thankful if someone helps me ?? 

T.

unread,
Feb 22, 2015, 4:07:46 PM2/22/15
to gur...@googlegroups.com
Please do not hesitate to ask your questions. From your post, I unfortunately cannot see what your problem is. Maybe this can help you (it is for CPLEX, but should be the same in Gurobi).

Ata

unread,
Feb 23, 2015, 8:07:13 AM2/23/15
to gur...@googlegroups.com
I want to get the dual values of extreme points when the submodel is infeasible but when the written code reaches the "fksvalues[k] = fksConstraint.Get(GRB.DoubleAttr.FarkasDual);" show the error code that "Attempted to read or write protected memory. This is often an indication that other memory is corrupt."

I am trying to use benders decomposition to solve a problem. As there may be some modelling errors in the dual form of subproblem I decided to use the farkas for the subproblem when it is infeasible so its dual is infinite. But unfortunately I cant find any example code in C# or C++ that uses the farkas dual and proof.

Inaddition if iI am not wrong the FarkasDual provides the values of constraint while the dual model is infinite and so I can use these values as the variable values of dual subproblem's variables. So I what the FarkasProof provides ???

Thanks for your attention...
ATA

T.

unread,
Feb 23, 2015, 8:53:42 AM2/23/15
to gur...@googlegroups.com
Did you set the InfUnbdInfo parameter?

Inaddition if iI am not wrong the FarkasDual provides the values of constraint while the dual model is infinite and so I can use these values as the variable values of dual subproblem's variables. So I what the FarkasProof provides ???
 
FarkasDual is the thing that you typically use in Benders decomposition. You have to take care, if some of your variables have nontrivial bounds, see the link in my last post.
Reply all
Reply to author
Forward
Message has been deleted
0 new messages