network BigNetwork
{
    parameters:
        @signal[flood](type="long");
        @statistic[flood](title="number_of_messages"; source="flood"; record= vector,last);
        
        @signal[packet_size](type="long");
        @statistic[throughput](title="total_number_of_packets"; source="packet_size"; record=vector,last);
        
        @signal[hop_count](type="long");
        @statistic[latency](title="latency"; source="hop_count"; record= vector,last);  
        
        @signal[number_replies](type="long");
        @statistic[successRate](title="total_number_of_replies"; source="number_replies"; record=vector,last);  
    // @todo  statistics
    // num of resources found
    // no of hops
    // number of messages
    // distribution of the resource
    // number of Notification messages
    // processing time for the messages.
    types:
       channel Channel extends ned.DelayChannel {
            delay = 50ms;
        }
    submodules:
        CSE_in[3]: CSE;
        CSE_mn[18]: CSE;
        AE [42]: AE;
    connections allowunconnected :     
        for i=0..2 {
            CSE_in[i].sibling++ <--> Channel <--> CSE_in[(i+1)%3].sibling++;
        }
        for j=0..1 {
            CSE_mn[j].provider++ <--> Channel <--> CSE_in[0].customer++;
        }
        for j=2..3 {
            CSE_mn[j].provider++ <--> Channel <--> CSE_in[1].customer++;
        }
        for j=4..5 {
            CSE_mn[j].provider++ <--> Channel <--> CSE_in[2].customer++;
        }
        for j=6..7 {
            CSE_mn[j].provider++ <--> Channel <--> CSE_mn[0].customer++;
        }
        for j=8..9 {
            CSE_mn[j].provider++ <--> Channel <--> CSE_mn[1].customer++;
        }
        for j=10..11 {
            CSE_mn[j].provider++ <--> Channel <--> CSE_mn[2].customer++;
        }
        for j=12..13 {
            CSE_mn[j].provider++ <--> Channel <--> CSE_mn[3].customer++;
        }
        for j=14..15 {
            CSE_mn[j].provider++ <--> Channel <--> CSE_mn[4].customer++;
        }
        for j=16..17 {
            CSE_mn[j].provider++ <--> Channel <--> CSE_mn[5].customer++;
        }
        for j=0..1 {
            CSE_mn[0].ae++ <--> Channel <--> AE[j].cse++;
        }
        for j=2..3 {
            CSE_mn[1].ae++ <--> Channel <--> AE[j].cse++;
        }
        for j=4..5 {
            CSE_mn[2].ae++ <--> Channel <--> AE[j].cse++;
        }
        for j=6..7 {
            CSE_mn[3].ae++ <--> Channel <--> AE[j].cse++;
        }
        for j=8..9 {
            CSE_mn[4].ae++ <--> Channel <--> AE[j].cse++;
        }
        for j=10..11 {
            CSE_mn[5].ae++ <--> Channel <--> AE[j].cse++;
        }
        for j=12..13 {
            CSE_in[0].ae++ <--> Channel <--> AE[j].cse++;
        }
        for j=14..15 {
            CSE_in[1].ae++ <--> Channel <--> AE[j].cse++;
        }
        for j=16..17 {
            CSE_in[2].ae++ <--> Channel <--> AE[j].cse++;
        }
        for j=18..19{
            CSE_mn[6].ae++ <--> Channel <--> AE[j].cse++;
        }
        for j=20..21{
            CSE_mn[7].ae++ <--> Channel <--> AE[j].cse++;
        }
        for j=22..23{
            CSE_mn[8].ae++ <--> Channel <--> AE[j].cse++;
        }
        for j=24..25{
            CSE_mn[9].ae++ <--> Channel <--> AE[j].cse++;
        }
        for j=26..27{
            CSE_mn[10].ae++ <--> Channel <--> AE[j].cse++;
        }
        for j=28..29{
            CSE_mn[11].ae++ <--> Channel <--> AE[j].cse++;
        }
        for j=30..31{
            CSE_mn[12].ae++ <--> Channel <--> AE[j].cse++;
        }
        for j=32..33{
            CSE_mn[13].ae++ <--> Channel <--> AE[j].cse++;
        }
        for j=34..35{
            CSE_mn[14].ae++<--> Channel <--> AE[j].cse++;
        }
        for j=36..37{
            CSE_mn[15].ae++ <--> Channel <--> AE[j].cse++;
        }
        for j=38..39{
            CSE_mn[16].ae++ <--> Channel <--> AE[j].cse++;
        }
        for j=40..41{
            CSE_mn[17].ae++ <--> Channel <--> AE[j].cse++;
        }
        
        
        
        
        
        
 
}