# Testname: Calc Solver
Document Owner: Frank Stecher | Last document change: 05.02.2008 | Status of document: Standard
Valid for version: OpenOffice.org_3.0

### Test purpose:

Test the new Solver feature for Calc

### Known issues:

### Preconditions of test:

This TCS describes the English Version. Other language sets may vary.

### Test documents:

-

### Testcases:

Buttons and functionality | Status: Standard | -
File - New - Spreadsheet Tools - Solver Change the Target cell to C3 by clicking on Cell C3 Change the Target cell by clicking on the range chooser icon to the right of the target cell input line, the dialog minimizes, click on D5 and again on the range chooser icon at the right edge of the input line. If the target cell does not switch from A1 to C3 in the first step or from C3 to D5 in the second one, file an Issue In the Optimize result to section of the Solver dialog click on the Radiobutton in front of Minimum, it should be shown as selected when. If not file an Issue. Use ALT+V to select Value of and click into the input line next to the Radio button. Type 1. If it does not show up, file an Issue. Click on the range chooser icon next to the input line for the Value the Solver dialog minimizes. Click on $A$4 and hit the return key. The dialog maximizes and shows A4 as Value of. If not, file an Issue. ALT+M, the Radiobutton in front of Maximum should be enabled, if not file an Issue. Click on the Input line next to the text 'By changing cells'. Type A10:C10. If it does not work, file an Issue. Click on the Range Chooser Icon, the dialog minimizes, select C3:D4 and click on the range chooser again. If the input line does not contain $C$3:$D$4, file an Issue. Click on the first line under the heading 'Cell reference' in the Limiting conditions section of the Solver dialog. Type F1. Click on the drop down list box under Operator and choose '='. Type 1 into the first input line under Value. If one of these steps doesn't work, file an Issue. Click on the second line under the heading 'Cell reference' in the Limiting conditions section of the Solver dialog. Click on the range chooser next to it and after the dialog minimized click on B1 and again on the range chooser Icon. The input line should show $B$1, if not, file an Issue. Click on the second Operator drop down list box and choose '>='. Click on the second input line, press F2 and select cell C1. The dialog maximizes and the line shows $C$1. If not, file an Issue. Press ALT+T, the Target Cell input line must be active, if not file an Issue. Press ALT+U, Minimum in the 'Optimize result to' section must be active, if not file an Issue. Press ALT+V, the Radio Button next to 'Value of' must be active, if not file an Issue. Press ALT+M, the Radio Button for Maximum must be active, if not, file an Issue. Press ALT+B, the Input Line for 'By changing cells' must be active, if not, file an Issue. Press ALT+C, the first line for Cell reference must be active, if not, file an Issue. Press ALT+O, the first Operator drop down list box must be active, if not, file an Issue. Press ALT+A, the first input line for Value must be active, if not, file an Issue. Press ALT+H, the Help page must be opened, if not, file an Issue. Press ALT+P, the Options dialog must be opened, if not, file an Issue. Click on Cancel, the Options dialog must be closed, if not, file an Issue. Click on Options. The drop down list box next to 'Solver Engine' must be active, if not, file an Issue. Click on the check boxes for Assume variables as integer, Assume variables as non-negative and Limit branch-and-bound depth. The states of these check boxes must be changed to tagged, tagged, un-tagged. If one of these conditions is not matched, file an Issue. Reset the check boxes to the initial values of un-tagged, untagged, tagged. Click on the line 'Epsilon level (0-3): 0' and press ALT+E. A new dialog opens. Press the cursor up key two times, the Spin field should show 2 now. Click on Ok, the dialog closes and the line reads 2 as Value for the Epsilon level, if not file an Issue. Click on the line 'Epsilon level (0-3): 2' and press ALT+E. A new dialog opens. Press the cursor up key five times, the Spin field should show 7 now. Click on Ok. The Epsilon level should show a value of 7, if not file an Issue. Click on Solve at the Solver dialog. You get a dialog saying No Solution. The Epsilon level is invalid. Click on Ok Press ALT+P to open the Options dialog. Double Click on the Epsilon Level line Click on the spin down button of the spin field to reset the value to 1. Click on the Ok Button. The dialog closes and the line shows up as 'Epsilon level (0-3): 1' If not, file an Issue. Double click the line showing 'Solving time limit (seconds):100'. A new dialog opens and the Spin field for Seconds is active. If not, file an Issue. Change the value to 50 by using the Spin field buttons and click on Ok. The dialog closes and the line should read 'Solving time limit (seconds):50'. If not, file an Issue. Click on the Help Button, the Help system must open, if not file an Issue. Close the Help system Press the ESC key, the Options dialog must close now. If not file an Issue. Next to the second Value input line is a delete line Icon located. Click on this one. The limiting cell reference, Operator and Value from this line are removed, if not, file an Issue. Click on the Close Button of the Solver dialog, it closes now. If not, file an Issue.
Example Calculation | Status: Standard | -
Download and open the test document Solver_Testdoc01.ods Tools - Solver Set target cell to $E$15 Set Optimize result to Minimum Set 'By changing cells' to $G$13:$G$14 Set the first cell reference under 'Limiting conditions' to $C$15, the first Operator to '<=' and the first Value to 4 Set the second cell reference under 'Limiting conditions' to $D$15, the second Operator to '>=' and the second Value to 10 Set the third cell reference under 'Limiting conditions' to $G$15, the third Operator to '=' and the third Value to 300. Click on Solve A new dialog opens informing you that a result was found. Click on the 'Restore Previous' Button. The Solver dialog is shown again, if not file an Issue. Press ALT+S . The Solved dialog opens again. Press the Enter key. The result is placed into the relevant cells and the Solver dialog is closed, if the dialog isn't closed, file an Issue. C15 must show 4.0000 mg, D15 must show 18.0000 mg, E15 must show 22.0000 ct, G13 is set to 120, G14 shows 180 and therefore G15 300. If any of these values isn't found, file an Issue. Tools - Solver Let's change the limitation to sell a 500 ml bottle by altering the the third value under the limiting conditions from 300 to 500 Press ALT+S to solve the problem and keep the results. The results should be : C15 must show 4.0000 mg, D15 must show 51.3333 mg, E15 must show 68.6667 ct, G13 is set to 520, G14 shows -20 and therefore G15 500. If any of these values isn't found, file an Issue. So the solution found is correct but not usefull. Let's limit the lemonade to positive values by adding a new limitation. Tools - Solver Set the fourth cell reference under 'Limiting conditions' to $G$14, the fourth Operator to '>=' and the fourth Value to 0. Click on Solve. The No Solution dialog opens, telling you that the model is not solvable with the given limiting conditions. If you don't get this dialog, file an Issue. Click on Ok at this dialog, the Solver dialog should be shown. If not, file an Issue. Click on Close to shut down the Solver feature for now and close the document. Download and open the test document stest_large.ods Tools - Solver Target Cell: $Y$2 Optimize to: Maximum Changing cells: $B$5:$B$134 Limiting Conditions: Cell reference: $D$2:$W$2 Operator : <= Value: $D$3:$W$3 Copy the following String into the clipboard and paste it to the second cell reference input line: $D$2:$W$2 <= $D$3:$W$3 Click on Solve You get a new Warning dialog talking about Invalid condition. If not file an Issue. Click on the remove Button next to the second Value field to remove the faulty condition. Press ALT+P, the Options dialog opens, if not file an Issue tag 'Assume variables as integer' tag 'Assume variables not negative' Leave the other settings as is. Click on Ok Click on Solve A new dialog named Solving... opens telling you about the time limit It takes a long time to get a reaction from the Solver, exactly 100 seconds After that a new dialog pops up saying 'No Solution was found. The time limit was reached.' If you don't get that dialog, file an Issue. Click the Ok button to close the No Solution dialog. Click close to leave the Solver dialog. Close the document.

