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 06-05-2009
Gabriel Burnett Gabriel Burnett is offline
Flexsim User
 
Join Date: Sep 2007
Posts: 2
Downloads: 0
Uploads: 0
Thanks: 2
Thanked 0 Times in 0 Posts
Rep Power: 0
Gabriel Burnett is on a distinguished road
Question Support for web services or java messaging for SCM modeling

I need to model a fairly straightforward supply chain inventory system. Periodically the system receives both orders for goods and shipments of goods (inputs to the simulation model). The system also sends out periodic status reports (ouput from the simulation model).

My question is whether Flexsim supports web services or java messaging. This is a large project and I would like to use Flexsim, but I will need to communicate with the simulation using java objects or xml, and I have never done this before. In the past I have passed data to Flexsim using Excel files, but that is not feasible for this project.
  #2  
Old 06-06-2009
Anthony Johnson's Avatar
Anthony Johnson Anthony Johnson is offline
Manager of Product Development
 
Join Date: Jul 2007
Posts: 440
Downloads: 86
Uploads: 4
Thanks: 171
Thanked 899 Times in 288 Posts
Rep Power: 735
Anthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond repute
Default

Right now there's not a canned solution for interfacing with Java, but depending on your willingness to develop it or pay for the development, the sky is the limit. You might want to check out the COM object available in the downloads section, which implements an in-process COM server that uses RPC to communicate with and control Flexsim. I don't know much about Java's inter-process communication API's, but I assume it would be similar.
The Following 2 Users Say Thank You to Anthony Johnson For This Useful Post:
HENYI JEN (06-26-2016)
  #3  
Old 06-09-2009
Gabriel Burnett Gabriel Burnett is offline
Flexsim User
 
Join Date: Sep 2007
Posts: 2
Downloads: 0
Uploads: 0
Thanks: 2
Thanked 0 Times in 0 Posts
Rep Power: 0
Gabriel Burnett is on a distinguished road
Question Input data and interaction during a model run

Thanks for the help Anthony, I really appreciate it. I'm wondering if you or anyone else might be able to answer a couple of related questions.

1. Input data
I'm under the impression that I need to get data into Flexsim using Excel or a data base. Is this correct? So if I have data in XML then my service client will need to convert it to Excel or a database for Flexsim to import.

2. Interacting with Flexsim during a model run
Also, is it possible to interact with a model run while it is running? E.g. receive orders for parts and replenishment of inventory. In this case data would be coming from an outside application during the run, and Flexsim would be sending data out during the run. In this scenario Flexsim would effectively be used as an emulator to test different inventory policies, so Flexsim would need to interact during runtime. I generally just read in data using the MTEI before running a model, and I haven't figured out a way to interact with Flexsim while it is running.
  #4  
Old 06-10-2009
Anthony Johnson's Avatar
Anthony Johnson Anthony Johnson is offline
Manager of Product Development
 
Join Date: Jul 2007
Posts: 440
Downloads: 86
Uploads: 4
Thanks: 171
Thanked 899 Times in 288 Posts
Rep Power: 735
Anthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond repute
Default

Gabriel,
1. Yes, the most effective/simple way to import data is through either Excel or an ODBC database. Flexsim does have some simple flexscript commands for reading files, but trying to parse an xml file using those commands would be very difficult. Another option you might want to consider is to build your own dll that integrates an xml parser library. There are quite a few freely available xml parsers for c/c++. A simple google search finds tinyxml, xerces xml, and many others. Your task would just be to integrate that into a DLL and then have the DLL read the xml, and then store the data in Flexsim tables, labels, etc., or maybe even provide user commands to just access the data directly stored in the DLL. You can refer to the wiki for building a DLL.
2. To interact with the simulation as it is running, you can use the excelread..., excelwrite..., etc. commands directly (MTEI is just a easy-to-use wrapper around these commands) to read and update data in Excel at any time during a simulation run. Or again you can use the db... commands to read/update a database, again at any time during the model run. The disadvantage of this is it doesn't support firing and listening for events between the applications, i.e. the only way for an app to know that Flexsim has actually finished, or reached a certain point, is by repeatedly checking if some value in the database/excel/xml file has changed, and the same is true for Flexsim's side. In order to enable firing/listening for events, a different method, like RPC or COM, is needed. The COM object I mentioned previously is available and can support this functionality.
The Following 2 Users Say Thank You to Anthony Johnson For This Useful Post:
HENYI JEN (06-26-2016)


Thread Thread Starter Forum Replies Last Post
Does Flexsim support Google SketchUp ? qin tian Q&A 10 02-05-2011 12:04 PM
how to support chinese object name? qin tian Q&A 8 01-11-2010 02:53 AM
Can Flexsim be used for modeling human services? Unregistered Pre-sales Questions 1 03-19-2008 06:56 PM
Is there any simple solution to support batch mean method in flexsim? qin tian Q&A 1 02-29-2008 01:19 PM
Experience in Healthcare or Services Industry ? Francois Perron Q&A 2 10-15-2007 06:05 AM


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.