def __init__(self, agent):
        self.agent = agent
        self.lock = Lock()
        self.plotter = Plotter(num_lines=3)

        from farmer import farmer as farmer_class
        self.farmer = farmer_class()
    def __init__(self, agent):
        self.agent = agent
        self.lock = Lock()

        from farmer import farmer as farmer_class
        self.farmer = farmer_class()
Beispiel #3
0
 def refarm():
     global farmer
     del farmer
     farmer = farmer_class()
Beispiel #4
0
    #
    # from multi import eipool # multiprocessing driven simulation pool
    # epl = None
    # def newpool(count=6):
    #     global epl,show_sim
    #     tepl = epl
    #     epl = eipool(count,showfirst=show_sim)
    #     del tepl
    #
    # newpool()

    from farmer import farmer as farmer_class
    # from multi import fastenv

    # one and only
    farmer = farmer_class()

    def refarm():
        global farmer
        del farmer
        farmer = farmer_class()

    stopsimflag = False

    def stopsim():
        global stopsimflag
        print('stopsim called')
        stopsimflag = True

    tb = TriggerBox('Press a button to do something.', ['stop simulation'],
                    [stopsim])
Beispiel #5
0
 def setup_farmer():
     global farmer
     if farmer==None:
         farmer = farmer_class()