简体   繁体   English

"如何将 Excel 表中的航班时刻表链接到我的 AnyLogic 模拟代理?"

[英]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 中的绿色小三角形来看到您的输入变量是文本...如果将鼠标悬停在它上面,您会看到右侧出现一个小感叹号单元格,然后如果您单击它,它会告诉您这是一个以文本形式存储的数字...

在此处输入图像描述<\/a>

You can fix this by using the text to column feature in Excel - use the wizard for more infrormation.您可以通过使用 Excel 中的文本到列功能来解决此问题 - 使用向导获取更多信息。

在此处输入图像描述<\/a>

You should also be able to open the internal AnyLogic Database table and see that the table column is set to text您还应该能够打开内部 AnyLogic 数据库表并看到表列设置为文本

在此处输入图像描述<\/a>

"

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 AnyLogic:在模拟启动时用代理填充托盘架 - AnyLogic: Fill a pallet rack on simulation startup with agents 如何使用VBA链接到Excel中的另一个工作表? - How do I link to another sheet in Excel with VBA? 如何在 Anylogic 中的每个模拟日更新 excel 文件中的参数值 - How to update parameter value from excel file on each simulation day in Anylogic 如何在工作表中标记单元格以供宏从中获取值? (Excel VBA) - How do I mark cells in my sheet for a macro to take values from? (Excel VBA) 如何使用 VBA 将 excel 表中的信息输入到特定网站的搜索栏? - How do I enter information from my excel sheet to a specific website's search bar using VBA? 如何合并Excel工作表中的数据和hadoop中Google驱动器中的文件? - How do I combine data from Excel sheet and files in my Google drive in hadoop? 如何自动化我的 webdriver 从 Excel 工作表中获取数据并使用启动它? - How do I automate my webdriver to take data from excel sheet and use launch it? 如何从 Excel 电子表格中的列填充组合框? - How do I populate a combo box from a column in my excel spread sheet? 如何创建一个从我的 excel 表中获取地址的变量? - 脚本实验室 - How do I create a variable that gets the address from my excel sheet? - SCRIPT LAB 如何将数据从一个Excel工作表复制到另一个Excel工作表? - How do I copy data from one excel sheet to another excel sheet?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM