Reputation: 125
I have created a schedule in Anylogic within the population of agents "customer", where customers have to create orders and send it to "terminals". Every day, the amount of orders that has to be send to terminals is different for every customer. I want to create multiple orders at once (every day, that is the start column within the schedule), and the amount I want to create is the value column within the schedule. How to do this?
As you can see below, now just one order is created every day (with the amount as parameter), but I want to create this amount of orders at that one day/moment. Thank you for the help!
The schedule data looks like:
Upvotes: 0
Views: 242
Reputation: 9376
You could do something like this:
You will have to set the parameters of your agent in the source and on the exit block you do send(agent,main.terminals(0))
If you have missing data instead of 0 in your value, use this in your agents per arrival:
selectFrom(db_table)
.where(db_table.name.eq(name))
.where(db_table.start.eq(getDayOfWeek()-1))
.count()>0
?
selectFrom(db_table)
.where(db_table.name.eq(name))
.where(db_table.start.eq(getDayOfWeek()-1))
.uniqueResult(db_table.value, int.class)
:
0
Upvotes: 1
Reputation: 1636
I would add dates to my schedule data, such as 28-12-2021 15:28. Then type something big into the Repeat every
section. This is how I do it (my unit is always 1, but you can have any number instead):
Upvotes: 1