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 |
|
Downloads |
Training, Consulting, Employment Information regarding training, consulting and employment opportunities. |
#1
|
|||
|
|||
Help with Rail API
Dear users, hello.
I'm modeling a rail operation and I'm using the Rail API add-in, that was posted here once. The add-in is working fine and the model is simple for testing: I put an User Event to run a logic each 12 hours. The train arrives, than it has a discharging operation and the train leaves. By the first attempt, it works fine, I just send the train to an edge (edge 15 to edge 6), it stops and than I send the train from edge 6 to edge 14. You can check this in attached file "Rail_v1". The problem is: When I send the train to an edge that is smaller than the trainlength (I concluded this, I'm not sure if this is right), from edge 6 to edge 7, it looks like the train is compressed inside edge 7, as you can see in attached file "Rail_v2". I'd like it not to compress the train. After I solve this "compression" problem, I want to put a logic to simulate the discharge of each wagon. My idea is to put 70 nodes (because there are 70 wagons) and make a looping to travel and operate (e.g. sending a message On Arrival to a processor that represents the discharge operation). As I said, when I try to do this, the train is compressed always when it goes to an edge smaller than its length. So I ask you people to kindly help me with the "compression" problem and if you have any others tips for me, it will be greatfull. I hope I could explain clearly my problems. If you need any further information, please ask me. Best regards. Thanks. Mauricio |
#3
|
||||
|
||||
Hello Mauricio
Have you tried this modeling of rail operation in AGV module.Instead of nodes you can use control points on the network where an AGV is dispatched to other point on network.If you attach trailers to AGV and use them as wagons and treat one control point as base point that is connected to a fixed resources like queues, from there you can transport flowitems to dropoff points.A similar approach is presented here In the additional options if you click on Manage attachments a window will popup,there you can upload attachments from your computer. Last edited by sagar bolisetti; 07-16-2015 at 02:30 AM. |
#4
|
|||
|
|||
Attached files
There are the attached files about the problem I have said.
Dear Sagar, thank you for the tip you gave me. I'll try this way with AGV. Nevertheless I'd like to understand why that problem I mentioned happens with my model and if there's any way I can solve it. Thank you. Regards. Mauricio |
#5
|
|||
|
|||
It's running fine
I'm using AGV to model the train operation and it's working fine. Thank you.
I have a question about writing a code, maybe somebody can help me: I want to set the Acceleration and Deceleration values for my AGV Network. I want to set it automatically in an "OnRunStart trigger", becouse I read the value from an Excel table. But I'm having some problems. My code at OnRunStart Trigger is: " double aceleracao = gettablenum( xxx - table from excel); setvarnum( node("AGVNetwork",model() ),"agvTypes/DefaultAGV/speeds/Acceleration/Loaded",aceleracao); " But it doesn't update the variable. Can anyone helpe me saying where is my mistake and how to solve it? Best Regards. Mauricio |
#6
|
||||
|
||||
You can't put a path into the 2nd parameter of setvarnum(). setvarnum() only works with the top level of variables. If your variables are multidimensional, you need to reference them another way. Such as:
Code:
set( node("AGVNetwork>variables/agvTypes/DefaultAGV/speeds/Acceleration/Loaded",model() ),aceleracao); |
The Following 3 Users Say Thank You to Phil BoBo For This Useful Post: | ||
Sebastian Hemmann (02-27-2016) |
Tags |
rail api train |
Thread | Thread Starter | Forum | Replies | Last Post |
Rail API | Anthony Johnson | Q&A | 25 | 02-20-2014 09:01 AM |
rail api | Shahin Gelareh | Q&A | 2 | 05-27-2012 01:04 PM |
rail API | Shahin Gelareh | Q&A | 6 | 05-14-2012 10:00 PM |
Rail Model | BertrandRey | Q&A | 1 | 11-02-2010 03:25 AM |
How to use rail planner | zhang xin | Container Terminal (CT) Library | 0 | 09-09-2009 10:40 PM |