SD
unread,Aug 23, 2005, 12:01:55 PM8/23/05Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to AMPL Modeling Language
Hi,
Can someone point me to how to do the following:
I have a set A, and a set of sets B[a] for each a in A.
i.e.
set A;
set B{A};
I want to define set C, such that it will be the cartesian (cross)
product of all sets B[a].
i.e. if say,
set A = {a1, a2}
and
B[a1] = {b_a1_1, b_a1_2}
and B[a2] = {b_a2_1, b_a2_2}
then, I want C = {(b_a1_1, b_a2_1), (b_a1_1, b_a2_2), (b_a1_2, b_a2_1),
(b_a1_2, b_a2_2)}
Thanks, S