question

alan.zhang avatar image
2 Likes"
alan.zhang asked Adrian Haws commented

FlexSim XML

Hi,

I am trying to use FlexSim XML model to facilitate coordination between modelers when we are working on the same model. I have followed the XML help to split a model into the multiple XML files. Many times I found the only difference is the “f” attributes of some nodes. I am trying to understand what they means, or those changes matter or not. Below are two examples I have.

Old: <node f="90072" dt="4"><name>BerthPlanner</name><data>

New: <node f="90173" dt="4"><name>BerthPlanner</name><data>

Old: <node f="42"><name>labels</name>

New: <node f="43"><name>labels</name>

I took a look of the FlexSimXML.xsd in the FlexSim 2017 help directory. I can understand most of the file. But for the comments explaining “f” attributes, I am not sure if they are still valid. For example, the xsd file talks about the two hex values separated by a hyphen, but it is clear there is no hyphen in the above examples. And it appears the notes about flags are not complete.

  • ·Could you please clarify?
  • ·Is there any updated FlexSimXML.xsd?
  • ·Can you give me some hints to understand the above two examples?

Thanks,

Alan

Choose One
flexsim xml
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

·
Phil BoBo avatar image
3 Likes"
Phil BoBo answered Adrian Haws commented

The nodes flags used to be two values; an 8-bit field and a 32-bit field.

Now, flags are stored on a single 64-bit value.

If it is 1 higher (such as 42 to 43), it is because the node is expanded in the tree. You pressed the + button in the tree to see the node's subnodes or you used the switch_expanded() function to change the flag's value.

Most of the flags have corresponding switch_*() commands for getting and setting that bit flag. Some of those flags aren't particularly important, such as whether the node is expanded or not, or showing object data in the tree or not. Others are slightly more important, such as whether the object is protected, hiding its shape, hiding its content, toggled as FlexScript/C++/DLL, etc.

Other flags are used internally by the save mechanism, such as storing whether the node is saved in a distributed file, or whether the node has one-way couplings pointing at it, or whether you want to preserve couplings when saved.

We don't have an updated FlexSimXML.xsd right now, but I'll add a note to the dev list to update it.

It is storing the same data as it was before, but the documented values associated with each flag in that document aren't correct anymore because those flags are stored on higher bits now rather than on a separate variable.

· 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.

alan.zhang avatar image alan.zhang commented ·

Phil,

Thanks for your reply. Hope we will see the document updated soon.

I have been struggling to utilize the FlexSim XML to facilitate model development with multiple users for a while. We have done quite a few experiments but encountered several challenges. One is that the flag keeps changing from saves to saves, and we are not clear about their meanings. Another is the nodes sometimes are not saved in the same order. For example I have seen two consequent nodes in XML file simply switched their positions but they are exactly the same in two saves. FlexSim manual also pointed out the connections between objects can cause issues.

The FlexSim XML works great in module development. But I hope community users and FlexSim may share experience using FlexSim XML in the daily model development work. This seems a topic not being discussed a lot. Any input is appreciated.

Thanks,

Alan

1 Like 1 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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