# Campaign | partitions | partition[n] | Optimize | AlgorithmTuning

These configuration properties define settings that you can use to tune your optimizations.

## MaxAlternativesPerCustomerEvaluated

Description

The maximum number of times Unica Optimize tests combinations of proposed transactions, or alternatives, to find the optimal alternative for a customer.

For example, if the following are true:

• The offers that are associated with a customer in the proposed contacts table (PCT) are A,B,C,D, where the scores for these offers are A=8, B=4, C=2, D=1

• The MaxAlternativesPerCustomerEvaluated property is 5

• A rule of MAX # Offers=3 exists

Then, the alternatives that are tried might be as follows:

• ABC score = 14

• ABD score = 13

• AB score = 12

• ACD score = 11

• AC score = 10

Because the number of alternatives to test might be large, this value limits the effort the core algorithm spends on a customer before Unica Optimize moves to the next customer in the PCT.

Default value

1000

## CustomerSampleSize

Description

If your number of customers that are optimized is greater than CustomerSampleSize, Unica Optimize divides the customers into groups of no greater than CustomerSampleSize. Unica Optimize then optimizes each sample group separately. Rules that span across groups, such as a Custom Capacity rule, are still met. Increasing this number might increase optimality but hinder performance.

The most optimal CustomerSampleSize is equal to your number of customers. However, processing a large set of data might take a prohibitive amount of time. By dividing customers into smaller groups for Unica Optimize to process at a time, you can increase performance with minimal loss to optimality.

Default value

1000

Valid Values

Positive integer

## MaxIterationsPerCustomerSample

Description

The maximum number of iterations Unica Optimize processes a group of customers. Unica Optimize processes a group of customers until optimality is reached or the number of iterations equals MaxIterationsPerCustomerSample.

Search for the following information in the session log to observe the effect of setting changes for MaxIterationsPerCustomerSample.

• Maximum, minimum, and mean number of iterations per customer chunk

• Maximum, minimum, and mean number of alternatives that are created per customer

• Maximum, minimum, and mean number of alternatives that are tried per customer

• Standard deviation of iterations

Default value

1000

Valid Values

Positive integer

## CustomerRandomSeed

Description

The random seed represents the starting point that Unica Optimize uses to select records randomly before Unica Optimize populates sample groups that are defined by the CustomerSampleSize. If you have fewer customers than CustomerSampleSize, this property has no effect on the optimization.

You might want to change the random seed if you think your current random sample produces highly skewed results.

Default value

1928374656

Valid Values

Positive integer

Description

The maximum number of threads Unica Optimize uses to process the optimization algorithms. In general, the higher you set MaxCustomerSampleProcessingThreads, the more you might improve performance. However, the performance increase is limited by several factors, including the type and number of optimization rules you use and your hardware. For detailed instructions on tuning your Unica Optimize implementation, contact your representative.

Default value

1

Valid Values

Positive integer

Description

The number of threads available to Unica Optimize to use to read a customer sample from the PCT. Increasing the number of threads might improve the performance of a Unica Optimize session. For detailed instructions on tuning your Unica Optimize implementation, contact your representative.

Default value

1

Valid Values

Positive integer

Description

The number of threads available to Unica Optimize to write a customer sample to a staging table for the OCT. Increasing the number of threads might improve the performance of a Unica Optimize session. For detailed instructions on tuning your Unica Optimize implementation, contact your representative.

Default value

1

Valid Values

Positive integer

Description

If true, Unica Optimize attempts to use multiple threads when processing the optimization algorithms. You can configure the number of threads with the MaxCustomerSampleProcessingThreads, ProcessingThreadQueueSize, and PostProcessingThreadQueueSize configuration properties. If false, Unica Optimize uses a single thread when processing the optimization algorithms.

Default value

True

Valid Values

True | False

## EnableMaxCapacityConsumption

Description

If you get Unica Optimize results that underuse the channel capacities, enable EnableMaxCapacityConsumption to reduce the loss of channel capacity. Then, rerun the Unica Optimize session. If the parameter is set to true, Unica Optimize uses an enhanced algorithm for trying to meet maximum constraints that are set in Cross Customer rules (Min/Max # Offers Capacity rule and Custom capacity rule). However, if this is used, the session run time might increase depending on the data that is provided to the session.

Default value

False

Valid Values

True | False

## EnableBufferingHistoryTransactions

Description

If true, Unica Optimize writes contact history transactions to a file to read during a Unica Optimize session run. If false, Unica Optimize reads from the UA_ContactHistory table in the Unica Campaign system tables.

If false, Unica Optimize creates a read lock on the UA_ContactHistory table for the length of the Unica Optimize session. This lock might cause attempts to write to the table to fail if you are using a database load utility. If true, Unica Optimize creates a read lock on the table only for the time it takes to write the query to a file.

Default value

False

Valid Values

True | False

## MinImprovementPercent

Description

Use this configuration property to stop processing a group of customers when the rate of optimization reaches a specified level. The MinImprovmentPercent property sets a rate of score improvement, which is measured as a percentage, to continue iterating. The default is zero, which means that there is no limit to the number of iterations possible.

Default value

0.0

## UseFutureContacts

Description

If you are not using time periods in any of your optimization rules, you can prevent Unica Optimize from querying the Contact History tables to improve performance. You can control this behavior with the UseFutureContacts configuration property.

If you set UseFutureContacts to false, and the optimization rules for your Unica Optimize session do not use time periods, Unica Optimize does not query the Contact History tables. This setting improves the time that is needed to run the Unica Optimize session. However, if the Unica Optimize session uses time periods, Contact History tables are queried.

If you record potential future contacts in Contact History, you must set UseFutureContacts to true. For example, if you know that you are sending an email communication next week about a special promotion to certain customers, those contacts might already be in the Contact History tables as placeholders. In this case, set UseFutureContacts to true and Unica Optimize always queries the Contact History tables.

Default value

False

Valid Values

True | False

## ContinueOnGenerationLoopError

Description

If False, Unica Optimize stops the Unica Optimize session if it is not possible to process a set of customers for the following reasons:

• The outer algorithm cannot satisfy the capacity rules with any of its alternate solutions.
• The core algorithm is not creating alternative solutions.

Unica Optimize logs this condition with the following error:

```The generation loop was unable to eliminate all slack
and surplus variables```

If True, Unica Optimize skips all the customers in the set that triggered the generation loop error. Unica Optimize then continues processing the next customer set in the Unica Optimize session. It is possible that Unica Optimize might have violated some rules and generated this result without honoring all rules and data. If Optimize|logging|enableBailoutLogging property is also set to TRUE, the skipped customers are logged to unprocessables_10-digit-session-ID.csv in the partition/partition[n]/logs directory in the Unica Optimize installation directory. Customers skipped because of the generation loop error have the reason SkippedOnGenerationLoopError.

See the Unica Optimize Troubleshooting and Tuning Guide for details about how to avoid the generation loop error.

Default value

False

Valid Values

True | False