Skip to main content
Namespace: Phoenix.Optimization

Overview

Class to hold information about an objective

Inheritance

Objective

Declaration

Description

Class to hold information about an objective

Public Member Functions

Properties

Properties inherited from IVariableName

Constructor & Destructor Documentation

Objective()

Creates a new objective with the given name and goal. Assumes that the weight of the objective should be 1.0. Parameters:
  • name - string containing the name of the objective.
  • goal - Goal containing the goal of the objective.

Objective()

Copy constructor Parameters:
  • objective - Objective to be copied

Objective()

Creates a new objective with the given name and solve for value Parameters:
  • name - string containing the name of the objective.
  • solveForValue - double containing the solve for value for the objective.

Objective()

Creates a new objective with the given name, solve for value and weight. Assumes a goal of Goal.SolveFor. Parameters:
  • name - string containing the name of the objective.
  • solveForValue - double containing the solve for value for the objective.
  • weight - double containing the relative weight for the objective.

Objective()

Creates a new objective with the given name, goal and weight. Parameters:
  • name - string containing the name of the objective.
  • goal - Goal containing the goal of the objective.
  • weight - double containing the relative weight for the objective.

Objective()

Creates a new objective with the given name, goal, weight and solve for value. Parameters:
  • name - string containing the name of the objective.
  • goal - Goal containing the goal of the objective.
  • weight - double containing the relative weight for the objective.
  • solveForValue - double containing the solve for value for the objective.

Member Function Documentation

Compare

Compares two points with respect to the objective. Parameters:
  • x - Test value 1
  • y - Test value 2
Returns:
  • -1 if x is better w/r/t the goal. 0 if they are the same w/r/t goal. 1 if y is better

ConvertSolverForToMinMax

If this objective is a solvefor value, returns a new equivalent objective using an equation and minimize. Otherwise just returns self. Returns:
  • Converted objective

ConvertToSingleObjective

Takes a list of objectives and collapses them down into a single objective using the weights. Parameters:
  • objectives - A list of objectives
Returns:
  • A new collapsed Objective, or null if the list is empty

Equals

Determines whether the specified Object is equal to the current Object. Parameters:
  • obj - The object to compare with the current object.
Returns:
  • true if the specified Object is equal to the current Object; otherwise, false.

Equals

Determines whether the specified Objective is equal to the current Objective. Parameters:
  • obj - The Objective object to compare with the current Objective.
Returns:
  • true if the specified Objective is equal to the current Objective; otherwise, false.

GetHashCode

Serves as a hash function for Objective. Returns:
  • A hash code for the current Objective.

operator!=

Determines whether the specified Objective instances are considered not equal. Parameters:
  • a - The first Objective to compare.
  • b - The second Objective to compare.
Returns:
  • true if the Objectives are not considered equal; otherwise, false.

operator==

Determines whether the specified Objective instances are considered equal. Parameters:
  • a - The first Objective to compare.
  • b - The second Objective to compare.
Returns:
  • true if the Objectives are considered equal; otherwise, false.

Goal

Goal containing the goal of the objeictive.

Name

String containing the name of the objective. Implements IVariableName.

SolveForValue

Double containing the value to be solved for for the Goal.SolveFor goal.

Weight

Goal containing the relative weight of the objective. Used for multi-objective problems and ignored for single objetive problems.

Property Documentation

Goal

Goal containing the goal of the objeictive.

Name

String containing the name of the objective. Implements IVariableName.

SolveForValue

Double containing the value to be solved for for the Goal.SolveFor goal.

Weight

Goal containing the relative weight of the objective. Used for multi-objective problems and ignored for single objective problems.