boris additional - PowerPoint PPT Presentation

1 / 11
About This Presentation
Title:

boris additional

Description:

countdown timers. alarm timers. agent timers. Agent a = new Agent( name ) ... a countdown timer. Agent a = new Agent( name ); a.addAgentTimerListener( new ... – PowerPoint PPT presentation

Number of Views:19
Avg rating:3.0/5.0
Slides: 12
Provided by: s7069
Category:

less

Transcript and Presenter's Notes

Title: boris additional


1
boris - additional
  • timers, scope brokering

Simon Lynch s.c.lynch_at_tees.ac.uk
2
timers
  • why, what how?
  • agent timers
  • countdown timers
  • alarm timers

3
agent timers
  • Agent a new Agent( name )
  • a.addAgentTimerListener( new AgentTimerListener()
  • public void timerElapsed( Agent a )
  • ...code body...
  • )
  • a.setDelay( delay )
  • ...
  • a.start()
  • ...
  • a.stop()
  • ...

4
the ball example
  • Agent a new Agent( "anon" )
  • a.addAgentTimerListener( new AgentTimerListener()
  • public void timerElapsed( Agent a )
  • erase()
  • x (xdx) bounds
  • y (ydy) bounds
  • display()
  • )
  • a.setDelay( delay )
  • display()
  • a.start()

5
a countdown timer
  • Agent a new Agent( name )
  • a.addAgentTimerListener( new AgentTimerListener()
  • public void timerElapsed( Agent a )
  • if( coundown-elapsed )
  • a.stop()
  • switchOff()
  • else
  • ...code body...
  • )
  • a.setDelay( delay )
  • switchOn()
  • a.start()

6
alarm timer
  • given Calendar alarmTime...
  • Agent a new Agent( name )
  • a.addAgentTimerListener( new AgentTimerListener()
  • public void timerElapsed( Agent a )
  • a.stop()
  • alarmOn()
  • )
  • long alarmMS alarmTime.getTime().getTime()
  • long nowMS new Date().getTime()
  • a.setDelay( alarmMS nowMS )
  • if (delay gt 0 )
  • a.start()
  • else
  • alarmOn()

7
scope
  • why, what how?
  • MAS partitions
  • holons
  • reduced complexity
  • tailored partitions
  • (eg localised brokers)
  • enhanced security

8
scope in Boris
  • why, what how?
  • internal - behind portal
  • local - behind router
  • global - the default

9
scope
10
scope in Boris
  • why, what how?
  • portal.addAgent( agent )
  • portal.addAgent( agent, Portal.INTERNAL )
  • portal.addAgent( agent, Portal.LOCAL )

11
Brokers
  • yellow pages agents
  • some are localised (in holons, etc)
  • some keep record of providers
  • need for central service?
  • in boris / java
  • map agents to services
  • services to agents
  • etc
Write a Comment
User Comments (0)
About PowerShow.com