Is it possible to use different time limits for each hierarchy when using lexicographic optimization?.

Answered

Comments

3 comments

  • Jaromił Najman

    Hi José Miguel,

    It is possible by using multi objective environments, see here.

    Best regards,
    Jaromił

    1
    Comment actions Permalink
  • José Miguel Quesada Pérez

    Thank you Jaromił

    I tried using the function Model.getMultiobjEnv (in Java), and it is not working as expected. I have tried to use the following programming flows without making Gurobi change its behavior when solving my second objective.

     

    OPTION 1

    model = new GRBModel(env);
    GRBEnv secondaryEnv = model.getMultiobjEnv(1);
    secondaryEnv.set(GRB.DoubleParam.TimeLimit, 15);
    secondaryEnv.set(GRB.DoubleParam.MIPGap, 0.01);
    secondaryEnv.set(GRB.IntParam.OutputFlag, 0);
    createFlowModel()  // function that creates the lexicographic model
    model.update();

     

    OPTION 2

    model = new GRBModel(env);
    createFlowModel()  // function that creates the lexicographic model
    GRBEnv secondaryEnv = model.getMultiobjEnv(1);
    secondaryEnv.set(GRB.DoubleParam.TimeLimit, 15);
    secondaryEnv.set(GRB.DoubleParam.MIPGap, 0.01);
    secondaryEnv.set(GRB.IntParam.OutputFlag, 0);
    model.update();

     

     

    Is there any indication as of the moment at which I need to change the environment?

    Thanks you

    José Miguel

     

     

     

     

     

    0
    Comment actions Permalink
  • Jaromił Najman

    Hi José Miguel,

    Both of your options should work. It is possible that the parameters you set don't have any visible influence on the solution behavior of your second objective. The changed parameters will also not be displayed. In order to check whether your approach really works try setting, e.g., the Presolve parameter to 0 via \(\texttt{secondaryEnv.set(GRB.IntParam.Presolve,0)}\), which should have a visible impact on the solution process of your second objective.

    Please note that the OutputFlag parameter, which you set for your secondary environment is overwritten by the default OutputFlag parameter of the overall environment.

    Best regards,
    Jaromił

    0
    Comment actions Permalink

Please sign in to leave a comment.

Powered by Zendesk