The interpreter understands a simplified java syntax, including mathematical operations. You have access to all the viewable HOM variables, and in addition, it is possible to invoke many functions that are not normally accessible, e.g. those requiring one or more parameters.
01234.567E89 is the format for numeric literal
double-precision floating point values.
true, false represent boolean literal values
+, -, /, *, ^ are the normal mathematical operators.
Note that the exponent x^y can be replaced with
pow(x,y)
item.subitem accesses an object found within another item,
for example, blood.arterial.O2 represents the arterial
oxygen content.
FullVariableName accesses a variable by its full name,
for example ArterialO2Content
APO2
blood.add( Pharmacy.dispenseDrug("Adrenaline",0.001,1) )
extract = blood.ultraFilter(0.100)
message("Message text") sends a string to
the console along with the current date and time.
drink(volume) adds a volume of water to
the stomach
eat(volume) adds a volume of food to the
stomach
time is a variable returning the current
time and date as a string
setRunning(true/false) instructs the engine
to stop or start calculating
PhicApplication.markEvent("TEST")
marks the current time in the margin of the scrolling graph panel
with the given text.
actions.drinkAcid(), or actions.potassiumBolus()
etc. etc. do what you expect them to.
HTMLMessagePane.showDialog("HTML_Resource_Filename")
shows a message dialog with the given html file displayed.
Variables.forName("VariableName") searches
the variable list for a variable that matches the given name
Container_Object.withdrawVol(volume) returns
a container with the specified volume of fluid removed from
the given container. The container object could be any item which
holds fluids, e.g. ecf, icf, blood, kidney.urine etc.
Container_Object_1.add(Container_object_2)
transfers the whole contents of container_2 into container_1
Container_Object.filterSolids() returns a container
with just the fluid compartment of the specified container. The
solids remain in the original container.
Drug_Container_Object.getDrugBinding(
"DRUG_PROPERTY_NAME") returns a value indicating
the amount of binding of drugs to a particular receptor, as
given in the file resouces/Pharmacy.txt
PhicApplication.frame.doSetup("FrameSetup.txt",
"Setup_Type_Name") reinitialises the environment with
a new setup section from the file resources/FrameSetup.txt
DrugParser.createSubstance("Water 0.010 + K 0.005")
returns a container, whose contents reflect the string typed in
the box. Permitted additions include the standard container variables
(Na, K, Glu, Prot etc.), Fluid names as defined in the file
resources/Fluids.txt, and drug names as defined in the file
resources/Pharmacy.txt; each item being followed by a number indicating
how much to add.
Organ.completedCycles returns the internal count of how
many cycles of calculation have been performed in this instance of HOM.
afterSeconds(7.50, "message( \"hi\" )" ) causes the command
in quotes to be executed once after the given number of body-time seconds
have elapsed. Notice that characters can be escaped with backslash
'\' to allow special characters inside strings. You can use this to
create sequences of events.
For a full list of variables, subvariables and functions, refer to the JavaDoc source documentation (this is a large file weighing 7 MB!) here
exp log log10 E = exp(1) PI sqrt sin cos tan sec cosec cot sinh cosh tanh sech cosech coth acos asin atan atan2(x,y) random min(x,y) max(x,y) nCr(x,y) floor ceil abs sgn mod(x, base) frac ramp truncatedRamp factorial eulerGamma = 0.57721... pow(x,y) = x^yBack