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 Sales and Services > Training, Consulting, Employment
Downloads

Training, Consulting, Employment Information regarding training, consulting and employment opportunities.

  #1  
Old 07-10-2015
Mauricio Souza
Guest
 
Posts: n/a
Downloads: 0
Uploads: 0
Default 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
  #2  
Old 07-10-2015
Mauricio Souza
Guest
 
Posts: n/a
Downloads: 0
Uploads: 0
Default Rail API

I don't know if I uploaded tha attach. I'm new at FlexSim. Can anyone help me saying if the attach is uploaded? If it is not, how can I upload an exemple of my model?

Regards.

Thanks.
  #3  
Old 07-10-2015
sagar bolisetti's Avatar
sagar bolisetti sagar bolisetti is offline
Flexsim User
 
Join Date: Aug 2013
Location: Hyderabad,India
Posts: 160
Downloads: 145
Uploads: 0
Thanks: 124
Thanked 99 Times in 63 Posts
Rep Power: 150
sagar bolisetti is a jewel in the roughsagar bolisetti is a jewel in the roughsagar bolisetti is a jewel in the roughsagar bolisetti is a jewel in the rough
Default

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  
Old 07-13-2015
Mauricio Souza
Guest
 
Posts: n/a
Downloads: 0
Uploads: 0
Default 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
Attached Files
File Type: fsm Rail_v2.fsm (5.64 MB, 38 views)
File Type: fsm Rail_v1.fsm (5.64 MB, 33 views)
  #5  
Old 07-14-2015
Mauricio Souza
Guest
 
Posts: n/a
Downloads: 0
Uploads: 0
Default 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  
Old 07-14-2015
Phil BoBo's Avatar
Phil BoBo Phil BoBo is offline
Flexsim Development
 
Join Date: Jan 2008
Posts: 756
Downloads: 109
Uploads: 18
Thanks: 385
Thanked 1,483 Times in 525 Posts
Rep Power: 1174
Phil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond repute
Default

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)
  #7  
Old 07-15-2015
Mauricio Souza
Guest
 
Posts: n/a
Downloads: 0
Uploads: 0
Thumbs up it's working

It's working fine.

Thank you.

Regards.

Mauricio

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


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.