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 05-01-2008
Goksin Yilmaz's Avatar
Goksin Yilmaz Goksin Yilmaz is offline
Flexsim User
 
Join Date: Aug 2007
Location: ON, Canada
Posts: 21
Downloads: 11
Uploads: 0
Thanks: 23
Thanked 13 Times in 6 Posts
Rep Power: 213
Goksin Yilmaz is a jewel in the roughGoksin Yilmaz is a jewel in the roughGoksin Yilmaz is a jewel in the rough
Default Flexsim and Linear Programming: How to combine?

Hello,

My team is doing some initial analysis for a project where we will need to use a linear programming (LP) tool during the simulation run. The process will -most probably- run as follows:
1. Simulation will run and the input to the LP tool will be collected on a table (the problem is small, so we're probably talking about a 20x20 sized table),
2. Simulation will be paused at a certain point and the optimization tool will be triggered,
3. LP will run and find the optimal result,
4. The results will be used by Flexsim as simulation input,
5. Simulation will continue running and the process will loop back to Step No 1.

Does anyone have experience with this kind of a scenario? Can you suggest us an LP code written in C++ (which can be triggered by Flexsim)?

Thanks in advance...
  #2  
Old 05-01-2008
Brandon Peterson's Avatar
Brandon Peterson Brandon Peterson is offline
The Flexsim Consultant
 
Join Date: Jul 2007
Location: Salt Lake City, Utah
Posts: 382
Downloads: 29
Uploads: 6
Thanks: 192
Thanked 516 Times in 235 Posts
Rep Power: 490
Brandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant future
Default

If the LP programming can be done in C++ then my suggestion would be to use a DLL to interface the LP programming with flexsim. This would allow you to continue using Flexscript in Flexsim but still use the C++ for the LP programming.

I've used a few external DLLs for different things like communicating with GPS units and DAQ boards (Boards that read and write voltages). I was supplied with DLLs for both devices that I communicated with using C++ in Flexsim. This was in prior versions of Flexsim.

If I were to do this over again I would write a DLL in C++ to communicate with the other DLLs and keep Flexsim using Flexscript.

Good Luck,
Brandon
__________________
thats not normal.
  #3  
Old 05-01-2008
Jason Lightfoot Jason Lightfoot is offline
Flexsim Consultant
 
Join Date: Aug 2007
Location: Somerset, UK
Posts: 719
Downloads: 20
Uploads: 0
Thanks: 123
Thanked 953 Times in 446 Posts
Rep Power: 773
Jason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond repute
Default

Can't this be done using the OptQuest module? They have LP capability and I believe there is a set of commands for it in the API. I've been meaning to try it with a simple transportation problem.
  #4  
Old 05-02-2008
Lars-Olof Leven Lars-Olof Leven is offline
Flexsim Distributor
 
Join Date: Aug 2007
Location: Sweden, Borlnge
Posts: 312
Downloads: 278
Uploads: 2
Thanks: 300
Thanked 256 Times in 139 Posts
Rep Power: 330
Lars-Olof Leven is a splendid one to beholdLars-Olof Leven is a splendid one to beholdLars-Olof Leven is a splendid one to beholdLars-Olof Leven is a splendid one to beholdLars-Olof Leven is a splendid one to beholdLars-Olof Leven is a splendid one to beholdLars-Olof Leven is a splendid one to behold
Default

If you go for to use DLL I can recommend you to look at the LP Solve project (http://lpsolve.sourceforge.net/5.5/).
It is an Open Source project for solving LP problems, the project is written in C and the source code is included.

Hopefully it is something you can use.

Lars-Olof
The Following 3 Users Say Thank You to Lars-Olof Leven For This Useful Post:
tobias.biemueller (05-05-2008)


Thread Thread Starter Forum Replies Last Post
Object Orientated Programming and Inheritance Nico Zahn Q&A 16 12-05-2007 02:13 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.