/* File Name: output_ic_msg */ The usage of output_ic and output_message in f,g format: #output_ics (integer) ic.out1[,ic_type1] ic.out2[,ic_type2] ... ic.out_#output_ics[,ic_type] #output_messages (integer) msg.out1:fuzzy_type[,] msg.out2:fuzzy_type[,] .... mes.out_#output_messages:fuzzy_type[,] 1. #output_ics should be equal to #output_messages, and both must be 0 or positive integer. 2. ic.outi specifies the ic(s) that will receive the output message msg.outi. That is, msg.out1 is for ic.out1, msg.out2 for ic.out2, and so on. 3. ic.outi can be one of the following six cases: >0 (positive integer): actual id of the ic.outi. msg.outi will be sent to this ic. 0: an id will be assigned to a new ic of the ic_typei at run time. msg.outi will be sent to this new ic. -1: all actual id's of active indices of ic_typei that can accept msg.outi if ic_typei is specified, or all actual id's of active indices that can accept msg.outi if ic_typei is not specified. In this case, msg.outi will be broadcasted to these active indices. -2: all actual id's of active indices of ic_typei that can accept msg.outi if ic_typei is specified, or all actual id's of active indices that can accept msg.outi if ic_typei is not specified. In this case, msg.outi will be raced by these active indices. -3: all actual id's of active indices, which are obtained from the user customized function find_ic(). In this case, msg.outi will be broadcasted to these active indices. -4: all actual id's of active indices, which are obtained from the user customized function find_ic(). In this case, msg.outi will be raced by these active indices. Example: 1. We want to send messages 2, 4, and 7 to ic 4, 1, and 10, respectively. # output ic's: 3 output ic list: 4 1 10 # output msgs: 3 output msg list: 2 4 7 The message sending is: m2 --> 4, m4 --> 1, m7 --> 10 2. We want to send message 1 to ic 3, broadcast message 2 to all ic's that are capble of receiving message 2, and let all ic's that are capble of receiving message 3 race for message 3. # output ic's: 3 output ic list: 3 -1 -2 # output msgs: 3 output msg list: 1 2 3 If ic 5, 9, and 13 can accept message 2, and ic 2, 4, and 7 can accept message 3, then the message sending is: m1 --> 3, m2 --> 5 m3 --> 2 m2 --> 9 --> 4 m2 --> 13 --> 7