# កម្មវិធី​ដោះស្រាយ

Opens the Solver dialog. A solver allows you to solve mathematical problems with multiple unknown variables and a set of constraints on the variables by goal-seeking methods.

​​ដើម្បី​ប្រើ​​បញ្ជា​នេះ...

Choose Tools - Solver.

## Solver settings

Solver settings are not saved to the file by LibreOffice Calc. Closing and reopening the file will reset the solver dialog to default settings.

### Target Cell

Enter or click the cell reference of the target cell. This field takes the address of the cell whose value is to be optimized.

### Optimize results to

• Maximum: Try to solve the equation for a maximum value of the target cell.

• Minimum: Try to solve the equation for a minimum value of the target cell.

• Value of: Try to solve the equation to approach a given value of the target cell.

Enter the value or a cell reference in the text field.

### By Changing Cells

Enter the cell range that can be changed. These are the variables of the equations.

### Limiting Conditions

Add the set of constraints for the mathematical problem. Each constraint is represented by a cell reference (a variable), an operator, and a value.

• Cell reference: Enter a cell reference of the variable.

Click the Shrink button to shrink or restore the dialog. You can click or select cells in the sheet. You can enter a cell reference manually in the input box.

• Operator: Select an operator from the list. Use Binary operator to restrict your variable to 0 or 1. Use the Integer operator to restrict your variable to take only integer values (no decimal part).

• Value: Enter a value or a cell reference. This field is ignored when the operator is Binary or Integer.

• Remove button: Click to remove the row from the list. Any rows from below this row move up.

You can set multiple conditions for a variable. For example, a variable in cell A1 that must be an integer less than 10. In that case, set two limiting conditions for A1.

### Options

Opens the Solver Options dialog.

The Solver Options dialog let you select the different solver algorithms for either linear and non-linear problems and set their solving parameters.

### Solve

Click to solve the problem with the current settings. The dialog settings are retained until you close the current document.

## ដើម្បី​ដោះស្រាយ​សមីការ​ជាមួយ​កម្មវិធី​ដោះស្រាយ

គោលបំណង​របស់​ដំណើរការ​កម្មវិធី​ដោះស្រាយ​គឺ​ត្រូវ​រក​តម្លៃ​អថេរ​របស់​សមីការ​ដែលមាន​លទ្ធផល​នៅ​ក្នុង​តម្លៃ​ដែលបាន​ធ្វើ​ឲ្យ​ប្រសើរ​បំផុត​នៅ​កនុង ក្រឡា​គោលដៅ ក៏​មាន​ឈ្មោះ​ថា "កម្មវត្ថុ" ។ អ្នក​អាច​ជ្រើស​ថាតើ​តម្លៃ​នៅ​ក្នុង​ក្រឡា​គោលដៅ​គួរ​ជា​តម្លៃ​អតិបរមា អប្បបរមា តម្លៃ​ដែល​បានផ្ដល់​ឲ្យ ។

តម្លៃ​អថេរ​ដំបូង​ត្រូវ​បានបញ្ចូល​ក្នុង​ក្រឡា​រាង​ចតុកោណកែង​ ដែល​អ្នក​បញ្ចូល​នៅ​ក្នុង​ប្រអប់ ដោយ​ផ្លាស់ប្ដូរ​ក្រឡា ។

អ្នក​អាច​កំណត់​ស៊េរី​នៃ​កា​រកំណត់​លក្ខខណ្ឌ​ដែល​កំណត់​តម្លៃ​ថេរ​សម្រាប់​ក្រឡា​មួយ​ចំនួន ។ ឧទាហរណ៍ អ្នក​អាច​កំណត់​តម្លៃ​ថេរ​ដែល​ជា​អថេរ​មួយ​ក្នុង​ចំណោម​អថេរ​ទាំងនោះ ឬ​ក្រឡា​មិន​ត្រូវ​ធំជាង​អថេរ​ផ្សេង​ទៀត ឬ​មិន​ធំជាង​តម្លៃ​ដែល​បាន​ផ្ដល់​ឲ្យ ។ អ្នក​ក៏​អាច​កំណត់​តម្លៃ​ថេរ​ដែល​មានអថេរ​មួយ ឬ​ច្រើន​ត្រូវ​តែ​ជា​ចំនួន​គត់ (តម្លៃ​ដោយ​គ្មាន​សញ្ញា​ក្បៀស) ឬ​តម្លៃ​គោលពីរ (ដែល​មាន​តែ 0 និង 1 ត្រូវ​បាន​អនុញ្ញាត) ។

## Using Non-Linear solvers

Regardless whether you use DEPS or SCO, you start by going to Tools - Solver and set the Cell to be optimized, the direction to go (minimization, maximization) and the cells to be modified to reach the goal. Then you go to the Options and specify the solver to be used and if necessary adjust the according parameters.

There is also a list of constraints you can use to restrict the possible range of solutions or to penalize certain conditions. However, in case of the evolutionary solvers DEPS and SCO, these constraints are also used to specify bounds on the variables of the problem. Due to the random nature of the algorithms, it is highly recommended to do so and give upper (and in case "Assume Non-Negative Variables" is turned off also lower) bounds for all variables. They don't have to be near the actual solution (which is probably unknown) but should give a rough indication of the expected size (0 ≤ var ≤ 1 or maybe -1000000 ≤ var ≤ 1000000).

Bounds are specified by selecting one or more variables (as range) on the left side and entering a numerical value (not a cell or a formula) on the right side. That way you can also choose one or more variables to be Integer or Binary only.