Nakhaee et. al.The color set RoutTable (l<strong>in</strong>e 17 <strong>in</strong> Fig. 8) def<strong>in</strong>es thestructure <strong>of</strong> a route entry <strong>in</strong> route table. It conta<strong>in</strong>s thefollow<strong>in</strong>g fields:DID: Dest<strong>in</strong>ation <strong>of</strong> the route.NID: Next node on the route to DID.DSEQ: Most recent recorded sequence number fordest<strong>in</strong>ation DID.INT: Distance from the dest<strong>in</strong>ation DID, measured <strong>in</strong>the number <strong>of</strong> hops that need to be traversed to reachDID.LIFETIME: Rema<strong>in</strong><strong>in</strong>g time before the route expires.R_degree: Route reliability degree.colset INT = <strong>in</strong>t;colset LIFETIME, BID,DSEQ, SSEQ, DEST, DUMMY,Node_id,Q_len = INT;colset DID, SID, NID, PID = Node-id;colset Qmean, Rlb: realcolset TYPE = with P|Q;closet Maxq = Q_len;colset RoutMsg = productBID*SID*SSEQ*DID*DSEQ*PID*INT*TYPE*DUMMY*Qmean*Maxq;colset BufferREQ = product BID*SID*INT*PID*Qmean*Maxq;colset bufferReqList = List BufferREQ;var lst: bufferReqList;colset Topology = product Node-id * Node-id;colset AHTopology = List Topology;colset INTxINT = product INT*INT;colset INTxINTxINT = product INT*INT*INT;colset RoutTable = product DID*DSEQ*INT*NID*Rlb*LIFETIME;colset routTabList =list RoutTable;var routlst : routTablist;var wait, lifetime : TIME;var bid, sseq, dseq, hopn: INT;var rlb,rrlb: Rlb;var sid, did , selfid, preid : Node-id;var adhoc-topology : AHTopology;var bbid, ssid, ddid, ddseq : INT;var qmean : Qmean;var maxq,qlen : Q_len;var nohop, dest, n, nexthop : INT;var ptype: TYPE;var nid,pid : NID;var msg, routMsg : RoutMsg;var i: Node-id;Fig. 8. Color sets and variablesTABLE1– FUNCTIONS LISTNumber Function1 fun has_validRout(did,[])= false|has_validRout(did,(ddid,dseq,I,nid,lifetime)::rest)=if (did = ddidandalso lifetimeadd_rout(did,dseq,nohop,nid,0,routlst,rrlb)|2 =>routlst;fun arc_forward RREP(sid,selfid,bid,lifetime,did, dseq,n,hop,lst,rrlb)=If(sid selfid)then 1’(bid, sid, lifetime, did,dseq, selfid,nohop+1,p,rrlb,get_pid(bid, sid,lst))else emptyfun arc_newbid(bid,sid, lst,sseq, did,dseq,pried,nohop, qmean,maxq)=if has_id (bid, sid, lst)then emptyelse 1’(bid, sid, sseq, did, dseq, pried,nohop,q,99,qmean,maxq);fun guard_sendRREP(did,routlst,dseq,selfid)=if((dseq get_dseq(routlst)andalsohas_validrout(did,routlst))orelse(did=selfid))andalso (timerrlb1 orelselifetime>100) then 1elseif( did=ddid andalso rrlb
A Novel Communication Model to Improve AODV Protocol Rout<strong>in</strong>g Reliabilityremove_rout(did,(ddid,ddseqer,ii,nnid,lifetime)::rest)=if(did=ddid)then restelse(ddid,ddseqr,ii,nnid,lifetime)::remove_rout(did,rest);fun has_id(bid, sid,[])=false13 | has_id(bid, sid,(b,s,h,p)::rest)=if(bid=b andalsosid=s )then trueelse has_id(bid, sid, rest)fun arc_setreliable (did, selfid, bid, sid, dseq,14 preid,routlst,qmean,maxq)=if (did= selfid) thenif(set_reliability(set_qmean(qlen,qmean,nohop),maxq,rlb) then1`(bid,sid,0,did,dseq,selfid,1,p,preid,rlb)else emptyelseif(set_reliability1(set_qmean(qlen,qmean,nohop),maxq,rlb)) then1`(bid,sid,0,did,dseq,selfid,1+get_hop(did,routlst),p,preid, rlb)else emptyfun guard_sendRREP2( lifetime ,wait)=15 if (wait > lifetime) thentrueelsefalsefun set_qmean(qlen,qmean, hopno)=16 (((hopno -1) * qmean + (1/qlen))/hopno)::qmean ;17 fun set_maxq (maxq, qlen) =if (qlen>= maxq) then18qlen :: maxq;fun set_reliability(set_qmean(qlen,qmean,nohop), maxq,nohop,[])=if (nohop>1) then((3*qmean+2*1/maxq+1/nohop)/6 :: rlb;else(3*qmean +(1/nohop))/6 :: rlb ; |set_reliability (set_qmean(qlen,qmean,nohop),maxq, nohop,rlb)=if (nohop>1) thenif (((3*qmean+2*(1/maxq)+1/nohop)/6)>rlb)then((3*qmean+2*1/maxq+1/nohop)/6 :: rlb;else emptyelseif ( (3*qmean +(1/nohop))/6)>rlb)then(3*qmean +(1/nohop))/6) :: rlbelse empty19 fun set_reliability1(set_qmean(qlen,qmean,nohop), maxq,nohop,rlb)=if (nohop>1) then(((3*qmean+2*(1/maxq)+(1/nohop))/6)+rlb)/2):: rlb ;else(((3*qmean +(1/nohop))/6)+rlb)/2 :: rlb ;IV. SIMULATION AND COMPARISONWe present our CPN model for modified AODVprotocol and compared it with CPN model presented byxiong et al[9] for typical AODV protocol. We use CPNTools to run our simulation. Table II shows the number<strong>of</strong> broken routes <strong>in</strong> both typical AODV protocol andmodified AODV protocol where the variable parameteris time, show<strong>in</strong>g that modified AODV algorithm cangreatly decrease the broken numbers <strong>of</strong> routs.Fig. 9 shows the improvement rate <strong>of</strong> rout<strong>in</strong>greliability when compar<strong>in</strong>g modified AODV withtypical AODV, <strong>in</strong>dicat<strong>in</strong>g that the improvement becomemore significant when time <strong>in</strong>creases. The averageimprovement rate reaches about 80%.Total timeTypicalAODVProtocolModifiedAODVProtocolTABLEI IBROKEN ROUTE NUMBERS100 200 300 40014 23 34 39359V. CONCLUSION12500441460053We present a hierarchical CP net for a MANET whichis used AODV rout<strong>in</strong>g protocol. There exists for eachnode <strong>in</strong> the model a CPN subpage. Also we consider aCP net for the states that a node receiv<strong>in</strong>g, send<strong>in</strong>g, andprocess<strong>in</strong>g messages. In our model we use a newmethod to show network topology and also modifiedroute selection criteria <strong>in</strong> AODV protocol accord<strong>in</strong>g toaverage packet queue length and maximum packetqueue length <strong>in</strong> the nodes along the path. Our formalCPN models prove that if we use new selection criteria<strong>in</strong> rout<strong>in</strong>g the route reliability will be improvedconsiderably.Fig. 9. Performance improvement <strong>of</strong> routes reliability17247 | P a g e