Skip to main content

Table 1 test_simulation pseudocode

From: The Multiscale Systems Immunology project: software for cell-based immunological simulation

procedure Initialize(n0) Number of leukocytes.
   DBConnStr ← (user, dbname, host, port, password) Initialize database.
   DBMaker ← DBMaker::Instance(DBConnStr)  
   Environment ← DBMaker.CreateEnvironment("testenv")  
   Source1 ← DBMaker.CreateCell("source") Creating and adding point sources to Environment.
   Source1.SetPosition(x1, y1, z1)  
   Source2 ← DBMaker.CreateCell("source")  
   Source2.SetPosition(x2, y2, z2)  
   Source3 ← DBMaker.CreateCell("source")  
   Source3.SetPosition(x3, y3, z3)  
   TNF ← DBMaker.CreateSolfac("tnf") Creating and adding soluble factors to environment.
   STNFR ← DBMaker.CreateSolfac("stnfr")  
   MCP1 ← DBMaker.CreateSolfac("mcp1")  
   Vasculature ← DBMaker.CreateVasculature("testvessel")  
   for i ← 1, n0 do Creating and adding leukocytes to environment.
Cell ← DBMaker.CreateCell("macrophage")  
   end for  
end procedure  
procedure Main(dt, numsteps)  
   Simulation ← new Simulation(Environment)  
   for i ← 1, numsteps do  
Log(i, Simulation) Log of simulation results.
   end for  
end procedure