question

Shinya O avatar image
0 Likes"
Shinya O asked Shinya O commented

Set very long process names for multiprocessors

Hi,

Is there a way to set very long process names for multiprocessors? Also, are there any alternatives to setting a long name?

Thanks in advance.

1708080742452.png

FlexSim 23.0.11
multiprocessor
1708080742452.png (56.0 KiB)
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

Felix Möhlmann avatar image
0 Likes"
Felix Möhlmann answered Shinya O commented

I believe they mean the name of the process steps, not the object.

Those are used as state names in the multiprocessor state profile. The state is stored in a string bundle field which by default has a limit of 32 bytes.

You can clear and rebuild the profile bundle and choose a higher limit or the "VARCHAR" type which has no limit at all.

I didn't notice any issues that doing this might cause in a quick test (memory usage will be higher, but that shouldn't be an issue if this isn't done for thousands of objects).

You can run the code below for newly added multiprocessors and then proceed to use them as normal.

Object multiprocessor = <insert reference here>;
treenode mpStateBundle = multiprocessor.find(">stats/state_profiles/1/1");
clearbundle(mpStateBundle);

// Set the byte limit larger than the default 32
addbundlefield(mpStateBundle, "state", BUNDLE_FIELD_TYPE_STR | BUNDLE_FIELD_INDEX_MAP, 64);        
// Or use BUNDLE_FIELD_TYPE_VARCHAR with no fourth parameter for no limit at all

addbundlefield(mpStateBundle, "time", BUNDLE_FIELD_TYPE_DOUBLE);
addbundlefield(mpStateBundle, "active", BUNDLE_FIELD_TYPE_INT | BUNDLE_FIELD_INDEX_MAP);

// Re-add default state entries
addbundleentry(mpStateBundle, "other", 0, 0);
addbundleentry(mpStateBundle, "Process1", 0, 0);
addbundleentry(mpStateBundle, "none", 0, 0);

capture1.png

I don't really know what "alternatives" there might be, other than coming up with a shorter name, though.


capture1.png (11.9 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.

Jason Lightfoot avatar image Jason Lightfoot ♦♦ commented ·

Of course - thanks Felix.

0 Likes 0 ·
Shinya O avatar image Shinya O commented ·
Thank you for your information.
0 Likes 0 ·