question

SuhyeonK avatar image
0 Likes"
SuhyeonK asked Joerg Vogel answered

What does custom code("rate" and "getRowByKet(token.id, 1)") mean?


Q1. What does "rate" mean? And And what does it mean when it's 1 & 0?

This is example about custom code.

Ex code----current.labels["pTime"].as(TrackedVariable).rate = 1;

Ex code----current.resetValue = current.labels["pTime"].as(TrackedVariable).rate;

Ex code---current.labels["pTime"].as(TrackedVariable).value = 0;

Ex code----current.labels["pTime"].as(TrackedVariable).rate = 0;


Q2. What does "1" mean at "getRowByKey(token.id, 1)"?

Ex code---Table timerTable = Table("TokenTimerTable");

Ex code---int row = timerTable.getRowByKey(token.id, 1);

if the number is "0" in "getRowByKey(token.id, 0)" , What does that mean?


FlexSim 24.0.2
ratecustom code getrowbykey
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

Joerg Vogel avatar image
0 Likes"
Joerg Vogel answered

TrackedVariable property rate

Table Method getRowByKey(variant key, returned value of column by name or number)

5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.