LibreOffice LibreOffice 25.2 SDK API Reference

Public Types | Public Member Functions | Public Attributes | List of all members
XSolverSettings Interface Reference

Provides access to the solver settings stored in a specific Calc sheet. More...

`import"XSolverSettings.idl";`

Inheritance diagram for XSolverSettings:

## Public Types
typedef sequence< string > | AvailableEngines
| Returns a sequence of strings containing all available solver implementation names. More...
typedef sequence< any > | VariableCells
| Variable cells in the model, represented as a sequence of cell ranges. More...
typedef sequence< ModelConstraint > | Constraints
| Constraints of the solver model. More...
typedef sequence< com::sun::star::beans::PropertyValue > | EngineOptions
| Solver engine options expressed as a sequence of property values. More...

## Public Member Functions
void | reset ()
| Resets the solver model to its defaults settings. More...
void | solve ()
| Run the solver model Check the values of the Status and ErrorMessage attributes to know what happened after calling this method. More...
void | saveToFile ()
| Save the solver model to the file. More...
Public Member Functions inherited from XInterface
any | queryInterface ([in] type aType)
| queries for a new interface to an existing UNO object. More...
void | acquire ()
| increases the reference counter by one. More...
void | release ()
| decreases the reference counter by one. More...

## Public Attributes
byte | ObjectiveType
| Determines the model objective function type Possible values defined in css::sheet::SolverObjectiveType. More...
any | ObjectiveCell
| Cell pointing to the objective function of the model. More...
any | GoalValue
| Value or cell address used in the "Value of" field. More...
string | Engine
| Set the solver engine using its implementation name. More...
long | ConstraintCount
| Returns the number of constraints in the solver model. More...
byte | Status
| Last reported solver status. More...
string | ErrorMessage
| Stores the last error message reported after calling the "solve()" method. More...
boolean | SuppressDialog
| Set this attribute to True to suppress dialogs shown the method "solve()". More...

## Detailed Description

Provides access to the solver settings stored in a specific Calc sheet.

Since
  LibreOffice 25.2

## Member Typedef Documentation

## ◆ AvailableEngines

sequence<string> AvailableEngines
| attribute readonly

Returns a sequence of strings containing all available solver implementation names.

## ◆ Constraints

sequence<ModelConstraint> Constraints
| attribute

Constraints of the solver model.

## ◆ EngineOptions

sequence<com::sun::star::beans::PropertyValue> EngineOptions
| attribute

Solver engine options expressed as a sequence of property values.

Each solver engine has its own set of supported properties. Only the options supported by the current solver engine are returned.

## ◆ VariableCells

sequence<any> VariableCells
| attribute

Variable cells in the model, represented as a sequence of cell ranges.

## Member Function Documentation

## ◆ reset()

void reset | ( |  | ) |

Resets the solver model to its defaults settings.

## ◆ saveToFile()

void saveToFile | ( |  | ) |

Save the solver model to the file.

The next time the file is loaded, the model will be in the sheet where it was created.

## ◆ solve()

void solve | ( |  | ) |

Run the solver model Check the values of the Status and ErrorMessage attributes to know what happened after calling this method.

## Member Data Documentation

## ◆ ConstraintCount

long ConstraintCount
| attribute readonly

Returns the number of constraints in the solver model.

## ◆ Engine

string Engine
| attribute

Set the solver engine using its implementation name.

## ◆ ErrorMessage

string ErrorMessage
| attribute readonly

Stores the last error message reported after calling the "solve()" method.

## ◆ GoalValue

any GoalValue
| attribute

Value or cell address used in the "Value of" field.

To set this attribute, the value must be either: 1) a numeric value; 2) a string representing the address of a single cell or; 3) a CellAddress struct instance

## ◆ ObjectiveCell

any ObjectiveCell
| attribute

Cell pointing to the objective function of the model.

## ◆ ObjectiveType

byte ObjectiveType
| attribute

Determines the model objective function type Possible values defined in css::sheet::SolverObjectiveType.

## ◆ Status

byte Status
| attribute readonly

Last reported solver status.

This can be used f.i. to check if an error occurred or if a solution was found. Possible values defined in css::sheet::SolverStatus

## ◆ SuppressDialog

boolean SuppressDialog
| attribute

Set this attribute to True to suppress dialogs shown the method "solve()".

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

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