Skip to main content

DATA_NOT_AVAILABLE error when Retrieving Solutions for Multiple Scenarios

Awaiting user input

Comments

5 comments

  • Jaromił Najman
    • Gurobi Staff Gurobi Staff

    Hi Yuyi,

    Could you provide a log snippet showing the optimization run together with the error?

    Could you provide a minimal working example to reproduce the issue?

    Best regards, 
    Jaromił

    0
  • Yuyi Zhong
    • Gurobi-versary
    • Conversationalist
    • First Question

    Hi,

    The code snippet looks like, where in the second last row, it gives me "Gurobi error: Unable to retrieve attribute 'ScenNX' with error code 10005. Error obtaining ScenNX 50 for layer 0, neuron 204", where code 1005 refers to GRB_ERROR_DATA_NOT_AVAILABLE.

    error = GRBsetintparam(GRBgetenv(model), "ScenarioNumber", i);
    handle_gurobi_error(error, GRBgetenv(model));
    error = GRBgetdblattr(model, "ScenNObjVal", &solved_lb);
    handle_gurobi_error(error, env);
    error = GRBgetdblattrarray(model, "ScenNX", 0, fp->num_pixels, fp->input_val); 
    handle_gurobi_error(error, env);

    My constraint set is the approximate linear encoding of a convolutional network (shorted as C1) + a property regarding the network's output neurons (shorted as C2). 

    I noticed that if my constraint set is only C1, then all ScenNX retrievings are good.

    But if my constraint set is C1+C2, then some scenarios fail to return ScenNX, even though all scenarios share the same set of constraint and only objective difference.

    My C2 contains 3 constraints as follows, where the first element is the constant bias, and the rest 6 are coefficients of 6 output neurons respectively.

    C2-1: 1.00000000, 2.77943254,-0.00000000, 0.00000001,-0.00000000, -0.00000000,-0.00000000
    C2-2: -2.17545170, 1.00000000,0.99999995, -0.00000000,0.99999989, 0.99999989,0.00000001
    C3-3: -2.99957194, 1.00000000,0.99999996, 0.99999985,0.99999985, -0.00000000,-0.00000000

    Could you please advise me why these three constraints would lead to the failure to retrieve some of the scenarios?

    (Sorry that no minimal working example since it requires loading all constraints regarding the convolutional network)

    Thanks and regards,

    Yuyi

    0
  • Jaromił Najman
    • Gurobi Staff Gurobi Staff

    Hi Yuyi,

    It is possible that no feasible solution point has been found for these scenarios, cf. last paragraph of Retrieving Solutions for Multiple Scenarios. Thus, it is possible that these scenarios are infeasible.

    Best regards, 
    Jaromił

    0
  • Yuyi Zhong
    • Gurobi-versary
    • Conversationalist
    • First Question

    Hi,

    Thank you for the latest reply.

    All the scenarios have the same constraint set, only different objective functions.

    I am under this impression that as long as they share the same constraint set, they should be either all feasible or all infeasible.

    So is this impression wrong in real-world solving cases?

    Thanks and regards,

    Yuyi

    0
  • Jaromił Najman
    • Gurobi Staff Gurobi Staff

    Hi Yuyi,

    This sounds strange. Could you please share an MPS or LP file of the problematic model? If this is not possible could you please post a log snippet showing the behavior? Note that it is not possible to upload files in the Community Forum but we discuss an alternative in Posting to the Community Forum.

    Best regards, 
    Jaromił

    0

Please sign in to leave a comment.