Minimax A linear programming solver for iPhone |
What is this app for?
Minimax is a solver for linear programming (LP) and mixed-integer linear programming (MILP) problems. It lets you create a model, using a modelling language called OptML, and then solve it to find the optimal solution. LPs and MILPs are ways of expressing an objective to maximize or minimize, and any constraints, as mathematical equations (or inequalities).
Desktop solvers allow you to model and solve very complex models, with millions of decision variables and constraints. It would take forever to enter a model like that into your iPhone, so Minimax has been designed from the ground up to be suited to solving small- to medium-sized problems. The possible size of problems is limited only by your iPhone’s memory (which increases every year), but they start to get unwieldy.
So, Minimax is designed for students, optimization nerds, and small businesses, for which the power of the desktop applications is unnecessary. A new modelling language, OptML, is similarly designed to be very easy to start using for beginners.
Although it is suited for smaller problems, it is actually capable of solving problems with hundreds or thousands of variables and constraints (depending on your iOS device). In this case, the models are best created externally, as OptML or MPS-format models, and imported.
Support
If you find a bug, or have feedback, please email support: minimax.support@simplexify.net. Or, you can always find me on Twitter: @DCWoods.
There are many help topics describing all aspects of the interface and the use of Minimax within the app. For help on the modelling language, check out the OptML page.
Most importantly, if you like the app, please rate it and leave a review on iTunes.
Screenshots
Features
- Solve LP and MILP optimization models.
- Create optimization models in OptML format.
- Import models from other apps in “.optml” or “.mps” format.
- See the intermediate results of compiling and interpreting a model.
- Record free-form notes associated with a model.
- Save a solution as a dataset to be used in subsequent models (enables a multi-phase modelling process).
- Export all components of a model via email, including: model code, metadata, notes, parser outputs and logs, solution, referenced datasets.
- Revert a modified model to a previously solved version.
- Duplicate a model.
- Create key-value datasets to use as parameters within multiple models.
- Import datasets from other apps in “.csv” format.
- Record free-form notes associated with a dataset.
- Export a dataset via email, including notes and metadata.
- Duplicate a dataset.
- Extensive help topics describing all aspects of Minimax and OptML.
- Sample models and datasets can be added from the Settings view.
FAQ
Where can I find help?
The main view of the app has a help tab at the bottom that takes you to the help area. There are a number of topics describing in detail all aspects of using Minimax.
If you are still stuck then email minimax.support@simplexify.net.
Who is Minimax intended for?
Minimax is perfect for geeks who want to be able to solve simple LPs and MILPs on the go. Perhaps you want to figure out the best combination of foods at the supermarket to meet your daily nutritional needs within your budget… whip out your iPhone and spend an hour entering values into a dataset.
It is also suited for students who are trying to understand and experiment with linear programming. OptML basic syntax is a very intuitive way of expressing models as you see them in text books.
It is also surprisingly useful for medium-sized real-world problems. You can write a model and calculate the data required externally and import them into Minimax, and then let the solver chug away.
What size problems can be solved?
Minimax is best suited for small-to-medium problems, and these are likely all you’ll ever want to enter on a small screen anyway. However, the size of problem is really only limited by the available memory on the device, and this will only increase over time.
Minimax imports MPS models, and there are lots of standard benchmarks for these. Minimax has been tested on some and can handle some problems with thousands of variables and constraints, on an iPhone 4S.
What solver engine is used in Minimax?
Minimax uses the open source LPSolve engine. This is a powerful LP and MILP solver that is available in C. It has been recompiled from source for the iPhone platform, but is used as a precompiled binary, which is allowed under its LGPL licence.
Minimax does not use the usual LPSolve syntax. It uses a modelling language called OptML, which was specially designed for Minimax, for the constraints of mobile computing. The OptML code is parsed into a model object and then LPSolve is called via its API.
What are the motivations behind OptML?
- The basic syntax should be as close to mathematical formulation as possible.
- It should be easy to incorporate external data, such as values of coefficients.
- It should be easy to create models with repeating structure.
- It should be possible to model complicated models with minimal effort.
- Syntax should not be verbose, but rather suited for mobile devices (GAMS is quite verbose).
What is the difference between basic syntax and macro syntax?
OptML has two distinct syntaxes, both of which are mixed in an OptML model. Basic syntax is conceptually simple; it is mostly how you would write a model on paper. The macro scripting syntax allows complicated models to be expressed more concisely, with loops and conditionals, but is also conceptually simple; it is just writing out basic syntax text.
The preprocessor passes through and creates a fully written out model in basic syntax, which is then solved. The two-phase approach to parsing an OptML model avoids complicated data structures and non-intuitive model representations, while being quite expressive when used in combination with datasets that can be generated externally.
Why would I want to use datasets?
You don’t have to; you can create many models just by entering them in full in the editor. However, some uses might be:
- You have particular values that you use in many models. You can store them in a dataset and change them in a single place.
- You can create your model using a dataset with “dummy” values, and then upload the actual values later in a dataset.
- You can easily rerun a model with different values without changing the actual model. So the OptML model becomes a template.
- You can create quite sophisticated models using large amounts of real-world data that you have in a dataset, using some of the advanced model building features, without typing the full model out by hand.
What’s up with the app icon?
If you think you’ve noticed part of a face in the background of the icon, you’re right. The face is based on an image of George Dantzig, one of the pioneers of linear programming, who developed the simplex method.