Objectives

class Objective

An object that represents a model objective.

Public Functions

double value() const
Returns:

the value of the objective expression

Objective &expr(const Expression &body)

Set the objective expression body

Expression expr() const
Returns:

the objective expression body

Objective &sense(bool sense)

Set the objective sense

bool sense() const
Returns:

the objective sense

Objective &name(const std::string &name)

Set the objective name

std::string name() const
Returns:

the objective name

size_t id() const
Returns:

the unique integer objective ID

std::list<std::string> to_list() const
Returns:

a list representation of the objective