This event has ended. View the official site or create your own event → Check it out
This event has ended. Create your own
View analytic
Friday, August 14 • 5:20pm - 5:40pm
An embedded DSL to manipulate Mathprog Mixed Integer Programming models within Scala

Sign up or log in to save this to your schedule and see who's attending!

GNU Mathprog is an algebraic modeling language for describing mathematical programming models. The language is a subset of AMPL, the most popular language used for describing such models. One advantage of this languages is the similarity of its syntax with the mathematical notation used to describe optimization problems. In this talk we describe the use of Scala in the construction of an embedded DSL to work with Mathprog models. At construction time, the DSL works as an alternative way to build the AST representing the model, taking advantage of the Scala compiler to check the validity of most expressions. The AST can be created also by parsing Mathprog model files. Once an AST is obtained, the DSL allows to manipulate and transform the AST to extract data or create new models. We show how the use of type classes and implicit conversion prioritization gives us a systematic way to define operators, valid combinations of parameters and result types, and conversions between expressions. At the end, we explore possible applications of the DSL to stochastic programming models.

avatar for Germán Ferrari

Germán Ferrari

Germán Ferrari is an MSc student in Computer Science at the Basic Sciences Programme (PEDECIBA), Universidad de la República (UdelaR), Uruguay. He is teaching/research assistant at the Operational Research Department of the Instituto de Computación, UdelaR, and also works as Software Engineer at the Central Bank of Uruguay. He is a Scala enthusiast since late 2008, and co-organizes the Scala Meetup Montevideo.

Friday August 14, 2015 5:20pm - 5:40pm
Track B

Attendees (22)