Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

The ripple-spreading algorithm for the shortest path problem.

NotificationsYou must be signed in to change notification settings

Xavier-MaYiMing/The-ripple-spreading-algorithm-for-the-shortest-path-problem

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Reference: Hu X B, Wang M, Leeson M S, et al. Deterministic agent-based path optimization by mimicking the spreading of ripples[J]. Evolutionary Computation, 2016, 24(2): 319-346.
VariablesMeaning
networkDictionary, {node1: {node2: length, node3: length, ...}, ...}
sourceThe source node
destinationThe destination node
nnThe number of nodes
neighborDictionary, {node1: [the neighbor nodes of node1], ...}
vThe ripple-spreading speed (i.e., the minimum length of arcs)
tThe simulated time index
nrThe number of ripples - 1
epicenter_setList, the epicenter node of the ith ripple is epicenter_set[i]
path_setList, the path of the ith ripple from the source node to node i is path_set[i]
radius_setList, the radius of the ith ripple is radius_set[i]
active_setList, active_set contains all active ripples
OmegaDictionary, Omega[n] = i denotes that ripple i is generated at node n

Example (RSA4SPP.py)

if__name__=='__main__':test_network= {0: {1:62,2:44,3:67},1: {0:62,2:32,4:52},2: {0:44,1:33,3:32,4:52},3: {0:67,2:32,4:54},4: {1:52,2:52,3:54}    }source=0destination=4print(main(test_network,source,destination))
Output: [0, 2, 4]
The RSA.py was written in class.

About

The ripple-spreading algorithm for the shortest path problem.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp