コード例 #1
0
    def _setup(self):
        stock_template = ACLTemplate()
        stock_template.setOntology('stock')

        mt = MessageTemplate(stock_template)
        settings = self.Speculate()
        self.addBehaviour(settings, mt)
コード例 #2
0
    def _setup(self):
        helper.print_green("\nVAS Stock exchange\t%s\tis up" % self.getAID().getAddresses())

        template = ACLTemplate()
        template.setOntology('stock')

        behaviour = spade.Behaviour.MessageTemplate(template)
        self.addBehaviour(self.OpenStockExchange(), behaviour)
コード例 #3
0
    def _setup(self):
        print "\n Agent\t" + self.getAID().getName() + " is up"

        template = ACLTemplate()
        template.setOntology('booking')

        behaviour = spade.Behaviour.MessageTemplate(template)
        booking = self.Booking()
        self.addBehaviour(booking, behaviour)
コード例 #4
0
    def _setup(self):
        print "\n Agent\t" + self.getAID().getName() + " is up"

        feedback_template = ACLTemplate()
        feedback_template.setOntology('game')

        message_template = MessageTemplate(feedback_template)
        settings = self.Coordinate()
        self.addBehaviour(settings, message_template)
コード例 #5
0
ファイル: server.py プロジェクト: lpredova/pybookie
    def _setup(self):
        print "\n Agent\t" + self.getAID().getName() + " is up"

        template = ACLTemplate()
        template.setOntology('booking')

        behaviour = spade.Behaviour.MessageTemplate(template)
        booking = self.Booking()
        self.addBehaviour(booking, behaviour)
コード例 #6
0
ファイル: playerB.py プロジェクト: lpredova/pyGuessingGame
    def _setup(self):
        print "\n Agent\t" + self.getAID().getName() + " is up"

        game_template = ACLTemplate()
        game_template.setOntology('game')

        message_template = MessageTemplate(game_template)
        settings = self.Play()
        self.addBehaviour(settings, message_template)
        settings.say_ready()
コード例 #7
0
ファイル: traveler.py プロジェクト: lpredova/pyTA
    def _setup(self):
        print "\n Agent\t" + self.getAID().getName() + " is up"

        feedback_template = ACLTemplate()
        feedback_template.setOntology('travel')

        mt = MessageTemplate(feedback_template)
        settings = self.Travel()
        self.addBehaviour(settings, mt)
        settings.set_preferences()
コード例 #8
0
ファイル: passenger.py プロジェクト: aterrasa/taxi_simulator
    def _setup(self):
        self.port = unused_port("127.0.0.1")
        self.wui.setPort(self.port)
        self.wui.start()
        self.wui.registerController("update_position",
                                    self.update_position_controller)

        tpl = ACLTemplate()
        tpl.setProtocol(TRAVEL_PROTOCOL)
        template = MessageTemplate(tpl)
        self.addBehaviour(TravelBehaviour(), template)
    def _setup(self):

        print "\n Agent\t" + self.getAID().getName() + " je aktivan"

        feedback_template = ACLTemplate()
        feedback_template.setOntology("termin_sastanka")
        mt = MessageTemplate(feedback_template)
        termin = self.PrimiTerminSastanka()
        self.addBehaviour(termin, mt)
        termin.setGoogleAccountPodatke(self.google_client_id, self.google_client_secret, self.google_client_username,
                                       self.getAID().getName(), self.ne_preferirani_termini)
コード例 #10
0
ファイル: client.py プロジェクト: lpredova/pybookie
    def _setup(self):
        print "\n Agent\t" + self.getAID().getName() + " is up"

        feedback_template = ACLTemplate()
        feedback_template.setOntology('booking')

        mt = MessageTemplate(feedback_template)
        settings = self.BookingSettings()
        self.addBehaviour(settings, mt)

        settings.send_message(json.dumps({'request_type': 'games'}))
コード例 #11
0
ファイル: client.py プロジェクト: lpredova/pybookie
    def _setup(self):
        print "\n Agent\t" + self.getAID().getName() + " is up"

        feedback_template = ACLTemplate()
        feedback_template.setOntology('booking')

        mt = MessageTemplate(feedback_template)
        settings = self.BookingSettings()
        self.addBehaviour(settings, mt)

        settings.send_message(json.dumps({'request_type': 'games'}))
    def _setup(self):

        time.sleep(5)

        print "\n Agent\t" + self.getName() + " je aktivan"

        povratna_informacija = ACLTemplate()
        povratna_informacija.setOntology("povratna_informacija")
        predlozak = spade.Behaviour.MessageTemplate(povratna_informacija)
        pregovaranje = self.Pregovaranje()

        self.addBehaviour(pregovaranje, predlozak)
        pregovaranje.prikaziIzbornik()
コード例 #13
0
ファイル: whisperer.py プロジェクト: lpredova/pyGuessingGame
    def _setup(self):
        print "\n Agent\t" + self.getAID().getName() + " is up"

        feedback_template = ACLTemplate()
        feedback_template.setOntology('game')

        message_template = MessageTemplate(feedback_template)

        self.addBelieve(expr('Vrijednost(gamer2)'))

        s1 = self.Evaluate(P=expr("Vrijednost( 0 )"), Q=expr("Vrijednost( 1 )"))
        # self.addPlan(self.bdiBehav, None, P=expr('Sadrzim( 1, 0 )'), Q=expr('Sadrzim( 2, 0 )'))

        g = Goal(expr('Pobjeda(gamer2)'))
        self.addGoal(g)

        settings = self.Whisper()
        self.addBehaviour(settings, message_template)
コード例 #14
0
 def _setup(self):
     self.strategija = odabrabaStrategija
     self.addBehaviour(self.Postaja())
     self.protivnik = None
     self.potezi = {}
     self.mapa_strategija = {
         2: Strategija.DrugiOdabir(),
         1: Strategija.PrviOdabir(),
         3: Strategija.TreciOdabir(),
         4: Strategija.CetvrtiOdabir(self),
         5: Strategija.PetiOdabir(self),
         6: Strategija.SestiOdabir(self)
     }
     self.rezultati = []
     p = ACLTemplate()
     p.setOntology('Protivnik')
     m = MessageTemplate(p)
     self.addBehaviour(self.Igranje(), m)
     p1 = ACLTemplate()
     p1.setOntology('Rezultat')
     m1 = MessageTemplate(p1)
     self.addBehaviour(self.Rezultat(), m1)
コード例 #15
0
ファイル: passenger.py プロジェクト: aterrasa/taxi_simulator
 def add_strategy(self, strategyClass):
     tpl = ACLTemplate()
     tpl.setProtocol(REQUEST_PROTOCOL)
     template = MessageTemplate(tpl)
     self.addBehaviour(strategyClass(), template)
コード例 #16
0
 def postaviTemplate(self, ontologija):
     p = ACLTemplate()
     p.setOntology(ontologija)
     m = MessageTemplate(p)
     return m