Has anyone here used the Excel Solver for linear programming?
If so how easy did they find it and does it then easily translate to a web program?
Any pitfalls?
There seems quite a lot on the web and one source seems a good starting point.
Any recommended aids?
I think solver can do the standard linear programming problem pretty easily.
Google ...
linear programming in excel
... gives many results
The thing that might seem tough is to solve a constraint involving linear combination of multiple independent variables. It is easy if you generate new independent variables that represents the linear combo, then apply the constraint to the new variable.
For example:
Maximize Y = A1 X1 + A2 X2
subject to
B1 X1 + B2 X2 < 5
Define new cell as with formula B1 X1 + B2 X2 and constrain that cell to be less than 5. The constraint is now captured.
Whoops, may not be that easy. I'm not sure it makes sense to apply a constraint to an equation that has a forumla (since solver will overwrite the formulas). At any rate, there are many google links on the subject, it is certainly doable.
I just tried it out, and the constraints can indeed be applied to independent variable = results of a formula .... not just to the independent variables (the ones that are varied by solver). So my first answer seems right, my correction was unnecessary. Sorry.
I just tried it out, and the constraints can indeed be applied to dependent variable = results of a formula .... not just to the independent variables (the ones that are varied by solver). So my first answer seems right, my correction was unnecessary. Sorry.
Thanks for the help everyone.
Like most of my spreadsheets, it may not be elegant, it just has to work.
This is a 3 or 4 stream blend where I am looking for the lowest cost dependent on which property is selected for the target.
I've done a two stream to sort out all the other bits and pieces, I now need to expand it and add in the linear programming to find the lowest cost solution.
I can't exclude the possibility that there may be multiple solutions but I guess I'll need to address that when the time comes and decide if it matters. If it does matter than presumably I'll need another constraint.
JMW,
Excel Solver is appropriate and easy to use for problems like yours.
I've used it extensively in the past for blending of refinery streams and searching of economic optimization.
Solver showed me some wrong results with the increased complexity of the models (ie hundreds of optimization parameters).
Linear programming and Excel spreadsheets are two of my preferred "applications".
Regards
JMW,
so you want to apply the "fundamentals" of linear programming inside the excel spreadsheet. It's an interesting challenge: my professors would be very proud of you
If I'd have to approach this problem, I'd think about something in VBA helping to solve the iterative equations... unfortunately 30 years of work (rust?) have been diluted a lot the knowledges acquired during the old good days of the university.
I'll be glad whether you'd like to share your basis, approach and progresses. For instance:
- which "streams" are you going to blend?
- which parameters (other than viscosity ) will you consider?
- which set of blending rules?
- ......
Kind regards