Skip to main content

How to read a rlp model and optmize using VS

Answered

Comments

2 comments

  • Official comment
    Simranjit Kaur
    • Gurobi Staff
    This post is more than three years old. Some information may not be up to date. For current information, please check the Gurobi Documentation or Knowledge Base. If you need more help, please create a new post in the community forum, or try Gurobot, our chatbot interface offering instant, expert-level support.
  • Matthias Miltenberger
    • Gurobi Staff

    Hi Alessandra,

    Please don't use the GRBModel::read() method to load a model from a file. Please use the respective constructor just like in the mip2_c++.cpp example:

    GRBModel model = GRBModel(*env, filename);

    If you write store the model as RLP file, all variable names will be replaced with generic names. To keep the original names, please use either the LP or better yet the MPS file format. The latter one provides more accuracy in the coefficients and preserves the order of constraints.

    If you don't assign (unique) names to all your variables and constraints, Gurobi will replace all of them with generic names.

    Best regards,
    Matthias

    0

Post is closed for comments.