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 Software > Q&A
Downloads

Q&A Using Flexsim and building models

  #1  
Old 12-03-2014
daniele baga
Guest
 
Posts: n/a
Downloads: 1
Uploads: 0
Default Task executer running Free on Agv Network

Hello Friends,
i’m a new user and i have a couple of question to give you about Flexsim.

1) Are there any solutions to implement in order to make run Task Executers on a Network
(I choose AGV Network cause its versatility) without using any FixedResources, running them free on the network ? And in that case how I could randomly send to a random TE an
instruction that block it for a while ?

2) Can I use a Visual Tool to display on the model the current speed of a TE during his running on the network ?

Thank you
Daniele
  #2  
Old 12-04-2014
Jörg Vogel's Avatar
Jörg Vogel Jörg Vogel is offline
Flexsim User
 
Join Date: Sep 2007
Location: Hannover, Germany
Posts: 643
Downloads: 35
Uploads: 0
Thanks: 802
Thanked 665 Times in 410 Posts
Rep Power: 642
Jörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond repute
Default

Hello Daniela,

If you want to block or to let him stand still, you can dispatch a preempting tasksequence to a taskexecuter, which let him wait until he is freed or he waits an amount of time. It is depending on the task you give him.

For example you can place the creation and dispatching of the tasksequence in the OnMessage-Trigger of the Taskexecuter. If he receives a message he will instantly interrupt his current task and he stands still. Next you find the source code for this action.
Code:
treenode ts = createemptytasksequence(current,1,PREEMPT_ONLY);
inserttask(ts,TASKTYPE_UTILIZE,NULL,NULL,STATE_STOPPED,0,0,0);
dispatchtasksequence(ts);
In this case the taskexecuter waits until he gets a command, which tells him to procced with his previous preempted task.
The command freeoperators(obj taskexecuter, NULL) does this. The expression obj taskexecuter is a referrence or pointer to the taskexecuter.
Otherwise if you like a specific wait time, the inserttask line is:
Code:
inserttask(ts,TASKTYPE_DELAY,NULL,NULL, 12.4, STATE_STOPPED);
Wherein 12.4 is the wait time.

Jörg
The Following 2 Users Say Thank You to Jörg Vogel For This Useful Post:
sagar bolisetti (12-05-2014)
  #3  
Old 12-04-2014
daniele baga
Guest
 
Posts: n/a
Downloads: 1
Uploads: 0
Default

Ok thank you !!

That's a well-done solution. Can i use the Dispatcher Trigger "Custom Draw" to send a message at random time to one of the TE ? Cause, remember, i want to use only dispatcher and TE running on AGV network.

I still try to find a solution to display the current speed
  #4  
Old 12-04-2014
Jörg Vogel's Avatar
Jörg Vogel Jörg Vogel is offline
Flexsim User
 
Join Date: Sep 2007
Location: Hannover, Germany
Posts: 643
Downloads: 35
Uploads: 0
Thanks: 802
Thanked 665 Times in 410 Posts
Rep Power: 642
Jörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond repute
Default

Hi Daniele,

the custom draw code triggers fires to many times and is dependent on the run speed. It is a better way to send a delayed message on a reset trigger and then send delayed messages again from the on message trigger for any further events you need. You can use a statistical distribution for the delay time parameter of the message., e.g. command line from the OnMessage-trigger of an object, even a taskexecuter object.

Code:
senddelayedmessage(current,uniform(60,3600,2),current);
Jörg
The Following User Says Thank You to Jörg Vogel For This Useful Post:
Phil BoBo (12-04-2014)
  #5  
Old 12-04-2014
Jörg Vogel's Avatar
Jörg Vogel Jörg Vogel is offline
Flexsim User
 
Join Date: Sep 2007
Location: Hannover, Germany
Posts: 643
Downloads: 35
Uploads: 0
Thanks: 802
Thanked 665 Times in 410 Posts
Rep Power: 642
Jörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond repute
Default

If you query the variables kinematic node of your Taskexecuter, the current speed is a value of the kinematic structure, that you can receive to any time stamp with the command getkinematics(...). Please look at the User Manual: Miscellaneous Concepts > Kinematics > Commands > Other Kinematics Commands.

For example the following function returns a double value of the current total velocity. The name of the Taskexecuter is "TaskExecuter9". You can store the value in a label and show it in a dynamic text in the dashboard.
getkinematics(node("MODEL:/AGVNetwork>variables/agvs/TaskExecuter9/kinematics",model()),KINEMATIC_VELOCITY,0,time())
For a Visual Text Tool you convert the label value to a string:
Code:
string text = numtostring(getlabelnum(prev(current), "meanspeed"),3,1);
Jörg

Last edited by Jörg Vogel; 12-04-2014 at 09:09 AM. Reason: Found kinematic node
The Following 3 Users Say Thank You to Jörg Vogel For This Useful Post:
sagar bolisetti (12-05-2014)
  #6  
Old 12-04-2014
daniele baga
Guest
 
Posts: n/a
Downloads: 1
Uploads: 0
Default

Thank You Jorg,

at least i resolve one problem !
  #7  
Old 12-04-2014
daniele baga
Guest
 
Posts: n/a
Downloads: 1
Uploads: 0
Smile

Thank you so much Jorg !!

In fact i explore the tree so much trying to find a variable ! I just missed them :-D

Maybe next time i will use the search tool

kind regards

daniele

Tags
agv, control point, network system, speed, task executer


Thread Thread Starter Forum Replies Last Post
How to return a pointer to a task executer mearjun Flexsim Student Forum 18 05-06-2013 08:33 AM
A Task Executer should receive two tasksequence from dispatcher... syseo Q&A 10 07-14-2012 01:03 PM
task executer juan alberto Pre-sales Questions 1 06-01-2009 07:06 PM
Download free trial version Cliff King Marketing and Sales Information 6 05-15-2009 12:57 AM
Expertfit cannot find network key - Flexsim Network License Kris Geisberger Q&A 0 02-05-2008 05:10 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.