question

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

Set Property of MultiProcessors using Object Property Table

Hi

I would like to set property of MultiProcessors using Object Property Table. Since a MultiProcessor has multiple processes, is something like this not supported by the Object Property Table? Is there an easy way to edit the multiprocessor properties?

Thanks in advance.

1727664162221.png1727664248401.png

FlexSim 24.0.4
multiprocessorproperty table
1727664162221.png (38.6 KiB)
1727664248401.png (51.8 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

You are right, the property table does not seem to support the MultiProcessor (though I couldn't really think of a good way to represent the variable number of processes there, so it's somewhat understandable).

The processes are stored in a node table format in the object's variables. You can open this in a table view and edit the processes that way. Either from the tree, right click on the "optable" node and choose "Explore -> As Table" or run the command below in the script console.

applicationcommand("edittable", Model.find("MultiProcessor1>variables/optable"))

1727680186544.png

1727680218344.png

When the number of rows in this table is changed the multiprocessor state profile will be updated to match the row headers on the next model reset.

You can of course also cast the node as a table in code and make any changes using the usual syntax.

Table optable = Model.find("MultiProcessor1>variables/optable");
optable[1]["nrofops"] = 2;

1727680186544.png (5.3 KiB)
1727680218344.png (16.2 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.