メインコンテンツへスキップ

Recommended method for fixing variables

回答済み

コメント

3件のコメント

  • Riley Clement
    Gurobi Staff Gurobi Staff

    Hi Keita,

    does preprocessing or similar steps nullify the impact on computation?

    Yes, the fixed variables will be replaced faster than you can say "presolve", so please use 2) - it is nothing to worry about.

    Kind Regards,
    Riley

    1
  • Keita Takahashi
    First Comment
    First Question

    Hello Riley,

    Thank you for your reply.

    Sorry for the detailed confirmation, but in the case of 3), will variables also be replaced before presolve? Can I assume that there is no superiority or inferiority between 2) and 3)?

    0
  • Riley Clement
    Gurobi Staff Gurobi Staff

    Hi Keita,

    Yes 3) will also be cleaned up by presolve.  Any constraint with a single variable is a just a bound in disguise and presolve will adjust the bound of such a variable then remove the now-redundant constraint.  If there is a difference between 2) and 3) performance wise it will be tiny but 2) is preferred as it makes your model easier to examine programmatically and visually (i.e. inspecting the LP file).

    Kind Regards,
    Riley

    2

サインインしてコメントを残してください。