Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Evening activity does not get ready for groups with small host counts #48

Open
atbits opened this issue Mar 17, 2017 · 0 comments
Open

Comments

@atbits
Copy link

atbits commented Mar 17, 2017

If the value of "probGoShoppingAfterWork" is low or "maxGroupSize" is high relative to "nrofHosts" in a group - we end up with nodes that do not return from shopping ;-)
Following is the suggest fix - please feel free to adapt as per your coding conventions.
Note updated the logic issue in my suggested fix on 20th April. Attaching the modified file as well. This may be a short term fix - actual fix may be needed from multiple other files.

--- a/src/movement/EveningActivityMovement.java
+++ b/src/movement/EveningActivityMovement.java
< import core.SimClock;
63d61
< private long nodeJoinFixTime =0; // ABHISHEK FIX
192d189
< nodeJoinFixTime = SimClock.getIntTime(); // ABHISHEK FIX
240,244d236
< long printCount =0;
< /* Abhishek - if the quorum is not being met - some times the evening
< * activity may block in non-ready mode
< * Because of randomization - on small group we may never have quorum
< /
249,264d240
< // ABHISHEK FIX - node join fix time
< if(ready)
< return true;
< double timeDelta = SimClock.getIntTime() - nodeJoinFixTime;
< if(timeDelta > 4
maxWaitTime){
< System.err.println("ABHISHEK FIX FINAL- too long a wait - aborting full list: full-check" + trip.isFull() +
< " allPresent:" + trip.allMembersPresent() + " last join time:" + nodeJoinFixTime);
< ready = true;
<
< } else if(timeDelta > maxWaitTime ){
< printCount++;
< if(printCount < 10 || printCount % 10000==0){
< System.err.println("ABHISHEK FIX AA- too long a wait - aborting full list: full-check" + trip.isFull() +
< " allPresent:" + trip.allMembersPresent() + " last join time:" + nodeJoinFixTime);
< }
< }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant