OR/MS Today - October 2004Software ReviewTK Solver 5.0Time-tested mathematical modeling software boasts many new features.By Jeff BrachtTK Solver from Universal Technical Systems (UTS) is practical, time-tested mathematical modeling software, combining an intuitive rule-based language with procedural programmability and a nice collection of prepackaged tools and links to popular programming environments. TK Solver models can be as simple as a handful of equations or as complex as parameter estimation in fitting a solution to simultaneous differential equations to sample data. As an example of special interest to the O.R. community, UTS teamed with Donald Gross and the late Carl Harris, authors of the Wiley & Sons textbook "Fundamentals of Queuing Theory," to produce a queuing application using TK Solver. TK Solver was one of the first general-purpose problem solvers for desktop PCs, originally released in 1982 and dubbed as an equation solver. Since then, the product has steadily matured. Reviews in the mid- to late-1980s applauded its unique iterative solving and backsolving powers but consistently criticized its multi-sheet, multi-level text-based interface as being too confusing for occasional users. Since the interface was completely overhauled in the 1990s to run on the Windows platform, navigation and use of the program have been simplified. They are much more intuitive, and once the user becomes familiar with the program's structure and tools, its well-organized system for model-building and problem-solving is not difficult to use. The current version, TK Solver 5.0, strives also to be a useful tool for application developers through links with Excel, browsers, Microsoft Visual Basic, .NET and other popular programming environments. It's a simple task, for example, to incorporate the variables from several TK Solver models within a single, dynamic Excel application. Clearly, today's TK Solver is much more than an equation solver. - Easy-to-use optimization wizard for linear, nonlinear, binary and integer problems. The algorithms used are licensed from Frontline Systems, makers of the popular Excel Solver. The version included with TK Solver is more current than the Excel add-in and can deal with larger problems.
- Expanded collection of numerical solvers for differential equations.
- List fills that now include random number generation for simulations.
- Parameter estimation for a variety of distribution functions.
- Dynamic Excel Link that allows multiple TK Solver models to interact with Excel.
- TK Solver/Excel applications that can be bundled for distribution to non-TK Solver users.
- A RuleMaster option that allows TK Solver applications to be distributed over the Internet.
- A Report Writer that displays all aspects of the math model in a customizable configuration, including formatted equations in the sequence they are solved.
- Plotting now includes programmable annotations so that the text and location dynamically update when the model is solved.
- Startup and Terminate Functions that allow application builders to break up the processing of a model into three stages — data gathering, solving and summary.
- Built-in functions that can be accessed through Function Wizards, providing step-by-step guidance in their syntax and use.
- Forty new functions for matrix processing.
Interface and NavigationMost math-related software programs give you an interface where you progressively build a document with each line relying on those prior to it. At the end of the document, you see the final solution. This approach has proven very effective for problem-solving at various levels, as well as for preparation of student homework and thesis papers. TK Solver takes a completely different approach, making the assumption that the model builder will often desire to reuse it to solve related problems that may not follow the original sequence of steps. With this in mind, all the variables are summarized on a single work sheet. Variables can interchangeably be defined as inputs or outputs. The same concept applies for other types of objects in the model. There are separate sheets for storing functions, lists, tables, plots, unit conversions, numeric formats and hyperlinked comments. All these sheets are accessible in a variety of ways, with the most prominent being a Navigation Bar on the left edge of the screen. The program includes Wizards for all sorts of activities, from using built-in functions to generating tables of plots, to importing unit conversion factors. The unit conversion library is extensive, and engineers should be able to find what they need there. If not, it is simple to add whatever additional conversions are required. I can see how reviewers 20 years ago may have gotten confused by having to memorize a series of keystrokes to find their way in and around all of these sheets. But Windows has been kind to TK Solver — the interface is easy to work with.
As the equations are entered on a single line — like you would in Visual basic or C — they're instantly displayed in MathLook view on the screen as well as in the reports. That helps you immediately check if you entered the equation correctly. A Greek palette is also available for entering those characters. A Variables Window displays all the variables in the model, and this is where you supply input values, units and descriptions. Figure 2 displays the Variables Window for this example with sample inputs provided along with the results after solving.
The same model can solve many different problems. Suppose you want to reduce the expected waiting time in the system (W) from 18 minutes to just five minutes. What must the new service time (st) be? With TK Solver, it's as simple as blanking the value of st, changing W to an input of 5, and solving (Figure 3).
It really is that easy. This is completely different from how such problems must be solved with procedural languages, spreadsheets and math packages. Such alternatives require you to invoke a special solver or optimizer, adding to the complexity and difficulty in application development.
There is a lot more to this program than initially meets the eye. There are Flash Tutorials to introduce you to the interface and features. The Help Utility is easy to access and use, too. For example, I found that all the Procedure Language constructs were concisely summarized with examples, and I was able to find this information within a couple of clicks from the function I was building. Browsing the Help Utility is one way to learn more about the software's potential. One can also learn a lot by visiting the TK Solver Library Menu. This Library contains a collection of tools and examples written in TK Solver. For example, there are functions for finding roots of polynomials, sorting lists or interpolating within tables. There is also an extensive set of routines covering probability and statistics. It really helps to be able to see and understand how these functions were written. This is also the case for the numerous examples in the TK Solver Library. The examples for curve-fitting, optimization and integration of differential equations are vital for understanding these features. Faculty members in particular will find this facility quite helpful in their teaching. The UTS Web site also includes case studies for some of the more complex modeling issues. There are two case studies on differential equations. I would like to see more of these specifically targeting O.R. topics.
As mentioned earlier, the TK Solver Library includes a collection of examples to get you familiar with the potential of the Solution Optimizer. Several of them are classic O.R. problems including sales force allocation, facility location, inventory costs, gas blending and portfolio optimization. There are two options for setting up your Solution Optimizer constraints. UTS decided to include one interface that looks very similar to that of the Excel Solver for those already familiar with it. The other is a more elaborate, step-by-step wizard that walks you through the entire process. Decision variables can be declared as continuous, integer or binary integer. The program differentiates between "bounds" and "constraints" in the solving process. Bounds are limits beyond which the Solution Optimizer should not attempt to search while constraints can be violated during the optimization process. For example, a global bound can be set that specifies that no decision variables can be negative. Both the constraints and bounds can be set and dynamically updated based on values of other variables in the model. Figures 5, 6 and 7 are the Optimization Wizard forms.
TK Solver and Visual Basic (VBA)Although many advanced Excel users are probably familiar with using VBA to write subroutines for Excel, I think they would find TK Solver a very useful addition. TK Solver is better at handling the serious number crunching and heavy lifting while VBA can be used to automate various tasks that enhance the interface and overall end-user experience. The combination seems quite powerful. Queuing Analyses on TK (QTK) ApplicationQTK is an optional package available from UTS. (A bundled package consisting of TK Solver 5.0 Premium and QTK is priced at $899 with academic pricing also available.) Following is a listing of the modules included in QTK. BasicsPoisson Probabilities Mixed Exponential Probabilities Erlang Probabilities Finite Markov Chains Finite Steady-State Birth/Death Solution Infinite Steady-State Birth/Death Solution Sample Path for Constant Single-Server Queue Unit Conversions Single-Server QueuesM/M/1/K Queue Markov Single-Server Finite-Source Queue Simple State-Dependent Service General Markovian State-Dependent Queue Impatient Customers: Balking M/D/1: Deterministic-Service Queue M/E(k)/1: Erlang Service Queue E(k)/M/1: Erlang Arrival Queue M/G/1: Non-Exponential Service M/G/1: Sensitivity Analysis D/M/1: Constant Input, Exponential Server H/M/1: Hyperexponential Interarrivals G/M/1: Non-Exponential Interarrivals G/E(k)/1: Non-Exponential Interarrivals E(j)/E(k)/1: Single-Server Erlang Queue Multiple-Server QueuesLimited M/M/c/K Queue Multi-Server Finite-Source Queue Pure Overflow M/G/c/c Optimal c for M/G/c/c Ample Service M/G/infinity M/E(k)/c: Erlang Service Times E(k)/M/c: Erlang Interarrival Times D/M/c: Constant Interarrival Times H/M/c: Hyperexponential Interarrival Times G/G/c: Upper and Lower Bounds Bulk QueuesFixed Bulk-Input M^[K]/M/1 Queue Multi-Server Bulk-Input M^[X]/M/c Bulk Service M/M^[K]/1 Queue (1) Bulk Service M/M^[K]/1 Queue (2) Batch Arrival G^[K]/M/1 Queue PrioritiesMarkov Priority Queue w/Two Service Rates M/M/c with Two Priorities, Nonpreemptive Multi-Priority M/M/1 with One Service Rate Multi-Priority M/M/1 with Many Service Rates Multi-Priority M/M/c, Nonpreemptive Two-Priority Markovian Queue with Preemption N-Priority Markovian Queue with Preemption Multi-Priority, Nonpreemptive M/G/1 Queue NetworksN M/M/1 Queues in a Tree N M/M/c Queues in a Tree Closed Jackson Network Open Jackson Network, 1 server Open Jackson Network, c Servers These models come with a 250+-page manual with commentary from Gross and Harris plus sample problems. Unfortunately, while the TK Solver interface has dramatically improved with its adaptation to Windows, the Gross and Harris manual is a relic of the DOS world. While the outdated manual does not prevent using the QTK package or limit its usefulness, it is disappointing to find it included in a premium software package. The models are easily loaded in to TK Solver, and from there it's just a matter of entering your inputs. Of course, these models can also be linked with Excel spreadsheets and used as subroutines with more elaborate applications. You can highlight one or more Excel cells, click the MathLook icon, and all your formulas appear in 2D format. One particularly useful feature is formula expansion for cell dependencies. It's possible to create some rather impressive looking equations. All in all, pretty handy if you ever need to audit or document formulas. The tool also includes a grid for naming cells. Anyone working with a lot of Excel formulas shouldn't be without this low-cost utility. The Monte Carlo simulation feature in StackSoft makes it possible to assign different distributions to the tolerances of various part dimensions in an assembly to assess the overall effect on various production quantities. A classic example might be the valve train assembly in an engine, which involves two dimensional tolerance analysis involving both linear and angular dimensions. With the kind of precision today's engines demand, the tolerance analysis can play a critical part in the design and manufacturing of valve train components. StackSoft is very easy to use and has its own interface overlaid on TK Solver, so that knowledge of TK Solver is not needed. No extensive knowledge of statistics is required, either. With minimal training and some guidance, designers can create models of tolerance stacks for most assemblies. I was also fortunate enough to have the privilege of testing UTS's Simulation Wizard. The Simulation Wizard is another TK Solver application that permits the creation of Monte Carlo simulations involving combinations of variables that are more complicated than the simple addition/subtraction available in StackSoft. I found the Simulation Wizard to be the perfect tool for analyzing the relationship between the orientation of machined surfaces and bearing clearances on a shaft assembly — something that StackSoft could not do. While the Simulation Wizard is not commercially available, if UTS can be convinced to offer it, it would be another extremely powerful tool to add to the TK Solver libraries.
Jeff Bracht is an engineer at Kohler Co.Table of Contents OR/MS Today Home Page copyright © 2004 by the Institute for Operations Research and the Management Sciences. All rights reserved.OR/MS TodayLionheart Publishing, Inc.506 Roswell Rd., Suite 220, Marietta, GA 30060 USA Phone: 770-431-0867 | Fax: 770-432-6969 E-mail: lpi@lionhrtpub.com URL: http://www.lionhrtpub.com Web Site © Copyright 2004 by Lionheart Publishing, Inc. All rights reserved. |