1

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?

enter image description here

enter image description here

enter image description here

Skin
  • 9,085
  • 2
  • 13
  • 29
Hana Omar
  • 21
  • 2
  • Welcome to SOF. Your question is very broad, there are probably a dozen questions in it. Strongly suggest you check on the (many) example models that load dbase data and apply it. Also, try to focus your questions and avoid open-ended "what can I do" questions. See https://stackoverflow.com/help/how-to-ask and specific for AnyLogic questions see https://www.benjamin-schumann.com/blog/2021/4/1/how-to-win-at-anylogic-on-stackoverflow – Benjamin Feb 06 '22 at 07:50
  • Does this answer your question? [How do I synchronise a flight schedule with my AnyLogic simulation agents?](https://stackoverflow.com/questions/70961707/how-do-i-synchronise-a-flight-schedule-with-my-anylogic-simulation-agents) – Yashar Ahmadov Feb 06 '22 at 12:03

1 Answers1

0

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...

enter image description here

You can fix this by using the text to column feature in Excel - use the wizard for more infrormation.

enter image description here

You should also be able to open the internal AnyLogic Database table and see that the table column is set to text

enter image description here

Jaco-Ben Vosloo
  • 3,770
  • 2
  • 16
  • 33