Questi barbari dello stato islamico..

Questi barbari terroristi dello stato islamico.. vanno uccisi, crocifissi e mutilati ! (sick!)

Fonte: http://www.repubblica.it/esteri/2015/02/04/news/reazioni_pilota_giordano-106508991/?ref=HRER1-1

“Rappresaglie ancora più dure vengono invocate anche dall'Università di Al-Azhar al Cairo, il più prestigioso centro d'insegnamento dell'Islam sunnita. In una durissima nota diffusa dopo il video in cui Maaz al-Kassasbeh veniva bruciato vivo, l'autorità religiosa ha chiesto “l'uccisione, la crocifissione e la mutilazione dei terroristi dell'Isis”.

2015/02/04 15:46 · antonello · 0 Comments

Best off-line GPS navigator for Android 2015

It's December 2014 and I need to go back for Christmas to Italy from France, so I need an “off-line” navigator for my Android smartphone, that is one where, contrary to the default Google maps, I can pre-save the map on the sd card and use it without internet.

And possibly, I want it free.

So I tested 7 of the most popular gps android applications that offer off-line turn-by-turn navigation.

I can with confidence affirm that today the “winners” are 2:

→ Read more...

2014/12/14 12:50 · antonello · 0 Comments

A Pyomo tutorial for GAMS users

Updates:

  • 2015.01.12: Updated to run under Pyomo 4. See previous revisions if you still use Pyomo 3.

Pyomo (Python Optimisation Modeling Object) is an Algebraic Modelling Language (AML) that allows to write optimisation problems using a concise mathematical formulation, acting as interface to the specific solver engine API. For non-linear optimisation problems it allows to keep a high-level approach that doesn't require the modeller to compute the Jacobian or the Hessian.
It is developed by the Sandia National Laboratories and appeared in 2008 as an open source project.

GAMS (The General Algebraic Modeling System) does more or less the same things and appeared in the '70s as a project of the World Bank. GAMS is hence a very mature project (maybe too mature) with a lot of followers in the economic domain, where it is used mainly to solve equilibria problems.

This mini-tutorial is intended for gams users that want to try Pyomo. There may be two reasons for someone to with to use Pyomo instead of GAMS.
The most obvious one, even if often it isn't the key driver, is that GAMS is a commercial software while Pyomo being open-source is free both as freedom and as a free beer.
While for GAMS a licence for the underlying solver engine is often included with a particular version of GAMS, Pyomo would still require the user to buy a licence to use a specific commercial solvers. However Pyomo interfaces with both GLPK (for linear and mixed-integer programming) and IPOPT (for non-linear optimisation) open-source solvers, both of which are top on their classes, leaving the necessity to acquire a licence for a commercial solver to niche cases.
The second reason (and, to me, the most important one) resides in the language features and in the availability of development environments. GAMS uses a VERY ODD syntax, somehow derived from the Cobol language, that is very distant from any programming language in use nowadays. For example a macro mechanism to provide an elementary way to structure the code in reusable components has been introduced only in GAMS 22.9. Its own editor is also very terrible, but as most text editors do not provide a gams syntax highlighting, it's still the most common way to code in GAMS.

Pyomo, at the opposite, is both open source and.. it's python!
You have plenty of development environment to choose from, a clear modern language, the possibility to interface your model with third party libraries.. all of this basically for free.
While there are some reports of pyomo being somehow slower that GAMS it really depends. In my case it is actually much faster, as the IPOPT version that is embedded in GAMS uses the MUMPS linear solver, while on my system I have IPOPT compiled with the much more performing ma27 linear solver. That's part of the flexibility you gain in using pyomo in place of GAMS.

So let's start. We will see how to code the trasnport.gms problem, the one that ship as default example in GAMS1), using Pyomo. For a fictions product, there are three canning plants and three markets and the objective of the model is to find the optimal allocation of products between plants and markets that minimises the (transport) costs.
GAMS equivalent code is inserted as single-dash comments. The original GAMS code needs slightly different ordering of the commands and it's available at http://www.gams.com/mccarl/trnsport.gms

→ Read more...

2014/09/04 13:52 · antonello · 15 Comments

Sulla riforma del lavoro necessaria in Italia...

Oggi sono uscite le proposte di Renzi..

Io per la verità sarei ancora più drastico.. regole e parametri di base uguali per tutti (max orario di lavoro, min ferie, min importo orario..) e per il resto (a) contratti totalmente disaccoppiati lavoratore/azienda; (b) eliminazione di ogni differenza pubblico/privato; ( c) eliminazione degli scatti di anzianità automatici; (d) semplificazione delle norme relative al licenziamento in caso di esuberi bilanciate da un migliore welfare finalmente sociale e non più affidato soltanto a famiglia & chiesa.

Notare che il punto (b) comporta l'eliminazione del con. pubblico come è inteso oggi ma anche la completa riforma dei contratti dirigenziali che verrebbero resi funzionali all'effettiva efficacia dell'unità da loro gestita.

E, giusto per dirla, questo è in pratica il sistema inglese che ha per la verità creato numerosi problemi negli anni '80 ma oggi loro stanno molto meglio di noi.

2014/01/09 08:25 · antonello · 0 Comments

<< Newer entries | Older entries >>

1)
yes, the default GAMS example is named “trasnport”
personal/blog/home.txt · Last modified: 2018/06/18 15:11 (external edit)
CC Attribution-Noncommercial-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0