You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
740 B
32 lines
740 B
# suppose 20 nodes with chosen ip addresses
|
|
{
|
|
init
|
|
node ready; true
|
|
[
|
|
# probe with fresh ip so do nothing
|
|
send_fresh||tran ready; true; y=0; 1.0
|
|
]
|
|
[
|
|
# probe with used ip address (0.5 probability message lost)
|
|
send_used||tran ready; true; y=0; 0.1
|
|
send_used||tran send; true; y=0; 0.9
|
|
]
|
|
}
|
|
{
|
|
node send; y<=5
|
|
[
|
|
# wait 1 second for meassge to arrive and reply (which may get lost)
|
|
tran ready; y>=1; y=0; 0.1
|
|
tran reply; y>=1; y=0; 0.9
|
|
]
|
|
}
|
|
{
|
|
node reply; y<=5
|
|
[
|
|
# takes up to 1 second arrive
|
|
recv||tran ready; y>=1; y=0; 1.0
|
|
]
|
|
*
|
|
|
|
# to prevent overlap has assused takes between 0.1 and 0.5 second for message to arrive and for reply to be sent
|
|
# this gives overall time limit of les than 2 (the time bwteen sending probes)
|