ATTENTIONThis FlexSim Community Forum is read-only. Please post any new questions, ideas, or discussions to our new community (we call it Answers) at https://answers.flexsim.com/. Our new Question & Answer site brings a modern, mobile-friendly interface and more focus on getting answers quickly. There are a few differences between how our new Q&A community works vs. a classic, threaded-conversation-style forum like the one below, so be sure to read our Answers Best Practices. |
flexsim.com |
#1
|
|||
|
|||
Checking nodeedge status
L.S.
I am wondering if it is possible to check whether a certain edge of an node is open or closed. Example; a transporter enters a node, when the path is blocked it goes in Utilize state until it is freed by the same command which determines its next destination, when it is open on arrival it checks its destination and starts directly with its subtasks. I know I can do it with the use of an extra label, but this might be tricky when a mistake occurs in the sequence of opening and closing. I have searched in the tree and tried to find something useful in the connections subtree but didn't find the solution. Maurits |
#2
|
||||
|
||||
Maurits,
Do you know about the defined variables ( int toedge = parval(2); //the number of the edge that the traveler is going to next int fromedge = parval(3); // the number of the edge the traveler came from ) at the top of the OnArrival/OnContinue triggers of a network node? |
#3
|
|||
|
|||
Yes I know about them and I use them. I use these to block a TE sometimes without the need of communication with the TE. But, in my current model I want to make a TS dependent of the status of the nodeedges, like I said it will work with labels but still I am curious if it is possible to check the status of the edge just like you can check the status of ports etc. I expect it to be somewhere in the nodes but I couldn't find out where.
|
#4
|
||||
|
||||
Query open/close status of a NetworkNode's edge
treenode curnode = current;
int edgenum = 2; treenode edgenode = rank(connectionsout(curnode), edgenum); treenode useropen = rank(edgenode, 1); if(getnodenum(useropen) == 1) msg("Note", "Edge number 2 is open"); else msg("Note", "Edge number 2 is closed"); |
The Following User Says Thank You to Cliff King For This Useful Post: | ||
Brandon Peterson (10-08-2009) |