Stay organized with collections
Save and categorize content based on your preferences.
C++ Reference: class MPObjective
Note: This documentation is automatically generated.
A class to express a linear objective.
Method |
AddLinearExpr | Return type: void Arguments: const LinearExpr& linear_expr Adds linear_expr to the current objective, does not change the direction.
|
BestBound | Return type: double |
Clear | Return type: void |
GetCoefficient | Return type: double Arguments: const MPVariable* const var |
maximization | Return type: bool Is the optimization direction set to maximize?
|
MaximizeLinearExpr | Return type: void Arguments: const LinearExpr& linear_expr Resets the current objective to maximize linear_expr.
|
minimization | Return type: bool Is the optimization direction set to minimize?
|
MinimizeLinearExpr | Return type: void Arguments: const LinearExpr& linear_expr Resets the current objective to minimize linear_expr.
|
offset | Return type: double Gets the constant term in the objective.
|
OptimizeLinearExpr | Return type: void Arguments: const LinearExpr& linear_expr, bool is_maximization |
SetCoefficient | Return type: void Arguments: const MPVariable* const var, double coeff |
SetMaximization | Return type: void Sets the optimization direction to maximize.
|
SetMinimization | Return type: void Sets the optimization direction to minimize.
|
SetOffset | Return type: void Arguments: double value Sets the constant term in the objective.
|
SetOptimizationDirection | Return type: void Arguments: bool maximize Sets the optimization direction (maximize: true or minimize: false).
|
terms | Return type: const absl::flat_hash_map<const MPVariable*, double>& |
Value | Return type: double |
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2022-09-14 UTC.
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"Missing the information I need"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"Too complicated / too many steps"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"Out of date"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"Samples / code issue"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]