next up previous contents
Next: .AC Record Up: Circuit Optimization Control Records Previous: .OPLIM Record   Contents

.OPC Record

When there are relationships (constraints) that must be maintained between pairs of element values they can be specified with the .OPC Record. The constraints are specified as:

.OPC T1 T2 T3 F1, T4 T5 T6 F2 ...

where

T1 = reference circuit element name

T2 = constraint operation

T3 = constrained circuit element name

F1 = constraint value

T4 = next reference circuit element name ...

The reference element (T1, T4, ...) must be a circuit element that is specified on the .OPE record and whose value is allowed to change during the optimization. The constraint will not change the value of the reference element. The constrained element (T3, T6, ...) can be any circuit element and is the element whose value is changed by the constraint. Note that it is computationally inefficient to specify the constrained circuit element on the .OPE record since it's value will be determined by the constraint and any optimized value will be discarded.

For the first constraint set T1 and T3 are the names of the two circuit elements involved. T2 is an operation involving the two circuit element values. F1 is the value of the constraint operation. T2 can be any one of the following operations:

Each constraint set consists of the two element names along with the constraint operation and the constraint value. The corresponding constraint equations are

T1 T2 T3 = F1

T4 T5 T6 = F2

...

After each new generation is created in the optimization algorithm, and before the responses of the new individuals are evaluated, the constraints are imposed.

Example

' constrain r2 to be equal in value to r1

.OPC r1 - r2 0.0

The corresponding constraint equation is

r1 - r2 = 0.0

or

r2 = r1.

For this example r1 must be named on the .OPE Record. The constraint does not alter the value of r1.

Example

' constrain c1 to be the reciprocal of c3

' and constrain r5 to be twice the value of r66

.OPC c3 X c1 1.0 r66 / r5 0.5

The corresponding constraint equations are

c3 * c1 = 1.0

or

c1 = 1.0 / c3

and

r66 / r5 = 0.5

or

r5 = 2.0 * r66

For this example c3 and r66 must be named on the .OPE record. The constraints do not alter the values of c3 or r66.


next up previous contents
Next: .AC Record Up: Circuit Optimization Control Records Previous: .OPLIM Record   Contents
Bob Smither 2008-11-19