[英]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.我有一个包含以下列的航班时刻表的 excel 文件:航空公司、目的地、出发时间、航班号、值机柜台、登机口号码、出发时间、乘客人数。
I have created an agent containing this database in my model called flightTimetable.我在我的模型中创建了一个包含此数据库的代理,称为 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?
关于我能做什么的任何建议?
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 =<\/code> to an integer yet it is a String.
您的逻辑中的问题是签到台参数是字符串(文本)而不是数字......因此在您的逻辑检查中选择输出您测试签到台是否
=<\/code>到整数但它是一个字符串。
You can test this by chaning the logic check to
agent.checkInDesk.equals("1")<\/code> for each of the numbers.
您可以通过将每个数字的逻辑检查更改为
agent.checkInDesk.equals("1")<\/code>来测试这一点。
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...您可以通过观察 Excel 工作表中单元格 corenr 中的绿色小三角形来看到您的输入变量是文本...如果将鼠标悬停在它上面,您会看到右侧出现一个小感叹号单元格,然后如果您单击它,它会告诉您这是一个以文本形式存储的数字...
"
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.