|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectmetab.NMSubject
The NMSubject class handles the bulk of the computations for the
compartmental model. An instance of the class is representative of one human
subject. The subject contains exactly one Stomach, Intestine,
and LeanBodyMass compartment. See the constructor for the information
required for using this class. Values for the bitFlag argurment need to be
or'd ( | ) together, with one option set for each category. The categories are
food present in the stomach, drinking history, and units of measurement. When
_METRIC is selected as the units of measurement, cm and kg should be used for
the height and weight arguments, and when _IMPERIAL is selected, in and lbs
should be used. When returning the bitFlag, the user should check to see if
the _ERROR bit is checked. If so, then the user constructed the object incorrectly
and should re-initialize it appropriately. This class keeps track of BAC during
each minute time interval and final BAC should be determined from the array
determined by the getBAC method.
Stomach,
Intestine,
LeanBodyMass,
Subject,
Drink,
DrinkTime,
TDSubject,
Serialized Form| Field Summary | |
static int |
_AVERAGE_MEAL
Standard value representing an average meal was eaten recently. |
static int |
_ERROR
Standard value representing that an error occured while retrieving info. |
static int |
_HEAVY_DRINKER
Standard value representing that the subject is a heavy drinker. |
static int |
_IMPERIAL
Standard value representing that input units are in Imperial units. |
static int |
_LARGE_MEAL
Standard value representing a large meal was eaten recently. |
static int |
_LIGHT_DRINKER
Standard value representing that the subject is a light drinker. |
static int |
_LIGHT_MEAL
Standard value representing a light meal was eaten recently. |
static int |
_METRIC
Standard value representing that input units are in metric units. |
static int |
_MODERATE_DRINKER
Standard value representing that the subject is a moderate drinker. |
static int |
_NO_MEAL
Standard value representing no meal was eaten recently. |
private static double |
absorbVolume
Amount of liquid exiting the intestine through the villi (L/min). |
private int |
age
Age in years. |
private double[] |
BACvalues
Array of the value for the BAC at every time interval. |
private int |
bitFlag
Bitflag representing all set switches. |
private LeanBodyMass |
body
Represents the subject's non-fatty body mass. |
private Drink[] |
drinks
Array of all the drinks consumed by the subject. |
private DrinkTime |
end
Represents the time that the subject stopped consuming their drinks. |
private char |
gender
Represents the gender of the subject ('M' or 'F'). |
private double |
height
Height (cm). |
private Intestine |
intestine
Represents the subject's small intestine. |
private static double |
newFluid
Amount of gastric fluid being produced in the stomach (L/min). |
private double |
passingEthanol
Represents the amount of ethanol to be introduced each cycle (g/min). |
private double |
passingVolume
Represents the amount of liquid to be introduced each cycle (L/min). |
private double |
peakBAC
Represents the highest BAC achieved during the time interval. |
private static double |
squirtVolume
Amount of liquid exiting the stomach through pyloric sphincter (L/min). |
private DrinkTime |
start
Represents the time that the subject started consuming their drinks. |
private Stomach |
stomach
Represents the subject's stomach. |
private java.lang.String |
subjectName
Represents the name and/or description of the subject. |
private double |
TBW
Represents the total water content of the body (L). |
private int |
timeForZeroEthanol
Represents number of minutes after the specified amount at which point the BAC would become zero. |
private double |
totalEthanol
Represents the total amount of ethanol to be introduced (g). |
private int |
totalMinutes
Total number of minutes in drinking interval. |
private double |
totalVolume
Represents the total amount of liquid to be introduced (L). |
private double |
weight
Weight (kg). |
| Constructor Summary | |
(package private) |
NMSubject(int age,
double height,
char gender,
double weight,
Drink[] drinks,
DrinkTime start,
DrinkTime end,
java.lang.String subjectName,
int bitFlag)
Constructor for the New Model subject class. |
| Method Summary | |
int |
getAge()
Retrieves the age of the subject. |
double[] |
getBAC()
Retrieves the list of BACvalues recorded while the model was running. |
int |
getBitF()
Retrieves the options set in the subject's bit flag. |
Drink[] |
getDrinks()
Retrieves the list of drinks consumed by the subject. |
DrinkTime |
getEndTime()
Retrieves the time when the subject stopped drinking. |
char |
getGender()
Retrieves the gender of the subject. |
double |
getHeight()
Retrieves the height of the subject depending on the system of measurement selected. |
int |
getMinutes()
Retrieves the total number of minutes for the drinking time. |
java.lang.String |
getName()
Retrieves the name and description of the subject. |
double |
getPeakBAC()
Retrieves the peak BAC achieved during the drinking period. |
DrinkTime |
getStartTime()
Retrieves the time when the subject stopped drinking. |
double |
getTBW()
Retrieves the Total Body Water (TBW) for the subject. |
double |
getWeight()
Retrieves the weight of the subject depending on the system of measurement selected. |
private void |
peakBAC()
Checks to see if a new peak BAC has been reached. |
boolean |
runModel()
Runs the compartmental model. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int _LIGHT_MEAL
public static final int _AVERAGE_MEAL
public static final int _LARGE_MEAL
public static final int _NO_MEAL
public static final int _LIGHT_DRINKER
public static final int _MODERATE_DRINKER
public static final int _HEAVY_DRINKER
public static final int _METRIC
public static final int _IMPERIAL
public static final int _ERROR
private static final double squirtVolume
private static final double absorbVolume
private static final double newFluid
private int bitFlag
private int age
private int timeForZeroEthanol
private int totalMinutes
private double[] BACvalues
private double height
private double weight
private double peakBAC
private double totalEthanol
private double totalVolume
private double TBW
private double passingEthanol
private double passingVolume
private char gender
private java.lang.String subjectName
private Drink[] drinks
private DrinkTime start
private DrinkTime end
private Stomach stomach
private Intestine intestine
private LeanBodyMass body
| Constructor Detail |
NMSubject(int age,
double height,
char gender,
double weight,
Drink[] drinks,
DrinkTime start,
DrinkTime end,
java.lang.String subjectName,
int bitFlag)
age - int representing the age of the subject in years.height - double representing the height of the subject.gender - char representing the gender of the subject.weight - double representing the weight of the subject.drinks - Drink array representing all the drinks drank
by the subject.start - DrinkTime representing the time that the
subject started drinking.end - DrinkTime representing the time that the subject
stopped drinking.subjectName - String representing the subjects name and
/ or description.bitFlag - int representing all set switches.| Method Detail |
public int getAge()
int representing the subject's age (yrs).public double[] getBAC()
doubles containing the chronological list of
BAC values.public int getBitF()
int representing the bit flag.public Drink[] getDrinks()
Drinks containing the drink objects.public DrinkTime getEndTime()
DrinkTime representing the end time.public double getHeight()
double representing the height (cm or in).public char getGender()
char representing gender ('M' or 'F').public int getMinutes()
int representing the total number of minutes.public java.lang.String getName()
String containing the subject name.public double getPeakBAC()
double representing the peak BAC.public DrinkTime getStartTime()
DrinkTime representing the end time.public double getTBW()
double representing the TBW.public double getWeight()
double representing the weight (kg or lb).private void peakBAC()
public boolean runModel()
boolean value that represents whether the method
executed successfully. true if successful,
otherwise, unsuccessful.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||