LibreOffice: XSolver Interface Reference

LibreOffice LibreOffice 24.2 SDK API Reference

Loading...
Searching...
No Matches
Public Types | Public Member Functions | Public Attributes | List of all members
XSolver Interface Reference

allows to call a solver for a model that is defined by spreadsheet cells. More...

`import <XSolver.idl;`

Inheritance diagram for XSolver:

## Public Types
typedef sequence< com::sun::star::table::CellAddress > | Variables
| The addresses of the cells that contain the variables.
typedef sequence< SolverConstraint > | Constraints
| The constraints of the model.
typedef sequence< double > | Solution
| contains the solution's value for each of the variables, if a solution was found.

## Public Member Functions
void | solve ()
| executes the calculation and tries to find a solution.
Public Member Functions inherited from XInterface
any | queryInterface ([in] type aType)
| queries for a new interface to an existing UNO object.
void | acquire ()
| increases the reference counter by one.
void | release ()
| decreases the reference counter by one.

## Public Attributes
XSpreadsheetDocument | Document
| The spreadsheet document that contains the cells.
com::sun::star::table::CellAddress | Objective
| The address of the cell that contains the objective value.
boolean | Maximize
| selects if the objective value is maximized or minimized.
boolean | Success
| contains `TRUE` if a solution was found.
double | ResultValue
| contains the objective value for the solution, if a solution was found.

## Detailed Description

allows to call a solver for a model that is defined by spreadsheet cells.

## Member Typedef Documentation

## ◆ Constraints

sequence< SolverConstraint > Constraints
| attribute

The constraints of the model.

## ◆ Solution

sequence< double > Solution
| attributereadonly

contains the solution's value for each of the variables, if a solution was found.

## ◆ Variables

sequence< com::sun::star::table::CellAddress > Variables
| attribute

The addresses of the cells that contain the variables.

## Member Function Documentation

## ◆ solve()

void solve | ( |  | ) |

executes the calculation and tries to find a solution.

## Member Data Documentation

## ◆ Document

XSpreadsheetDocument Document
| attribute

The spreadsheet document that contains the cells.

## ◆ Maximize

boolean Maximize
| attribute

selects if the objective value is maximized or minimized.

## ◆ Objective

com::sun::star::table::CellAddress Objective
| attribute

The address of the cell that contains the objective value.

## ◆ ResultValue

double ResultValue
| attributereadonly

contains the objective value for the solution, if a solution was found.

## ◆ Success

boolean Success
| attributereadonly

contains `TRUE` if a solution was found.

The documentation for this interface was generated from the following file:

- com/sun/star/sheet/XSolver.idl