'How do I link a flight schedule from an excel sheet to my AnyLogic simulation agents?
I have an excel file with the flight timetable with the following columns: Airline, destination, departure time, flight number, check-in desk, gate number, departures, number of passengers.
I have created an agent containing this database in my model called flightTimetable.
In the 1st picture, I have set the conditions for the select Output for the agents to go to their designated check-in desk according to the database but this is not working. Any suggestions on what I can do?
Solution 1:[1]
The issue in your logis that the check-in desk parameter is a String (text) and not a number... so in your logic check in the select output you test if the check-in desk is = to an integer yet it is a String. You can test this by chaning the logic check to agent.checkInDesk.equals("1") for each of the numbers.
The alternative options is to conver the input data to number
You can see that your input variables is text by observing the little green triangule in the corenr of the cell in your Excel sheet... If you hover over it you will see that there is a littel exclamation mark that appears on the right hand side of the cell and then if you click on it it will tel you that it is a number stored as text...
You can fix this by using the text to column feature in Excel - use the wizard for more infrormation.
You should also be able to open the internal AnyLogic Database table and see that the table column is set to text
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Jaco-Ben Vosloo |






