Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在任何逻辑中,我有一些变量(超过 2 个),我想知道其中哪个具有最大值?我怎样才能做到这一点?我在哪里可以保存最大变量的名称?
获得多个值的最大值不是 AnyLogic 问题,而是一个一般的编码问题,stackoverflow 可能有数百个答案。
在 AnyLogic 中,您可以将所有变量添加到统计对象中。然后调用myStatisticsObject.max()以获得最大值。
myStatisticsObject.max()
要将其保存在新变量中,请调用newVariable = mtStatistics.max()
newVariable = mtStatistics.max()
干杯