Error code 10005

1,549 views
Skip to first unread message

USNA

unread,
Feb 2, 2012, 3:56:10 PM2/2/12
to Gurobi Optimization
I'm getting an error code 10005 when I try to extract my variables'
Attr_X despite having just completed a successful optimization. I'm
not sure what that is trying to tell me. My code is:

try {
mode.optimize();
if (model.get(GRB_IntAttr_Status) != GRB_OPTIMAL)
cerr << "Not optimal!" << endl;
for (int i = 0; i < model.get(GRB_IntAttr_NumVars); i++)
cerr << i << ' ' << vars[i].get(GRB_DoubleAttr_X) << endl;
} catch (GRBException e) {
cerr << "*******************" << endl;
cerr << "Error code = " << e.getErrorCode() << endl;
cerr << e.getMessage() << endl;
cerr << "*******************" << endl;
}

I've been using this code for a while; I just made some changes, but
not to the storage of variables, so the array vars is indeed holding
the variables for the model. What are the reasons I might get this
error? Below is the output. You will notice that the model is set to
optimal, as the error message for "Not optimal" is not shown. Thanks
in advance for your help.




Optimize a model with 7929 rows, 7878 columns and 216644 nonzeros



Concurrent optimizer: primal simplex, dual simplex, and barrier

Showing barrier log only...



Presolve removed 2 rows and 1 columns

Presolve time: 0.13s

Presolved: 7927 rows, 7877 columns, 216576 nonzeros



Ordering time: 0.07s



Barrier statistics:

AA' NZ : 4.067e+05

Factor NZ : 4.153e+05 (roughly 10 MBytes of memory)

Factor Ops : 2.182e+07 (less than 1 second per iteration)

Threads : 46



Objective Residual

Iter Primal Dual Primal Dual Compl
Time

0 1.31022841e+08 -1.77232500e+09 1.31e+08 0.00e+00 1.12e+05
0s

1 4.81961010e+07 -1.17020990e+09 5.54e+07 1.78e-15 6.17e+04
1s

2 1.32944288e+07 -5.48104035e+08 1.73e+07 1.55e-15 2.60e+04
1s

3 1.38454569e+06 -7.28386586e+06 2.31e+06 2.44e-15 5.75e+02
1s

4 8.43283763e+03 -2.40086560e+05 1.06e+04 2.44e-15 1.15e+01
1s

5 2.14875640e+01 -2.45646925e+02 2.44e+01 2.44e-15 1.35e-02
1s

6 2.11391119e+01 -2.42897364e+02 2.41e+01 2.22e-15 1.34e-02
2s

7 1.72276091e+01 -1.85148349e+02 1.97e+01 2.44e-15 1.03e-02
2s

8 7.83344603e+00 -1.25040534e+02 9.12e+00 2.00e-15 6.40e-03
2s

9 4.94869208e+00 -9.90185194e+01 6.31e+00 1.67e-15 4.92e-03
2s

10 4.55928719e+00 -9.32344741e+01 6.04e+00 1.78e-15 4.62e-03
2s

11 4.25723255e+00 -9.13606862e+01 5.72e+00 2.00e-15 4.50e-03
2s

12 4.25197446e+00 -9.07790201e+01 5.72e+00 2.44e-15 4.48e-03
3s

13 7.86849201e-01 -6.51455183e+01 1.52e+00 1.89e-15 2.90e-03
3s

14 6.98377073e-01 -6.49593076e+01 1.70e+00 2.55e-15 2.90e-03
3s

15 2.31073558e-01 -6.19050317e+01 2.04e+00 2.00e-15 2.77e-03
3s

16 2.79463172e-01 -6.19578450e+01 1.97e+00 2.22e-15 2.77e-03
4s

17 3.21582735e-01 -6.20492180e+01 1.87e+00 2.11e-15 2.78e-03
4s

18 4.01878417e-01 -6.10591907e+01 1.65e+00 2.00e-15 2.72e-03
4s

19 1.02244735e-01 -6.08823611e+01 2.45e+00 2.22e-15 2.76e-03
4s

20 7.23538399e-02 -5.80228288e+01 2.12e+00 4.89e-15 2.62e-03
5s



Barrier performed 20 iterations in 4.69 seconds

Optimization interrupted





Solved with dual simplex

Solved in 9736 iterations and 4.75 seconds

Optimal objective -1.964640223e+00

***********************************

Error code = 10005

Var::get

***********************************

USNA

unread,
Feb 3, 2012, 7:41:22 AM2/3/12
to gur...@googlegroups.com
The first line in my try block is model.optimize(), not mode.optimize(). Sorry for the typo.

USNA

unread,
Feb 17, 2012, 6:04:27 AM2/17/12
to Gurobi Optimization
I thought I'd bump this, in hopes somebody could help. I just don't
understand what that error message means.
Thanks.

Christopher Maes

unread,
Feb 20, 2012, 11:36:34 AM2/20/12
to gur...@googlegroups.com
On Thu, Feb 2, 2012 at 3:56 PM, USNA <taylor...@gmail.com> wrote:
> I'm getting an error code 10005 when I try to extract my variables'
> Attr_X despite having just completed a successful optimization.  I'm
> not sure what that is trying to tell me.

Error code 10005 is DATA_NOT_AVAILABLE. It is described in the
following page of the documentation:
http://www.gurobi.com/doc/46/refman/node597.html

It is hard to tell from the code you sent along why you are getting
that error. Could you provide a complete minimal code sample that
reproduces the error? If so, please send it to sup...@gurobi.com.


Thanks,
Chris

USNA

unread,
Feb 23, 2012, 8:34:32 AM2/23/12
to Gurobi Optimization
Thank you for the response, Chris.

I had found that note as to what the error code means, but I don't
understand what circumstances could lead to the model correctly
optimizing, and yet have the variables not have values available.

I will send in some code, but a general answer to this question, if
anybody has it, would also be helpful.

On Feb 20, 11:36 am, Christopher Maes <m...@gurobi.com> wrote:
> On Thu, Feb 2, 2012 at 3:56 PM, USNA <taylor.ga...@gmail.com> wrote:
> > I'm getting an error code 10005 when I try to extract my variables'
> > Attr_X despite having just completed a successful optimization.  I'm
> > not sure what that is trying to tell me.
>
> Error code 10005 is DATA_NOT_AVAILABLE. It is described in the
> following page of the documentation:http://www.gurobi.com/doc/46/refman/node597.html
>
> It is hard to tell from the code you sent along why you are getting
> that error. Could you provide a complete minimal code sample that
> reproduces the error? If so, please send it to supp...@gurobi.com.
>
> Thanks,
> Chris
Reply all
Reply to author
Forward
0 new messages