Enum Status

  • The status of a solution indicates whether a problem has been solved and if the solution is optimal.

  • Status is represented by an enum which can be accessed by calling the parent class, name, and property.

  • Different status values like OPTIMAL, FEASIBLE, INFEASIBLE, UNBOUNDED, ABNORMAL, MODEL_INVALID, and NOT_SOLVED describe the outcome of the solution process.

Status

Status of the solution. Before solving a problem the status will be NOT_SOLVED; afterwards it will take any of the other values depending if it successfully found a solution and if the solution is optimal.

To call an enum, you call its parent class, name, and property. For example, LinearOptimizationService.Status.OPTIMAL.

Properties

PropertyTypeDescription
OPTIMALEnumStatus when an optimal solution has been found.
FEASIBLEEnumStatus when a feasible (not necessarily optimal) solution has been found.
INFEASIBLEEnumStatus when the current model is unfeasible (has no solution).
UNBOUNDEDEnumStatus when the current model is unbound.
ABNORMALEnumStatus when it failed to find a solution for unexpected reasons.
MODEL_INVALIDEnumStatus when the model is invalid.
NOT_SOLVEDEnumStatus when LinearOptimizationEngine.solve() has not been called yet.

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 2024年12月02日 UTC.