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
|
||||
|
||||
Building a better forklift object, help needed
Ladies and gentlemen,
this question is for those with experience creating new flexsim objects. In the new and improved transporter object I am trying to pick a method to integrate the behavior model and energy consumption model. To clarify, the behavior model decides how fast forklift does what it does (e.g. how fast forklift lifts empty forks vs. how fast it lifts half-a ton vs. how fast it lifts a ton, how much time is lost on a mast stage transition at certain heights etc. The models are an API supplied by the truck manufacturer that takes as an input, among other things, initial forks height, goal forkheight, distance and direction of travel, and max speed and returns me energy use, forks height as a function of time, and speed and acceleration profiles. The energy model calculates how much battery charge is used or regenerated for each task. My goal is to incorporate both into the new forklift flexsim object, so it can be used for task execution like a regular Transporter object but can calculate energy use (and trigger battery swapping) in the background. I considered overriding begintask() but the problem there is that TASKTYPE_LOAD and UNLOAD seem to spawn spawn tasktype travel tasks, so the energy will be accounted for twice. I also considered overriding initializeoffset() but it does not account for offset travel. Another aspect is that the behavior model must actively control the performance characteristics of the object (e.g. lift speed is a function of item weight), so it should go before the travel and lift times are calculated. What would be the recommended place/strategy to implement the aforementioned functionality? Also, could you tell me which coordinate system is used in TASKTYPE_TRAVEL? I tried looking at coordinates kept in offsetloc[] to determine the goal coordinates (for sanity checking) but they seem to be using something other than the model coordinate system. Also, what do I need to do to compile this piece of code: Code:
o(Navigator, derefcoupling(first(node_v_navigator))).navigateto(holder, taskdata->involved1, taskdata->var1 == 0 ? v_maxspeed : max(0,taskdata->var1)); error LNK2019: unresolved external symbol "class linkedlist * __cdecl derefcoupling(class linkedlist *)" (?derefcoupling@@YAPAVlinkedlist@@PAV1@@Z) referenced in function "public: virtual double __thiscall Tsp::begintask(class linkedlist *)" (?begintask@Tsp@@UAENPAVlinkedlist@@@Z) Thank you! Vadim Last edited by Vadim Fooks; 04-29-2013 at 09:29 PM. |
Thread | Thread Starter | Forum | Replies | Last Post |
forklift object without the operator | Vadim Fooks | Q&A | 5 | 08-01-2012 03:39 PM |
Make Operator Use a Forklift | JMEngelhart | Q&A | 5 | 02-15-2011 07:25 AM |
THIS IS A CHALLENGE! tasksequence question regarding one forklift and 20 queues | DilAmaya | Q&A | 1 | 09-13-2009 09:44 PM |
Set maxcontent of Forklift | Anthony Timmiss | Q&A | 3 | 02-04-2009 02:54 AM |
Forklift with custom fork 3D object. | Anthony Johnson | Tips and Tricks | 0 | 07-09-2008 12:22 PM |