The OPP record is one of several records that are used to request and control a circuit optimization. CCICAP uses a genetic optimization algorithm. The OPP record contains 6 parameters that control the routine:
.OPP F1 F2 F3 F4 I1 I2 I3 I4
where
F1 : sets the maximum allowed normalized component change per generation. Restricted to 0.0 (no change allowed, not very interesting) to 1.0 (allowing up to a 100% change in a component value per generation). Typical : 0.1 - 0.3. This parameter is used to generate the first, randomly seeded, generation and is used to set limits on the changes allowed by mutation during the creation of subsequent generations.
F2 : stop condition for the optimization. When the calculated error becomes equal to or less than this number the optimization will stop. The units are those specified for the current analysis.
The error measure is the weighted (see the .OPW record) RMS average of the errors at each specified frequency.
F3 : sets the probability of a crossover as individual circuits are combined. Restricted to 0.0 to 1.0. Typical : 0.7 - 1.0.
F4 : sets the mutation rate of the population. Restricted to 0.0 to 1.0. Typical : 0.01 - 0.3. The mutation rate is applied to each new generated circuit element value. For example if each individual has 10 associated element values and the mutation rate is 0.1 then on average there would be one mutated value for each individual in the next generation.
I1 : limits the number of generations attempted. After I1 generations the optimization will end regardless of the error.
I2 : population size. At each generation, I2 - 1 new individuals are created using I3 breeders. Note that the best individual from each generation is carried unchanged into the next generation.
I3 : number of breeders. As each generation is created the I2 - 1 new individuals are obtained from the I3 best individuals from the current generation. Note that I3 must be less than or equal to I2.
I4 : random number generator seed. Set to any integer. If not set, 0, which is as good as any other value, is used as the seed. Note that the same sequence of random uniform deviates will be generated for any specific seed. To obtain a different sequence, the seed should be changed.
Example
; allow 20% max changes, stop when average error is .01,
; apply crossover to 70% of new generation,
; allow 5% mutation rate, run for 500 generations max,
; each generation has 30 individuals derived from the best
; 10 individuals from the previous generation.
.OPP 0.2 0.01 0.7 0.05 500 30 10
; if response is in dB, then this stops if average error
; is reduced to 0.01 dB or 500 generations are tried.