def step(self, mcs): pass #type here the code that will run every _frequency MCS for cell in self.cellList: if cell.type == self.NONCONDENSING: state = bionetAPI.getBionetworkState(cell.id, 'OSCLI') concentration = state['S1'] # print "concentration=",concentration cell.targetVolume = 25 + 10 * concentration bionetAPI.timestepBionetworks()
def step(self,mcs): pass #type here the code that will run every _frequency MCS for cell in self.cellList: if cell.type==self.NONCONDENSING: state=bionetAPI.getBionetworkState(cell.id,'OSCLI') concentration=state['S1'] # print "concentration=",concentration cell.targetVolume=25+10*concentration bionetAPI.timestepBionetworks()
def step(self,mcs): for cell in self.cellList: if (cell): D=0.0; nn=0 cellNeighborList=self.getCellNeighbors(cell) for neighbor in cellNeighborList: if (neighbor.neighborAddress): nn+=1 state=bionetAPI.getBionetworkState(neighbor.neighborAddress.id,'DeltaNotch') D+=state['D'] if (nn>0): D=D/nn state={} state['Davg']=D bionetAPI.setBionetworkState(cell.id,'DeltaNotch',state) state=bionetAPI.getBionetworkState(cell.id,'DeltaNotch') cell.dict['D']=D cell.dict['N']=state['N'] bionetAPI.timestepBionetworks()
def step(self,mcs): if not self.pW: self.initPlot() print "PlotsSteppable: This function is called every 10 MCS" for cell in self.cellList: if cell.type==self.NONCONDENSING: state=bionetAPI.getBionetworkState(cell.id,'OSCLI') concentration=state['S1'] #self.pW.eraseAllData() # this is how you erase previous content of the plot self.pW.addDataPoint("DATA_SERIES_1",mcs,concentration) # arguments are (name of the data series, x, y) print "concentration=",concentration break self.pW.showAllPlots()
def step(self, mcs): if not self.pW: self.initPlot() print "PlotsSteppable: This function is called every 10 MCS" for cell in self.cellList: if cell.type == self.NONCONDENSING: state = bionetAPI.getBionetworkState(cell.id, 'OSCLI') concentration = state['S1'] #self.pW.eraseAllData() # this is how you erase previous content of the plot self.pW.addDataPoint( "DATA_SERIES_1", mcs, concentration ) # arguments are (name of the data series, x, y) print "concentration=", concentration break self.pW.showAllPlots()