Cookie Settings
Customize Consent Preferences
This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Always Active

Necessary cookies are required to enable the basic features of this site, such as providing secure log-in or adjusting your consent preferences. These cookies do not store any personally identifiable data.

Functional cookies help perform certain functionalities like sharing the content of the website on social media platforms, collecting feedback, and other third-party features.

Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics such as the number of visitors, bounce rate, traffic source, etc.

Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.

No cookies to display.

Advertisement cookies are used to provide visitors with customized advertisements based on the pages you visited previously and to analyze the effectiveness of the ad campaigns.

Other cookies are those that are being identified and have not been classified into any category as yet.

Try our new documentation site (beta).

Filter Content By
Version
Table of contents
Filter by Language
C API Details
C++ API Details
GRBModel +
Java API Details
GRBModel +
.NET API Details
GRBModel +
Python API Details
Model +
Attributes
Parameters
Parameter Descriptions +


GRBModel.remove()

Remove a variable, constraint, or SOS from a model.

void remove ( GRBConstr constr )

    Remove a linear constraint from the model. Note that, due to our lazy update approach, the change won't actually take effect until you update the model (using GRBModel.update), optimize the model (using GRBModel.optimize), or write the model to disk (using GRBModel.write).

    Arguments:

    constr: The linear constraint to remove.

void remove ( GRBGenConstr genconstr )

    Remove a general constraint from the model. Note that, due to our lazy update approach, the change won't actually take effect until you update the model (using GRBModel.update), optimize the model (using GRBModel.optimize), or write the model to disk (using GRBModel.write).

    Arguments:

    genconstr: The general constraint to remove.

void remove ( GRBQConstr qconstr )

    Remove a quadratic constraint from the model. Note that, due to our lazy update approach, the change won't actually take effect until you update the model (using GRBModel.update), optimize the model (using GRBModel.optimize), or write the model to disk (using GRBModel.write).

    Arguments:

    qconstr: The quadratic constraint to remove.

void remove ( GRBSOS sos )

    Remove an SOS constraint from the model. Note that, due to our lazy update approach, the change won't actually take effect until you update the model (using GRBModel.update), optimize the model (using GRBModel.optimize), or write the model to disk (using GRBModel.write).

    Arguments:

    sos: The SOS constraint to remove.

void remove ( GRBVar var )

    Remove a variable from the model. Note that, due to our lazy update approach, the change won't actually take effect until you update the model (using GRBModel.update), optimize the model (using GRBModel.optimize), or write the model to disk (using GRBModel.write).

    Arguments:

    var: The variable to remove.