Try our new documentation site (beta).
Filter Content By
Version
Text Search
${sidebar_list_label} - Back
Filter by Language
gurobi_relax()
gurobi_relax | ( model ) |
gurobi_relax | ( model, env ) |
Create the relaxation of a MIP model. Transforms integer variables into continuous variables, and removes SOS and general constraints.
Arguments:
model: The model struct must contain a valid Gurobi model. See the model argument section for more information.
env: The env struct, when provided, allows you to use Gurobi Compute Server or Gurobi Instant Cloud. See the env argument section for more information.
Return value:
A model struct variable, as described in the model parameter section.
Example usage:
model = gurobi_read('stein9.mps');
relaxed = gurobi_relax(model);
![](/wp-content/plugins/hd_documentations/content/images/documentation-ampl-guide.webp?x70725)
![](/wp-content/plugins/hd_documentations/content/images/documentation-cloud.webp?x70725)
![](/wp-content/plugins/hd_documentations/content/images/documentation-example-tour.webp?x70725)
![](/wp-content/plugins/hd_documentations/content/images/documentation-quick-start.webp?x70725)
![](/wp-content/plugins/hd_documentations/content/images/documentation-reference-manuals.webp?x70725)
![](/wp-content/plugins/hd_documentations/content/images/documentation-remote-services.webp?x70725)
![](/wp-content/plugins/hd_documentations/content/images/quickstart-os-linux.webp?x70725)
![](/wp-content/plugins/hd_documentations/content/images/quickstart-os-mac-osx.webp?x70725)
![](/wp-content/plugins/hd_documentations/content/images/quickstart-os-windows.webp?x70725)