10 Apr

The Joys of Running External Programs

As part of adding Julia, we’ve been looking at making an interactive console, i.e. capturing the output produced by a program, and letting us send commands to it. Making this work has a surprising number of traps.

Firstly, our current approach to running an external process was slightly flawed; the site CSharpTest.Net has sample code that shows how it should be done (which is not the way Microsoft do it in their sample!). Our code suffered from several of the common mistakes they list. The next release will do this better (which allows Julia 0.3.3 to work, for example, which it did not before).

As part of this exploring, we have also worked out how to run Julia and Python in a C# console so that we can send them commands interactively. This did not work “out of the box” in the way we’d expected. We now know why. When run from C#, these programs no longer think they are connected to a TTY (i.e. an interactive) terminal, and so they change their behaviour to act as if a file was passed to them (which means they just seem to hang, with no output being produced).

This is good description of why re-directing input (stdin) and output (stdout) fails for these programs. One solution is to use an intermediate program that really is a TTY terminal. Another trick is to force Python and Julia to run in interactive mode even though they are no longer connected to the “right sort” of input/output. The “-i” (interactive) flag makes them do this.

Hopefully this will all result, one day soon, in (1) faster running Julia code as a result of re-using a single Julia instance for each run, and (2) a truly interactive console in SolverStudio.

27 Feb

SolverStudio_00_06_13_00 20150227 released with CMPL support

We have now released a second experimental release (SolverStudio_00_06_13_00 20150227) with support for the COIN-OR CMPL language.  This version lets you use the CMPL Server to solve models on remote machines (all without leaving Excel). Many thanks to Mike Steglich for his hard work in adding SolverStudio support for CMPL. This also fixes problems with CPython in the SolverStudio_00_06_12_00 20150216 release, adds Python examples (to help you better understand how data items get mapped into Python variables), and improves error reporting in CMPL. And, error messages can now be double-clicked to go to the error line in your model.

21 Jan

SolverStudio+GAMS speedup: 2 hours to 2 minutes

This user feedback helps summarise why we created SolverStudio.

Dear Andrew,
Couple of months ago you had advised me to solve [my OpenSolver] model (which takes 1.5 hours to even create set up file) in SolverStudio.

I followed your advise and now I would like to share my real life experience about such a big model.
While OpenSolver was solving my large problem in 2-2.5 hours (including setup and solution), SolverStudio GAMS formulation reduced the solution time to 2 minutes. I’d like to take this opportunity to thank everyone who developed such a tool. Also, SolverStudio greatly quickened up NEOS solver use. It was kind of painful to NEOS solver on its own…

06 Nov

COIN-OR Pioneers win INFORMS Impact Prize

I’m very pleased to see that the pioneers who played such a pivotal role in creating COIN-OR and all the great software that makes OpenSolver & SolverStudio possible have been awarded the INFORMS 2014 Impact Prize. Well done to Brenda Dietrich, JP Fasano, John Forrest, Lou Hafer, Brady Hunsaker, Laszlo Ladanyi, Robin Lougee, Ted Ralphs, and Matthew Saltzman for all their hard work over the years. They will receive their award at the INFORMS conference Award Ceremony this Sunday.

28 Aug

SolverStudio allocates 570 Engineers

Two of my students, Michael and Oscar, have developed a SolverStudio model for allocating students into student groups. This model is now being used successfully by one of our large professional development courses to manage a classs of 570+ students. The model forms student groups that are balanced in factors such as engineering discipline, gender, and grade point average. This tool also creates nice PDF outputs, thanks to Python’s powerful libraries. You can find their model on Github.

This is a great example of how a model can be quickly developed and implemented without requiring the end user to learn new skills beyond their existing Excel expertise.

Well done, Oscar and Michael, for taking the initiative to develop, test and implement this.

Andrew

30 Jun

Clearing Shrinking Ranges

We have just been working on an implementation in which our data items are defined by named ranges that use formulae, so they expand as the data set expands. When they shrink, they leave old data behind on the sheet. To clear this old data, you can use code such as:

xlDown = -4121
# print ActiveSheet.Range(ActiveSheet.Range(“test”),ActiveSheet.Range(“test”).End(xlDown)).Address()
ActiveSheet.Range(ActiveSheet.Range(“test”),ActiveSheet.Range(“test”).End(xlDown)).Clear()

11 Jun

SolverStudio Speedup: 2 hours to 20 seconds

One of our OpenSolver users recently worked with modelling guru Stu Mitchell to move his model from OpenSolver to SolverStudio. The OpenSolver model originally took 4 hours to solve. After simplifying the spreadsheet, this reduced to 2 hours. But, Stu then created a SolverStudio version that solved the same problem in just 20 seconds. To quote our user: The conversion to SolverStudio has been an excellent improvement.

If you have a complicated spreadsheet, then you may also find that SolverStudio  gives much better solve times than a traditional OpenSolver model. Furthermore, the latest SolverStudio release includes ready-to-run models for many common problem formulations, which helps make using SolverStudio even easier. Give it a go, and let us know how you get on.

Andrew

16 Apr

Bug reporting for CBC, NEOS, Pyomo

It was an interesting experience testing the latest SolverStudio 0.6.0 release. We discovered several independent bugs in CBC 2.8.8 on Windows which means (1) CBC often finds incorrect solutions when used with AMPL, and (2) it reports the wrong objective function value for these; thanks for Victor Zverovich from AMPL and John Forrest from COIN-OR for working with us to fix these ready for the next CBC release. We also found a bug in Pyomo’s output formatting that John Sirola is working on; we suggest for now you do not put comma’s in the values of indices. Finally, we think the output from NEOS has changed the way it is formatted; we have put in a work around while Ziliang Guo from NEOS looks into this. Who would have thought it would be such a busy week! Andrew