// i, j: nodes
// x[i, j]: arc flow variable
// cost[i, j]: unit flow cost on arc (i,j)
// fixedCost[i]: fixed cost of including node i in the network
Objective minFlowCost = minimize | sum(over(i, j), cost[i, j] * x[i, j]);
Objective minTotalCost = minimize | sum(over(i, j), cost[i, j] * x[i, j]) + sum(over(i), fixedCost[i] * y[i]);
// p: person; t: task
// utility[p, t]: utility of person p when assigned to task t
// fitness[p, t]: fitness of person p's skills to task t
// revenue[t]: revenue of completing task t
// x[p, t]: 1 if person p is assigned to task t; 0 o/w
MathExpr totalUtility = sum(over(p, t), utility[p, t] * x[p, t]);
MathExpr totalFitness = sum(over(p, t), fitness[p, t] * x[p, t]);
MathExpr totalRevenue = sum(over(p, t), revenue[t] * x[p, t]);
double weightUtility = 0.40;
double weightFitness = 0.35;
double weightRevenue = 0.25;
Objective weighted = maximize
| weightUtility * totalUtility + weightFitness * totalFitness + weightRevenue * totalRevenue
public class Objective
AsMaximization | Returns an objective function with the same expression and with maximize as the direction. |
AsMinimization | Returns an objective function with the same expression and with minimize as the direction. |
CreateForDirection | Returns an objective function with the same expression and with the given direction. |
Equals | (Inherited from Object) |
Finalize | (Inherited from Object) |
GetHashCode | (Inherited from Object) |
GetType | (Inherited from Object) |
LogToConsole | Logs the objective function to the console. |
MemberwiseClone | (Inherited from Object) |
ToString | (Inherited from Object) |
Direction | Direction of the objective function: Minimize or Maximize. |
Key | Text representation of the objective function. |
ObjectiveDefinition | Definition of the objective function. |
ObjectiveKey | Key of the objective function. |
ObjExpr | Objective function expression. |