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
|
||||
|
||||
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
|
||||
|
||||
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
|
|||
|
|||
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
|
|||
|
|||
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 |