org.cfpm.caves.za
Class HIVAIDS

java.lang.Object
  extended by org.cfpm.caves.za.HIVAIDS

public class HIVAIDS
extends java.lang.Object

This class models the HIV infection for a person. It's implemented as a separate class instead of an inner class to Person to be able to use static attributes for the transmission probabilities and distribution of disease progression.

Author:
Ruth

Field Summary
(package private)  int currentStage
          the current clinical stage of HIV.
(package private)  int developedAIDS
          tick of developing AIDS.
(package private) static double gamma
           
(package private)  int infectedSince
          the tick of contracting HIV.
(package private) static double mu
           
(package private) static flanagan.math.PsRandom progressionDist
           
(package private) static double sigma
           
(package private) static double[] transmissionProbs
           
 
Constructor Summary
HIVAIDS(int tick)
          Creates a new HIV/AIDS handler at the current tick.
HIVAIDS(int tick, int stage)
          Creates a new HIV/AIDS handler for the current tick and clinical stage.
 
Method Summary
(package private)  int getDevelopedAIDS()
          returns the tick of progression to AIDS
(package private)  int getInfectedSince()
          returns the tick of HIV infection
 double getTransmissionProbability(int currentTick)
          returns the probability of transmitting HIV according to the current clinical stage
 boolean hasAIDS()
          returns if the person has progressed to AIDS or not
 boolean isHIVPositive()
          returns if the person is HIV-positive or not
private  void updateStage(int currentTick)
          updates the clinical stage if necessary
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

progressionDist

static flanagan.math.PsRandom progressionDist

mu

static double mu

sigma

static double sigma

gamma

static double gamma

transmissionProbs

static final double[] transmissionProbs

infectedSince

int infectedSince
the tick of contracting HIV. Default is -1 (no infection)


developedAIDS

int developedAIDS
tick of developing AIDS. Default is -1 (no AIDS yet)


currentStage

int currentStage
the current clinical stage of HIV. Default is 0 (no infection)

Constructor Detail

HIVAIDS

HIVAIDS(int tick)
Creates a new HIV/AIDS handler at the current tick. The clinical stage is set to 1.

Parameters:
tick - the tick when the person contracted HIV

HIVAIDS

HIVAIDS(int tick,
        int stage)
Creates a new HIV/AIDS handler for the current tick and clinical stage. This constructor is provided for the model initialisation.

Parameters:
tick - the tick when the person contracted HIV
stage - the clinical stage of HIV
Method Detail

getInfectedSince

int getInfectedSince()
returns the tick of HIV infection

Returns:
tick of infection

getDevelopedAIDS

int getDevelopedAIDS()
returns the tick of progression to AIDS

Returns:
tick of AIDS progression

isHIVPositive

public boolean isHIVPositive()
returns if the person is HIV-positive or not

Returns:
true if the person is HIV-positive (infectedSince >= 0), false otherwise

hasAIDS

public boolean hasAIDS()
returns if the person has progressed to AIDS or not

Returns:
true if the person has AIDS (developedAIDS >= 0), false otherwise

updateStage

private void updateStage(int currentTick)
updates the clinical stage if necessary

Parameters:
currentTick - the current tick

getTransmissionProbability

public double getTransmissionProbability(int currentTick)
returns the probability of transmitting HIV according to the current clinical stage

Parameters:
currentTick - the current tick
Returns:
transmission probability