LABSS / PROTON-T

Simulation of recruitment to terrorism
MIT License
1 stars 2 forks source link

reduce number of places remembered by citizens #72

Closed digitaldust closed 5 years ago

digitaldust commented 5 years ago

the point is to reduce the number of activity-links so that it doesn't exceed a cap labeled in citizen-own as:

  activity-cap

and defined in setup-citizen as:

set activity-cap     random 50  

so to give a bit of variance around 25, which is the expected mean

It looks like the procedure to create such links is setup-free-time-activities, and I am trying to break at random some connections if over the threshold, but it doesn't look like it works:

to setup-free-time-activities
  ask citizens [
    ; look for possible free-time activities around current activities
    let the-citizen self
    let reachable-activities my-nearby-activities with [
      [ not is-mandatory? and not is-job? ] of my-activity-type and [ can-do? myself ] of the-citizen
    ]
    create-activity-links-to n-of min list links-cap count reachable-activities reachable-activities [
      set value -1 + random-float 2 ; TODO: how should this be initialized?
    ]
    if count activity-link-neighbors < activity-cap [
      ask n-of (activity-cap - count activity-link-neighbors) my-activity-links [die]
    ]
  ]
end

but I am afraid I am killing activities that are not free time stuff only, might need a check to assure that.

mariopaolucci commented 5 years ago

Why in the setup?

get-or-create-link-with should be the place - activities should be checked and removed if not compulsory of jobs, based on how much they are liked?

digitaldust commented 5 years ago

because you want a value for the upper bound… don't you? and that's in the setup… if you want to have a little variance for each citizen...

anyway, I checked get-or-create-link-with and it looks like you already have a check in place with links-cap (from the interface), and that's why every time I always end up with people having no more and no less that ~20 links…

digitaldust commented 5 years ago

and that also matches with what observed in the link creation, ~20 * 40000 = ~800.000 as we have in the plots, and that's a correctly capped value… the only thing we can try is to play with the slider and have them remembering like 10 places tops...

mariopaolucci commented 5 years ago

.. agh. Then it's all for nothing - we can't reduce the links lower than this (except for a test, sure)

mariopaolucci commented 5 years ago

.. agh. Then it's all for nothing - we can't reduce the links lower than this (except for a test, sure)