### References:

-

### Acronyms:

- Range Chooser: a small Icon with the tip help Shrink. Looks like a Windows frame with a green arrow pointing upwards.

- Delete line Button: An Icon showing a table with a red row used to eliminate conditions from list.

## testcase specification history

Calc Solver
Date | Change | User
--- | --- | ---
05.02.2008 (14:00:04) | status updated | Frank Stecher
05.02.2008 (13:59:58) | status updated | Frank Stecher
05.02.2008 (13:59:19) | testcase details updated | Frank Stecher
05.02.2008 (13:46:23) | header updated | Frank Stecher
05.02.2008 (13:45:00) | acronyms updated | Frank Stecher
05.02.2008 (12:31:57) | testcase details updated | Frank Stecher
05.02.2008 (12:24:08) | testcase details updated | Frank Stecher
05.02.2008 (12:19:49) | testcase details updated | Frank Stecher
05.02.2008 (12:07:33) | testcase details updated | Frank Stecher
05.02.2008 (11:32:40) | testcase details updated | Frank Stecher
04.02.2008 (15:50:58) | testcase details added | Frank Stecher
04.02.2008 (14:37:11) | testcase details updated | Frank Stecher
04.02.2008 (12:34:19) | testcase details updated | Frank Stecher
04.02.2008 (11:37:39) | testcase details added | Frank Stecher
01.02.2008 | Testcase specification created | Frank Stecher