PragatiSrivastava
PragatiSrivastava

Reputation: 65

How to Retrieve Agent id in Anylogic 7.3.1

I am implementing bank office sample of Anylogic 7.3.1 . I have created 20 agents in my source block. I want to assign agent id when any agent enters to the source. I have write this block of code for this.

agent.enteredSystem = time();
if(agent.enteredSystem > 0)
{
if(count <100)
{
String customerId = "CId-";
customerId = customerId + count;
count++;
}   
}

there is one customer class where I have declared enteredSystem variable as double. count is static variable declared in graphical editor of main class.

I want to move this customerId to queue block and then delay but when I am writing it in text file . there is repetition of customerId . help me. thanks in advance..

Upvotes: 0

Views: 1107

Answers (1)

Benjamin
Benjamin

Reputation: 12803

I suppose you need to define your customerID variables as part of the Customer class, not embedded in your if-statements.

Upvotes: 1

Related Questions