OpenOffice.org Solver
I just started to work with OpenOffice suite. Due to the fact that in the past I always used Excel, I wanted to make this new product equal to his enemy. So at first I tried to learn Basic for OpenOffice, and then I began to produce something more useful for my work, and this is the first result.
Is a tool similar to "solver" included in Excel, thus this is surely more simple and rough, but it's able to treat efficiently multiparametric problems of optmization. The search for solutions is performed by an engine based on simplex algorithm.
Surely it could be better, so I invite anybody is testing the macro to send me suggestions or to report me malfunctions.
Program comes with no warranty, here under you can find the installation instructions.
At the opening, OpenOffice finds a macro in the sheet, and warns the user.
To download: solver.zip
Installation instructions
There are two ways to use Solver within OpenOffice.org:
1) directly in sheet solver.sxc: it needs only to set sheet cells for the desired evaluation, and then to activate dialog box clicking on the button at the top right of the sheet (corresponding to cell G1), filling the fields as shown in the dialog.
2)from OpenOffice.org menu. To do this, first open sheet solver.sxc. Then you must go in the Menu Tools->Macro->Macro..., then click on Handle button and drag General, Simplex and Dialog1 in sheet solver.sxc under soffice->Standard. Now in the main menu you must select Tools->Configure, selecting in the bottom left window (Area) OpenOffice.org BASIC Macro->Standard->Simplex, and in the bottom right Solver. Then select the menu voice Tools->Scenarios and click on New button. Now Solver is present in the menu, so that it's available from any sheet.
Obviously it's better to follow the second way, because it makes Solver available also for sheets already made up.
Example of use:
-put formula =(a2-3)^2+(a3-2)^2 in cell a1
-set a first try value to cells a2,a3 (e.g. 1)
-click on Solver button, or select Solver in menu Tools
-fill text box named "Set cell" with "a1"
-fill text box named "Changing cells" with "a2,a3"
-leave the other parameters unchanged
-click on Execute button
-see the result on the sheet (cells a2 and a3 have their value modified by Solver)
Write me!
Main page
Bye...