GullFOSS
OpenOffice.org Engineering at Sun
 
Subscribe

Today's Page Hits: 636

 
Archives
 
« May 2008
SunMonTueWedThuFriSat
    
3
4
6
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
       
Today
Links
Flickr Photos
More Flickr photos tagged with openoffice
Locations of visitors to this page
all tags: accessibility api aqua architecture automated_tests base build calc chart code community compiler cws database development directx download draw eis events export extensions features filter framework graphics gsl gsoc gullfoss i18n import impress installation irc iso26300 java l10n localization mac macros netbeans odf odff ooo ooocon ooxml opendocument openoffice.org patch pdf performance plugin podcast porting qa quality release report sdk snapshot software specification spreadsheet staroffice statistics sun svg toolkit tools usability user-experience vba web wiki writer writerfilter xml
« Development at a... | Main | New: OpenOffice.org... »
Friday, 16 Nov 2007
Spreadsheet Solver Infrastructure
Niklas Nebel

Currently, several solver components for Calc are available (with different capabilities and different licenses), and OOo 3.0 is scheduled to contain another one in the default installation. Some areas, like non-linear models, are still open, so more solver implementations may appear in the future.

Instead of having a variety of “Solver xyz” entries in the “Tools” menu, each with their own dialog, it seems better to select between the implementations in a single dialog. So that's what we are doing: There's going to be a UNO service “com.sun.star.sheet.Solver” for the core implementation, without UI, and a dialog within the “sc” module to specify model parameters, and select between different service implementations. Future components will be able to implement just that service, and be called from the common dialog. The dialog design isn't final yet, but it will look similar to this (the images in the specification will be updated if the design is changed):

The “Options” button will open an options dialog where you can select an implementation and the options needed for that implementation.

The Solver service will be something like this, plus an XPropertySet for the options (note: even more preliminary than the dialog design):

enum SolverConstraintOperator
{
   LESS_EQUAL,
   GREATER_EQUAL,
   EQUAL,
   INTEGER,
   BINARY
};

struct SolverConstraint
{
   com::sun::star::table::CellAddress Left;
   SolverConstraintOperator Operator;
   any Right;
};

interface XSolver: com::sun::star::uno::XInterface
{
   [attribute] XSpreadsheetDocument Document;
   [attribute] com::sun::star::table::CellAddress Objective;
   [attribute] sequence< com::sun::star::table::CellAddress > Variables;
   [attribute] sequence< SolverConstraint > Constraints;
   [attribute] boolean Maximize;
   void solve();
   [attribute, readonly] boolean Success;
   [attribute, readonly] double ResultValue;
   [attribute, readonly] sequence< double > Solution;
};

service Solver: XSolver;

As an added benefit, since the service implementation is available from outside the solver dialog, you will be able to easily use solver functionality from macros or other components.

Implementation will be in the child workspace “calcsolver”, and there's also a wiki page. Feedback is welcome on the sc-dev mailing list.

tags:

Posted by Niklas Nebel on 16 Nov 2007  |  PermaLink |  Bookmark to del.icio.us Bookmark to del.icio.us |  Digg this Digg this

Comments:

Post a Comment:
Comments are closed for this entry.
« Development at a... | Main | New: OpenOffice.org... » GullFOSS