Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Linear Programming in Access

Status
Not open for further replies.

dirkg

Technical User
May 20, 2000
170
BE
Hi all,

does anyone has an example of a solution of a Linear Programming problem in Access?

Thank you very much in advance,

Greetz

Dirk
 
do you mean regression analysis?

MichaelRed
m.red@att.net

There is never time to do it right but there is always time to do it over
 
Hi Michael and John,

thank you for helping me. However it is not regression analysis I mean.
I also know how to use the solver for linear programming in Excel, however I have a linear programming problem in my Access application which I would like to solve, without having to go to Excel. That's why I'm wondering if anyone has an example for that...


Greetz,

Dirk
 
In the case of Excel's "Linrar Programming", it is an instantantation of regression analysis. "Linear programming" is specifically a subset of the larger term regression analysis. A common technique in regression analysis is generate the function (the "least squares fit") of a set of points to a "type" of function, and then solve the function for the desired result. The "Linear" in the case of excel refers to the type of function being fitted - a straigh (or "Linear") line.

Of course, the least squares fit code is available in many resources, the process utilized in excel (particularly the consraints) are less readily available.

While I know of no VB add in for "Linear Programming", I have used many Excel functions from within VB. This technique is accomplished by adding the Excel Library as a reference, and 'decoding the arguments' required by Excel to some recognizable vb format. Usually, these take the form of either arrays (for ranges) or individual variables for individual cells. However some few functions do not appear to be ammenable to this approach.

I have worked toward converting an older version of the more general regression analysis for use as a VB program (or add-in) but have not completed testing of the program as a stand-alone aplication, and have not even considered the issues involved in the conversion to an ActiveX control. Considering the existance and 'popularity' of Excel's implementation, I do not believe there is a large market for the more general soloution, so the priority of my version is rather low. In fact, your's is only the second 'request' for an alternative I have seen this year.

There are other tools on the market which have extensive analysis tools and include some general regression analysis capabilities, however they are not free (or even 'cheap' for individual use). SPSS, and MathLab come to mind quite readily, while TkSolver is -I think- a bygone product of the late '80s or early '90s.

MichaelRed
m.red@att.net

There is never time to do it right but there is always time to do it over
 
Linear Programming is much broader than just regression anaysis. Numerical Recipes by Press, Flannery,Teukosky and Vettering has all the code. It is no small thing to program it in VB but can be done - the code is all there. It does depend if it is a one time problem or a many tiime problem. Does the data to be solved for constantly change?

rollie@bwsys.net
 
yes, the data, equations and number of constraints vary. However the number of constraints is not very large, at maximum 20.
 
Does the equation result in a symetric matrix? If so, the Jacobian solution is probably your best bet. What else do you know of the set?

rollie@bwsys.net
 
I have made the model already in Excel where I can solve it with solver. I can send it to you if that's ok for you.
 
sounds good. chag it's name to a '_' as the third character in the extension. I will change it back and have a look.

rollie@bwsys.net
 
Cannot be too difficult, but u have to prog it all in VBA, so look at the fields u set the neccesary data and look for the right formula's, not more

Succes,
when it's a problem give more info about the way u want ande the data (used fields etc.) so I can help u further

Gerard
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top