ObjectiveInstance¶
- 
class 
ObjectiveInstance: public ampl::BasicInstance<internal::ObjectiveInstance>¶ Represents an objective instance.
All AMPL suffixes for an objective are available through methods with the same name in this class. See http://www.ampl.com/NEW/suffbuiltin.html for a list of the available suffixes.
All the accessors in this class throw an std::runtime_error if the instance has been deleted in the underlying AMPL interpreter.
Public Functions
- 
double 
value() const¶ Get the value of the objective instance.
- 
std::string 
astatus() const¶ Return the AMPL status.
- 
std::string 
sstatus() const¶ Return the solver status.
- 
int 
exitcode() const¶ Exit code returned by solver after most recent solve with this objective.
- 
std::string 
message() const¶ Result message returned by solver after most recent solve with this objective.
- 
std::string 
result() const¶ Result string returned by solver after most recent solve with this objective.
- 
void 
drop()¶ Drop this objective instance.
- 
void 
restore()¶ Restore this objective instance (if it had been dropped, no effect otherwise)
- 
bool 
minimization() const¶ Get the sense of this objective.
- Return
 - true if minimize, false if maximize
 
- 
double