Code: Select all

`set A`

A1(A)

A2(A)

B

B1(B)

B2(B)

B3(B)

variable

P(A,B)

In this case, variable p is related to all the combination of A and B. but actually only P(A1,B1) and P(A2,B2), P(A,B3) are nonzero.

there are a lot of fixed zero variables for P(A1,B2), P(A2,B1).

How may I define a variable with only non-zero values?