A simple metric in Optimize is one computed by applying a linear function to summarize rows in the dataset. The linear function is built up by multiplying one or both of

1) a chosen Data Element

2) the Optimization Output value

for each row, and then summarizing over rows by one of four methods: SUM, AVG, MIN, MAX. By far the most common method is to SUM over the rows.

Here is an example to help make it easier to understand. It is also helpful to try different options in LityxIQ and see the formulas that result.

- Suppose you have a binary optimization problem (output is 1 or 0) and a data element that is the cost for each row. Three simple metrics that can be computed are:
- Optimized Cost = SUM(Cost * Binary Output). Note that since the binary output is 0 for rows that are not optimal, then they do not figure into this summation, which is why we might think of this metric as the "Optimized Cost" of the optimization result.
- Total Potential Cost = SUM(Cost). Note that since we are not multiplying by the 0/1 binary output variable, this formula sums the cost up over all rows whether or not the row is part of the final optimized plan. Therefore, the label "Total Potential Cost" is reasonable.
- Number of Optimal Rows = SUM(Binary Output). Since we aren't including the Cost in the summation over rows, this metric is not related to Cost at all. We are just counting the number of rows that were optimally selected by the optimization (just the Binary Output = 1 rows).

Defining an optimization metric in LityxIQ is explained here: https://support.lityxiq.com/773516-Define-Optimization-Metrics.