ATTENTION

This 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

Go Back   FlexSim Community Forum > Flexsim CT > Container Terminal (CT) Library
Downloads

  #1  
Old 10-28-2012
stmyint stmyint is offline
Flexsim User
 
Join Date: Oct 2012
Posts: 14
Downloads: 6
Uploads: 0
Thanks: 6
Thanked 1 Time in 1 Post
Rep Power: 92
stmyint is on a distinguished road
Default How to write coding for that?

Hi Please check the attached file.
How can i write coding for changing type value of To NN133 and NN134 (type).
example if To NN133> type = 2, i want to assign NN134> type = 1.
if To NN133>type = 2, i want to assign NN134> type =2.

Please guide me how to do that.
Thanks.
Attached Thumbnails
Click image for larger version
Name:	Untitled.jpg
Views:	230
Size:	136.5 KB
ID:	1957  
  #2  
Old 10-29-2012
Steven Hamoen's Avatar
Steven Hamoen Steven Hamoen is offline
Talumis, Flexsim Distributor, The Netherlands
 
Join Date: Aug 2007
Location: Soest, NL
Posts: 854
Downloads: 43
Uploads: 0
Thanks: 391
Thanked 661 Times in 379 Posts
Rep Power: 684
Steven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond repute
Default

Can you tell us why you want to change that and what you think that it does?
I'm just asking because until now I have never touched it
  #3  
Old 10-29-2012
stmyint stmyint is offline
Flexsim User
 
Join Date: Oct 2012
Posts: 14
Downloads: 6
Uploads: 0
Thanks: 6
Thanked 1 Time in 1 Post
Rep Power: 92
stmyint is on a distinguished road
Default

Quote:
Originally Posted by Steven Hamoen View Post
Can you tell us why you want to change that and what you think that it does?
I'm just asking because until now I have never touched it
I want to make alternate route (two lane) to dispatch containers to same yard block with truck. NN41 to NN133 is one lane and another is NN42 to NN134 to dispatch. both will dispatch at same block.
Thanks.
  #4  
Old 10-29-2012
Sebastian Hemmann's Avatar
Sebastian Hemmann Sebastian Hemmann is offline
Flexsim User
 
Join Date: Sep 2009
Location: Braunschweig (Germany)
Posts: 439
Downloads: 52
Uploads: 0
Thanks: 472
Thanked 217 Times in 154 Posts
Rep Power: 319
Sebastian Hemmann is a splendid one to beholdSebastian Hemmann is a splendid one to beholdSebastian Hemmann is a splendid one to beholdSebastian Hemmann is a splendid one to beholdSebastian Hemmann is a splendid one to beholdSebastian Hemmann is a splendid one to beholdSebastian Hemmann is a splendid one to behold
Default

Think you are looking for something like:

setnodenum(node(">NN41/connections/connectionsout/To NN133/type",model()),1);

Maybe this is the right direction!?
__________________
Hemmi
  #5  
Old 10-29-2012
Steven Hamoen's Avatar
Steven Hamoen Steven Hamoen is offline
Talumis, Flexsim Distributor, The Netherlands
 
Join Date: Aug 2007
Location: Soest, NL
Posts: 854
Downloads: 43
Uploads: 0
Thanks: 391
Thanked 661 Times in 379 Posts
Rep Power: 684
Steven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond repute
Default

As far as I can tell the type is used to determine if the edge is passing or non passing. Usually it is not a good idea to mess with the tree that flexsim generates. For instance are you sure that if you change it, it will work without resetting your model?

If you want to change the way objects behave, use the triggers that are supplied in combination with the commands. In this case take a good look at the closenodeedge and opennodeedge commands. Maybe in combination with optimizenetwork.
Or create or change your tasksequences so that they first travel to the correct endnode and then to the end destination.
Or use the callsubtasks tasksequences.

I'm not sure how much access you have to your tasksequence in CT, so you have to try a bit probably.
The Following 2 Users Say Thank You to Steven Hamoen For This Useful Post:
Sebastian Hemmann (10-29-2012)
  #6  
Old 10-29-2012
stmyint stmyint is offline
Flexsim User
 
Join Date: Oct 2012
Posts: 14
Downloads: 6
Uploads: 0
Thanks: 6
Thanked 1 Time in 1 Post
Rep Power: 92
stmyint is on a distinguished road
Default

Quote:
Originally Posted by Steven Hamoen View Post
As far as I can tell the type is used to determine if the edge is passing or non passing. Usually it is not a good idea to mess with the tree that flexsim generates. For instance are you sure that if you change it, it will work without resetting your model?

If you want to change the way objects behave, use the triggers that are supplied in combination with the commands. In this case take a good look at the closenodeedge and opennodeedge commands. Maybe in combination with optimizenetwork.
Or create or change your tasksequences so that they first travel to the correct endnode and then to the end destination.
Or use the callsubtasks tasksequences.

I'm not sure how much access you have to your tasksequence in CT, so you have to try a bit probably.
Thanks Steven for your guide and reply. As you said, it's not a good idea and i'm already test it. It not working correctly.
The Following User Says Thank You to stmyint For This Useful Post:
Steven Hamoen (10-30-2012)


Thread Thread Starter Forum Replies Last Post
Coding problem Liang Wen Yin Q&A 4 08-13-2012 04:49 PM
Questions on coding Jack Lai Q&A 6 02-07-2012 12:04 AM
Can I write to the system console? Steven Hamoen Q&A 2 11-26-2008 06:37 AM
Need help for coding on lifts. chrisquek Q&A 5 11-25-2008 03:00 AM
A pitfall in Flexsim coding AlanZhang Gripes and Goodies 7 05-16-2008 03:37 PM


All times are GMT -6.
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.
Copyright 1993-2018 FlexSim Software Products, Inc.