[Home][What's New][Products & Services][Contents][Feedback][Search]

Solver FAQs - Questions About Building Applications

[Dividing Line Image]

Is my Solver problem setup saved with my workbook?
Can I have more than one Solver problem in a single 1-2-3 workbook?
Can I build a custom application which presents its own dialogs instead of the Solver's?
How do I control the new Solver with 1-2-3 macros?
How do I control the new Solver from LotusScript?


Is my Solver problem setup saved with my workbook?

Your Solver problem -- consisting of all the selections you made in the Solver Parameters and Solver Options dialogs -- is saved automatically with your workbook. The next time you open the workbook and select Range Analyze Solver, your selections will reappear in these dialogs, and you can click Solve immediately.


Can I have more than one Solver problem in a single 1-2-3 workbook?

Yes. In a workbook with multiple worksheets, the most recently entered Solver problem on each worksheet is saved automatically. You can also define more than one Solver problem on a single worksheet: You click the Save Model button to save the problem specifications in a cell range, and use the Load Model button to re-load the problem specifications whenever you need them.


Can I build a custom application which presents its own dialogs instead of the Solver's?

Yes. You can write code for your application in LotusScript using 1-2-3's built-in Script Editor, and easily create the custom dialogs you need with 1-2-3's Dialog Editor. Your LotusScript code can control the Solver via built-in, high-level calls such as SolverOptions and SolverSolve.

It is easier than you might think to do this. The "current Solver problem" you set up on a worksheet (through the Solver dialogs) is available to be solved at any time, interactively or under your application's control. In LotusScript, it takes only two lines of executable code, plus two lines of declarations, to automatically (and silently) cause the Solver to optimize the active worksheet's current Solver problem.


How do I control the new Solver with 1-2-3 macros?

The new Solver supports the same macro commands used to control the old Solver in 1-2-3 Release 5, with some minor changes. You can use {SOLVER-DEFINE} to set up your Solver problem, and {SOLVER-ANSWER} to find a solution. {SOLVER-REPORT} can be used to produce reports, but the selection of available reports is different. Further details are available in the online Help included with the Solver.


How do I control the new Solver from LotusScript?

All aspects of the Solver's operation can be controlled from LotusScript, using a set of built-in, high-level function calls. For example, you can call SolverSolve to solve the current problem, and SolverFinish to save the solution and/or produce reports. You can call SolverGet to obtain information about the current problem, SolverChange to alter the variable or constraint choices, and SolverOptions to change the option settings. You can also get control during the solution process, on every iteration, and tell the Solver whether to continue or stop. Details of the Solver function calls can be found in the online Help included with the Solver. The function calls for 1-2-3 are quite similar to the VBA function calls for the Excel Solver (click here for details).

Back to: Solver News or Solver FAQs

Copyright © 1996 Frontline Systems Inc.
Last modified: December 01, 1996