在停止模拟之后,我偶尔会收到以下错误消息:
示例:
Exception during stopping the engine:
INTERNAL ERROR(S):
Engine still has 6 events scheduled: 2386.0: [null]
java.lang.RuntimeException: INTERNAL ERROR(S):
Engine still has 6 events scheduled: 2386.0: [null]
at com.anylogic.engine.Engine.g(Unknown Source)
at com.anylogi
AnyLogic 7:未指定Excel访问库(Apache )
我正在尝试使用AnyLogic ExcelFile类,但似乎AnyLogic无法找到所需的Apache库:
Error during model startup:
Excel access library (Apache POI) is not specified (or is specified incorrectly) in the classpath
Caused by: org/apache/poi/openxml4j/exceptions/InvalidFormatException
Caused by: org.apa
我需要一个计算容量的函数。我希望该函数为每个代理(AgentOfPopulation)计算一个介于70和90之间的随机数字。我的代码:
int agentOfPopulation;
for (int i = 0; i < main.agentOfPopulation.size(); i++){
agentOfPopulation = (int) (Math.random()*90+70);
}
代码不起作用。有没有人有办法解决这个问题?
我正在尝试将Anylogic中的参数值写入Database表的特定单元格中。该参数在我的main中声明,并通过函数中的特定计算获得它的值。现在,我想将计算出的值存储在Database表中。
我试着使用
INSERT INTO query (executeStatement("INSERT INTO eu (country, capital) VALUES ('Croatia', 'Zagreb')"); --> example from help)
…但是我不能使用查询中的特定参数作为值。我只能写直接输入(比如'Croatia
我试图在AnyLogic中模拟人口密度。为此,我插入了一个国家的主要图像,并使用折线绘制区域(称为pl_areaname,在这里的省份)。然后主要使用一个函数(SetHomeLocation),如果满足条件,我将在这些区域放置代理(在本例中为患者)。为了简洁起见,代码的一部分如下所示。
double x;
double y;
if(uniform(1) <= 0.0343995) /// province 1
do {
x = uniform( image.getX(), image.getX() + image.getWidth() );
y = uniform( i
我正在用AnyLogic构建一个DES队列模型。例如,我已经构建了几个模型,在这些模型中,我利用定义自己的代理类型来存储代理参数,这些参数改变了它们在队列网络中的流动方式。在过去,这不会导致错误。然而,在构建了一个新的、极其简单的M/M/1队列模型(源、服务和宿)并定义了一个新的代理类型"MyAgent“之后,即使我没有保存或访问任何代理属性,我也会收到错误: Exception during discrete event execution:
class com.anylogic.engine.Agent cannot be cast to class modeltest.MyA