QUERY In-simulation linear programming

This forum contains all archives from the SD Mailing list (go to http://www.systemdynamics.org/forum/ for more information). This is here as a read-only resource, please post any SD related questions to the SD Discussion forum.
Locked
""hazhir rahmandad"" <hazhir@
Junior Member
Posts: 3
Joined: Fri Mar 29, 2002 3:39 am

QUERY In-simulation linear programming

Post by ""hazhir rahmandad"" <hazhir@ »

Posted by ""hazhir rahmandad"" <hazhir@vt.edu>

Hi,

I am looking at a problem which requires combining simulation of an SD model and
solving a linear programming optimization problem iteratively. More
specifically,
I need to run the model for a few periods, use model variables to setup a linear
program, solve that optimization problem to get updated parameters for
continuation of the simulation for the next few periods, and so on, for multiple
iterations. Has anybody done sth similar and can provide advice on the
implementation process (e.g. software to use, example code, etc). Any insights
are much appreciated.

Thanks

Hazhir Rahmandad

Assistant Professor
Industrial and Systems Engineering Department
Virginia Tech, Northern Virginia Center- Rm 430
7054 Haycock Road
Falls Church, VA 22043
Posted by ""hazhir rahmandad"" <hazhir@vt.edu>
posting date Mon, 28 Jul 2008 14:23:54 -0400
_______________________________________________
""Magne Myrtveit"" <magne@myr
Junior Member
Posts: 10
Joined: Fri Mar 29, 2002 3:39 am

QUERY In-simulation linear programming

Post by ""Magne Myrtveit"" <magne@myr »

Posted by ""Magne Myrtveit"" <magne@myrtveit.com>

Dear Hazhir,

There are several approached you can use (listed according to ease-of-use):

1) If the software has both linear programming and dynamic simulation, you
can combine the methods in your model.

2) If your software allows for scripting functions, you can express your LP
problem as a user-defined function.

3) If your software allows for DLL-extensions or similar, that can be used
too.

The link below refers to one software, Dynaplan Smia, that has all the
features above. There are others around that provide some or all of the
above features.

Best regards,
Magne Myrtveit
Dynaplan As
Helland
N-5936 Manger
Norway

web: www.dynaplan.com
Posted by ""Magne Myrtveit"" <magne@myrtveit.com>
posting date Tue, 29 Jul 2008 13:50:09 +0200
_______________________________________________
Gonenc Yucel <g.yucel@tudelft
Junior Member
Posts: 3
Joined: Fri Mar 29, 2002 3:39 am

QUERY In-simulation linear programming

Post by Gonenc Yucel <g.yucel@tudelft »

Posted by Gonenc Yucel <g.yucel@tudelft.nl>

Hi Hazhir,
Let me see if I get it properly.

For example you want to model a supply chain, in which actors use some sort of
optimal lot size policy. And periodically, they stop and consider their optimal
lot sizes by solving a LP-problem based on market conditions. Then continue with
this new lot size.
Is this somehow similar to what you want to do?

If so, I can think of two options in terms of implementation.
One of them is coupling Vensim with Matlab or a Java program using its DLL. In
this option you set the decision variables as ""Gaming variables"" in Vensim.
External code controls the Vensim in terms of how long to run and when to pause
for new input for gaming variables. Then you may get some variable values from
the simulation. Solve the LP in the external code, and then pass the new
parameter values to Vensim. After that point on Vensim will continue running
with
these new values. I don't exactly know, but I assume there should be some
libraries for solving basic LP formulations in Java. Probably Bob will correct
me
if I say anything wrong here.

Details of how to do this are well explained in Vensim manual. Once I did
something similar just for experimental purposes (a java code that pauses the
Vensim run, getting some values from the simulation and changing some
parameters). If you think it might help, I may send it as well.

Second option would be transfering the model to MatLab platform. And then
manipulating the run as you wish. If the model is modest in size, this is a
clean
option. It comes with the advantage of having access to optimization, analysis
and visualization facilities of MatLab.

Hope it helps a bit.

regards,
gonenc
Posted by Gonenc Yucel <g.yucel@tudelft.nl>
posting date Tue, 29 Jul 2008 14:18:53 +0200
_______________________________________________
Khalid Saeed <saeed@wpi.edu&g
Junior Member
Posts: 10
Joined: Fri Mar 29, 2002 3:39 am

QUERY In-simulation linear programming

Post by Khalid Saeed <saeed@wpi.edu&g »

Posted by Khalid Saeed <saeed@WPI.EDU>

Hazhir,

Many years ago, one of my industrial engineering students attempted this by
building the objective function and the constraints into the decision rules. as
I
recall, the optimal solution occurred when this system came to an equilibrium. I
am not sure if I still have his report, but I'll look for it.

Khalid

Khalid Saeed, Ph.D.
Professor of Economics and System Dynamics
Worcester Polytechnic Institute
Posted by Khalid Saeed <saeed@WPI.EDU>
posting date Tue, 29 Jul 2008 10:26:16 -0400
_______________________________________________
Bill Harris <bill_harris@faci
Senior Member
Posts: 51
Joined: Fri Mar 29, 2002 3:39 am

QUERY In-simulation linear programming

Post by Bill Harris <bill_harris@faci »

Posted by Bill Harris <bill_harris@facilitatedsystems.com>

Hazhir,

Check out Goldsim (http://www.goldsim.com/). It may be able to do what
you want.

Bill
- --
Bill Harris
Facilitated Systems
Posted by Bill Harris <bill_harris@facilitatedsystems.com>
posting date Tue, 29 Jul 2008 06:59:44 -0700
_______________________________________________
Locked