CONSTRAINT,left relation right,WGT=weight;In this command relation is one of the relational operator , , or . All of left, right, and weight are vector expressions. All three must evaluate to the same number of components. The command is interpreted as matching constraints like left[i] relation right[i] with a weight of weight[i], where runs from one to . A wide spectrum of vector expressions are possible.
Examples. Single constraint:
CONSTRAINT,T1@M[3]->BETX==120;WGT=1;Two constraints in the same point:
CONSTRAINT,ROW(T1,M[3],{BETX,BETY})=={120,120},WGT=TABLE(2,1);Maximum over a range:
CONSTRAINT,COLUMN(T1,BETX,#S/#E)<200,WGT=1;Coupling between two points:
CONSTRAINT,ROW(T1,M1,{BETX,BETY})==ROW(T1,M2,{BETX,BETY}),WGT=TABLE(2,1);Interchange of BETX and BETY:
CONSTRAINT,ROW(T1,M1,{BETX,BETY})==ROW(T1,M2,{BETY,BETX}),WGT=TABLE(2,1);
For complex matching conditions in Version 8 of MAD one had to introduce ancillary variables. Several quantities could then be tied to such a variable, resulting in coupling between these quantities. This is no longer needed in Version 9, as can be seen from these examples.