Please someone help

I have an issues with my program and please if you can help.
if my sets is:

i/a1,a2,a3,b1,b2,c1,c3/
r/r1,r2,r3/

r1/a1,a2,a3/
r2/b1,b2/
r3/c1,c3/
;
I need to generate a table automatically as b(i,r) =1 if i is in r otherwise b(i,r)=0 do I have to use if condition? or is there a function can solve it ?

for example:

r1 r2 r3
a1 1 0 0
a2 1 0 0
a3 1 0 0
b1 0 1 0
b2 0 1 0
c1 0 0 1
c3 0 0 1

how can i do it??


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/groups/opt_out.

set
i/a1,a2,a3,b1,b2,c1,c3/
r/r1,r2,r3/


*New Set Combination contains the set of desired combination means here i am defining r1 is true for a1,a2,a3 only , while r2 is for b1 and b2 etc.
Combination(i,r)
/(a1,a2,a3).(r1)
(b1,b2).(r2)
(c1,c3).(r3)/
;

PARAMETER
Para1(i,r);
Para1(i,r)$(Combination(i,r))=1;

display
Para1;


On Thu, Feb 20, 2014 at 5:12 PM, Nora Ebha wrote:

I have an issues with my program and please if you can help.
if my sets is:

i/a1,a2,a3,b1,b2,c1,c3/
r/r1,r2,r3/

r1/a1,a2,a3/
r2/b1,b2/
r3/c1,c3/
;
I need to generate a table automatically as b(i,r) =1 if i is in r otherwise b(i,r)=0 do I have to use if condition? or is there a function can solve it ?

for example:

r1 r2 r3
a1 1 0 0
a2 1 0 0
a3 1 0 0
b1 0 1 0
b2 0 1 0
c1 0 0 1
c3 0 0 1

how can i do it??


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/groups/opt_out.



\

Regards,
Owais Nooruddin

+358465700556


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/groups/opt_out.