Simulating Life

Just another UMass Boston Blogs site

Andy’s Code Review 03.31.17

| 1 Comment

 

I am currently working on adding divorce to my simulation. It is a two-step process

 

  1. Give males a 1/100 chance of changing their male ID to zero (induce a break up)
  2. Have the female always search for a male with her ID. If it is zero, then she will change her taken status to zero.

However, the way I am doing this is by only implementing it if her taken == 1. If i did it otherwise, she would immediately be divorced; since at the start no males have a female ID that matches up, and so the divorce count would immediately append.

 

I am not sure if there is a better way to implement this. I may also need to alter the chance of males breaking up, so as to be more evenly balanced with the coupling rates. Right now my divorce rate is really high.

One Comment

  1. I think this is right
    the challenge will be to figure out a way to see if it actually works – what to look for
    maybe set it to a high liklihood?

Leave a Reply

Required fields are marked *.


Skip to toolbar