Esempio n. 1
0
import CompuCellSetup

sim, simthread = CompuCellSetup.getCoreSimulationObjects()

# add extra attributes here

CompuCellSetup.initializeSimulationObjects(sim, simthread)
# Definitions of additional Python-managed fields go here

pyAttributeAdder, dictAdder = CompuCellSetup.attachDictionaryToCells(sim)

#Add Python steppables here
steppableRegistry = CompuCellSetup.getSteppableRegistry()

OrientedGrowthPlugin = CompuCell.getOrientedGrowthPlugin()

from cancol2Steppables import CellLayoutSteppable
cellLayoutSteppable = CellLayoutSteppable(sim, _frequency=1)
steppableRegistry.registerSteppable(cellLayoutSteppable)

from cancol2Steppables import VolumeParamSteppable
volumeParamSteppable = VolumeParamSteppable(sim, _frequency=1)
steppableRegistry.registerSteppable(volumeParamSteppable)

from cancol2Steppables import MatrixDegradation
MDSteppable = MatrixDegradation(sim, _frequency=1)
steppableRegistry.registerSteppable(MDSteppable)

from cancol2Steppables import MitosisSteppable
mitosisSteppable = MitosisSteppable(sim, _frequency=1)
import sys
from os import environ
from os import getcwd
import string
sys.path.append(environ["PYTHON_MODULE_PATH"])
import CompuCellSetup
sim,simthread = CompuCellSetup.getCoreSimulationObjects()     
CompuCellSetup.initializeSimulationObjects(sim,simthread)
        
#Add Python steppables here
steppableRegistry=CompuCellSetup.getSteppableRegistry()

import CompuCell
OrientedGrowthPlugin = CompuCell.getOrientedGrowthPlugin()  

from OrientedGrowthDemoSteppables import GrowthSteppable
GrowthSteppableInstance=GrowthSteppable(sim,_frequency=10)
steppableRegistry.registerSteppable(GrowthSteppableInstance)
  
from OrientedGrowthDemoSteppables import OrientedConstraintSteppable
OrientedConstraintSteppableInstance=OrientedConstraintSteppable(sim,_frequency=1,_OGPlugin=OrientedGrowthPlugin)
steppableRegistry.registerSteppable(OrientedConstraintSteppableInstance)
        
CompuCellSetup.mainLoop(sim,simthread,steppableRegistry)