question

martin.j avatar image
0 Likes"
martin.j asked chukiat commented

Get Zone subset calculation

From an older post I got the code below that show how to get calculation from a partion.

double value = getstat(zone, "PartitionCalculationTotal", STAT_CURRENT, instance, partitionID, "Result");

I am wondering if there is a similar command to get a subset calculation?

I can get the subset content by using the "SubsetContent" Keyword, but if I try to get the subset calculation total with "SubsetCalculationTotal" - I simply get a huge value.

I tried to use the function below as described in the documentation, but is appears to just break my zone object.

function_s(object, "enumerateStatistics", targetNode)
FlexSim 20.1.3
flexsim 20.1.3statisticszonezone subsetgetstat
5 |100000

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

Regan Blackett avatar image
2 Likes"
Regan Blackett answered martin.j commented

@martin.jensen

The parameters would be:

getstat(zone, "CalculationTotal", STAT_CURRENT, instance, subsetName, calculationName)


· 1
5 |100000

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

martin.j avatar image martin.j commented ·

Thanks, this is great, though I do wish it was documented somewhere.

2 Likes 2 ·
chukiat avatar image
0 Likes"
chukiat answered chukiat commented

Can I ask my question in here after I try to use this code

I try to get calculation result from zone by partition to refer in assign label

but I type code and get error

Please suggest me what is my mistake

1696563977308.png

1696563998036.png

Test.fsm


1696563977308.png (85.5 KiB)
1696563998036.png (27.8 KiB)
test.fsm (35.8 KiB)
· 2
5 |100000

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

Felix Möhlmann avatar image Felix Möhlmann commented ·

I don't know where you got zone("Storage") from, but it's not a valid command. To get a reference to a Process Flow activity, you would generally use getactivity(processFlow, activityName).

"instance" is also a placeholder and has to be filled in. In a general Process Flow you can just type processFlow, in an object flow you would use current. In both cases token.instance can be used as well.

capture1.png

0 Likes 0 ·
capture1.png (6.4 KiB)
chukiat avatar image chukiat Felix Möhlmann commented ·
Hi Felix

Maybe I mistake at my first code

But after copy your code to my model, it work

Thank you very much

0 Likes 0 ·