Difference between revisions of "SCResizeableMargin"

From Apache OpenOffice Wiki
Jump to: navigation, search
(Alert_2)
(Optimizer Algorithm)
Line 47: Line 47:
 
|}
 
|}
  
= Optimizer Algorithm =
+
= Detailed Specification=
 
+
The Solver code is found in <code>ooo-build/scratch/scsolver</code>.  Build ooo-build normally as instructed in [[ooo-build]] page, and you should have a top level <code>scsolver</code> module directory at <code>ooo-build/build/[upstream build name]/scsolver</code>.  The upstream build name here refers to the name of a (semi-)latest milestone that the build script has downloaded for you when you ran <code>configure & download</code>.
+
  
 +
When the page preview is clicked, the page will be shown on the screen, on this view, we add two lines for width of the page and four for height of the page,users can put the mouse on the line area, drag the line to adjust the margin of the page. <br>
 +
It is similar as the function in MS excel, but not the same implementation, in excel, the style is not so strict, the user can even drag the page margin into the content area, in our new feature in OpenOffice.org spread sheet, the page margin can never be dragged in to the content area, the two inner horizontal lines are in charge of  the header and footer, and they always exist inside the two outer horizontal lines, which restrain the page margin.<br>
 +
The two vertical lines control the page left and right margin.
 
   
 
   
==User Interface (UI) Tasks==
+
==Miscellaneous and Feedback==
{|border="2" cellpadding="4" cellspacing="0" style="margin: 1em 1em 1em 0; background: #f9f9f9; border: 1px #aaa solid; border-collapse: collapse;"
+
You can add any response or questions here.
|-
+
!width="160px"|Name !! Description
+
|-
+
| Solve for a specified value || Add an additional constraint to emulate solving for a specified value.
+
|-
+
| Progress window || A separate window with a button to let user abort optimization when the optimization routine is on-going.  Such window should also have a progress bar and a text message area.  The window will disappears once the Solver finds a solution, or fails to find a solution.
+
|-
+
| Restore original values || Provide an option to restore original values when the user aborts the optimization run or the optimizer fails to find a solution.
+
|-
+
| Arithmetics on cell (range) address in constraint dialog || Extend the constraint parser to support input such as A2:A4 + B2:B4 > 4.  If the sheet name is missing, assume the current active sheet.
+
|-
+
| Automatic loading/saving of a model || Currently, loading and saving of a model to its associated document is done by storing the model information as a metadata of the document.  It may be useful to automate some of loading and saving of the model.
+
|-
+
| Storing multiple models in a single document || Users often want to save multiple models into a single document, whereas currently one model can be saved per document.  It would be nice to add the capability of adding multiple models.  One way to implement this is to save the model data into a region of cells, which would allow storing as many models as the cells can hold in a single file.  It would also be nice to support saving and loading Excel Solver's model format to allow migration from Excel Solver.
+
 
+
Alternatively, we could also have multiple metadata entries with a nice front-end dialog to implement multiple model storage.  Which approach should be taken is subject to discussion.
+
|-
+
| Options dialog || We need to create an options dialog to let user configure run-time behavior of the solver.  At a minimum, the following options need to be present:
+
 
+
* algorithm type (LP, MILP, QP, NLP, ...)
+
* integer constraint
+
* positive variable constraint
+
 
+
The options dialog should also have sensible default values since most users just want to run the solver, get the answer and move on.
+
|-
+
| Algorithm specific options || Each algorithm requires a different set of parameters to control their run-time behavior.  We need to have a good UI to allow algorithm-specific settings.  The internal data structure to hold the algorithm options must be designed such that it allows variable number of parameters with names that are specific to each optimizer algorithm.
+
|-
+
| i18n || At a minimum, string l10n mechanism needs to be in place.  Work is in progress with Michael Meeks' help.
+
|-
+
| User-defined Hessian matrix calculation || There are 3rd party high-performance [http://mathworld.wolfram.com/Hessian.html Hessian] matrix calculation program out there.  It would be nice to add a hook for such 3rd party software, so that the user can use it to speed up iteration.
+
|-
+
|}
+
 
+
==Miscellaneous==
+
===Automatic Algorithm Selection===
+
We may need an optional mechanism to select appropriate optimization algorithms (LP vs QP, linear vs non-linear) based on the characteristics of a given model.  But such machanism should be optional so that the user can still pick and choose desired algorithms.
+
  
  
 
==Links==
 
==Links==
* [http://www.utexas.edu/courses/lasdon/design3.htm Design and Use of the Microsoft Solver]
+
* [http://www.openoffice.org/issues/show_bug.cgi?id=51656]
* [http://www.go-oo.org/bonsai/cvsquery.cgi? * Learn to program a simple calc  [[Category:Calc issues]]
+
* [http://qa.openoffice.org/issues/show_bug.cgi?id=75673 [[Category:Calc issues]]
 
[[Category:SC]]
 
[[Category:SC]]

Revision as of 02:05, 19 April 2007

The goal of this specification is to implement one small feature needed to be done in the SC to do list:
Add resizeable margin on page preview:
In the page preview, add the possibility to interactively change page margins by dragging an indicator, instead of using the page style dialog( see issue 51656[1]).

This implmentation is written in C++.

Developers

  • RedOffice team

User Interface

Preview.jpg


Alert_1

Alert 1.jpg

Widget Table

Name Type Description
Cell Reference text input This field takes the address of the cell that represents the left-hand-side (LHS) of a constraint equation. The value of this field must be a valid cell reference.
Equality combo box Defines the relationship between the left hand side (LHS) and the right hand side (RHS) terms.
Constraint text input The right-hand-side (RHS) value of the constraint equation. This can be a cell reference or a numeric value.

Alert_2

Alert 2.jpg

Widget Table

Name Type Description
Assume linear model check box When this box is checked, the Solver uses a linear algorithm to solve the current model. When this box is not checked, it uses a non-linear algorithm.
Allow only positive values check box When this box is checked, the Solver tries to find a solution while all variables are positive.
Allow only integer values check box When this box is checked, the Solver tries to find a solution with all variables being integers. Fractional values are not allowed.
OK button OK button.
Cancel button Cancel button.

Detailed Specification

When the page preview is clicked, the page will be shown on the screen, on this view, we add two lines for width of the page and four for height of the page,users can put the mouse on the line area, drag the line to adjust the margin of the page.
It is similar as the function in MS excel, but not the same implementation, in excel, the style is not so strict, the user can even drag the page margin into the content area, in our new feature in OpenOffice.org spread sheet, the page margin can never be dragged in to the content area, the two inner horizontal lines are in charge of the header and footer, and they always exist inside the two outer horizontal lines, which restrain the page margin.
The two vertical lines control the page left and right margin.

Miscellaneous and Feedback

You can add any response or questions here.


Links

Personal tools