singnet / offernet

Offer Networks simulation framework written in Java/Groovy/Gremlin
https://singnet.github.io/offernet/public/offernet-documentation/index.html
MIT License
8 stars 5 forks source link

finish decentralizedSearch routine #35

Closed kabirkbr closed 6 years ago

kabirkbr commented 6 years ago

the test should check if the routine finds a manually created and inserted into the network chain of {offer<->demand} pairs -- and if it does not find the chain that was not added to the network ;).

subtask of #15

kabirkbr commented 6 years ago

Here is how decentralizedPathSimulationTest() works (commited with 2f6c5a2):

  1. creates a network of agents of a predetermined size;
  2. creates a chain of {offers, demands} pairs and assigns them to random agents in the network; this is done so that we could know for sure that the network contains a chain and exactly in what form, so that we could then test if the search works correctly;
  3. runs a process on each agents which connects similar items to each other with 'similarity' links;
  4. runs a decentralized path search which tries to search and return a chains of {offer,demand} pairs in the network -- which hopefully contains the chain that was initialized in the beginning; actually, since the search is decentralized, the chain is found more than once. See comment for how a chain looks -- pulled out from the graph.