Skip to content

Commit

Permalink
change adoption state
Browse files Browse the repository at this point in the history
  • Loading branch information
ptaillandier committed Jan 13, 2025
1 parent bbadccc commit 23cffcf
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -414,12 +414,13 @@ public boolean doStep(final IScope scope) {
double adoptTime = getAdoptionTime(ag);
adoptTime += scope.getSimulation().getTimeStep(scope);
setAdoptionTime(ag, adoptTime);
if (getIntention(ag) >= getAdoptionThreshold(ag) && adoptTime >= getConfirmationTime(ag) ) {
if (adoptTime >= getConfirmationTime(ag) ) {
setAdoptionState(ag,CONFIRMATION);
}
}
if (IMPLEMENTATION.equals(state) || CONFIRMATION.equals(state)) {
doActionNoArg(scope, "get_usage_knowledge");
if (!CONFIRMATION.equals(state) || getIntention(ag) >= getAdoptionThreshold(ag))
doActionNoArg(scope, "get_usage_knowledge");
if (!getSocialNetwork(ag).isEmpty() && Random.opFlip(scope, getProbaExchange(ag))) {
IAgent other = getSocialNetwork(ag).anyValue(scope);
doAction1Arg(scope, "interaction_with_other", "other", other);
Expand Down

0 comments on commit 23cffcf

Please sign in to comment.