Reputation: 21
I'm using Anylogic. I have an agent Customer and five Technicians (they are resources). In agent statechart, I have to insert a list of 12 failures that can randomly occurr to customer. Each of these failures require a different combination skills (in my model exist four skills) . Each of five technicians has different combinations of skills.
Combination cases are in the figure
I model failures with an agent variable "Issue", and an option list (with class "Issue") with 12 number. It could be correct? In Main, in seize block, how can specify which technical resource to use for each agent?? I know that I have to use customize resource choice, but I need help to insert code. An another question is whether to insert population of 5 technicians in the agent-based part, or to create 5 different agents who call themselves "Technician 1", "Technician 2" and so on... Sorry for the numerous questions Thank you so much!
Upvotes: 0
Views: 431
Reputation: 816
Your question has two parts:
p_issue
) and setting its default value to randomFrom(Issue.class)
. This way, every time a Customer class is create its p_issue
parameter will be set to a random selection from range of Issue values. agent.p_issue == Issue.a || agent.p_issue == Issue.b
The above case would work for matching an Customer agent with p_issue
equal to a
or b
to a particular Seize that points to a single resource pool.
Update: you parameter should look like the image.
Note: this will pick issues at random, so there is no guarantee that each value is unique, i.e. if you have 10 issue values and generate a 100 customers then approx 10% of them will have p_issue=Issue.a
, 10%, p_issue=Issue.b
, etc.
Upvotes: 0