手动绘制在AnyLogic Monte Carlo Bayesian实验中存储的集合数值。

huangapple go评论52阅读模式
英文:

Manually Plot values stored in Collection in Anylogic Monte Carlo Bayesian Experiment

问题

我的集合(称为incidence1)是一个集合类:TreeMap,键是double类型,值也是double类型。请参见下图

点击此处查看图像描述

最后,在Monte Carlo贝叶斯校准实验中,在Java操作>模拟运行后>我写下了以下代码:

incidences1.put(getCurrentIteration(), root.Incidence_Plot);

这样做时,在编译时会出现错误“无法解析incidence1”。请参见下图,

点击此处查看图像描述

英文:

Good Day Everyone,

In Monte Carlo Bayesian Experiment I am storing data inside a collection (called incidence1). Please see the image

enter image description here

My collection (called incidence1) is collection class: TreeMap, Key is double, and value is also double. See the image

enter image description here

Finally, in the Monte Carlo Bayesian Calibration Experiment in Java Actions>After Simulation Run> I am writing the following code

incidences1.put(getCurrentIteration(), root.Incidence_Plot);

and doing so I get the error when compiling "incidence1 cannot be resolved". See the image below,

enter image description here

答案1

得分: 0

你需要使用root关键词访问Main

root.incidences1.put(getCurrentIteration(), root.Incidence_Plot);

在你的实验中没有incidences1,它位于Main上,所以你需要通过代码先到达那里。

英文:

You need to access Main using the root keyword:

root.incidences1.put(getCurrentIteration(), root.Incidence_Plot);

There is no incidences1 in your experiment, it "lives" on Main so you need to get there first via code.

huangapple
  • 本文由 发表于 2023年6月11日 21:21:45
  • 转载请务必保留本文链接:https://go.coder-hub.com/76450662.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定