• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

Python

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Agent selector:
You are given following data for agents:
Agent
.is_available
.available_since(time since the agent is available)
.roles(a list of roles that the user has eg:Spanish speaker, sales,export etc.,)
   *When an issue comes in we need to present the issue to 1 or any agent based on agent selection mode can be all available least busy or random.In "all available mode" the issue is presented to all agents so they pick the issue if they want.In least busy the issue is presented to the agent that has been available for the longest.In random mode we randomly pick an agent.An issue has many roles(sales, export.,) the issue is presented to the only with matched roles.
Please write a function the takes input of list of agents with their data,agent selection mode and returns a list of agents the issue should be presented to...
 
Marshal
Posts: 69411
276
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch

We don't give out complete solutions, but please tell us how far we have got and we shall try and help you.
 
Sheriff
Posts: 7616
522
Mac OS X VI Editor BSD Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch again

Sounds like a homework. As CR said, spend some time providing an evidence you already putted an effort in it, as this exercise seems to be for the purpose so you'd learn something.
 
I was born with webbed fish toes. This tiny ad is my only friend:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic