« At Twitter: http://twitter.com/hakankj | Main | MiniZinc Challenge 2009 Results »

A few new MiniZinc models, and a lot of improved

Some news about my MiniZinc models.

New MiniZinc models

This last weeks I have implemented the following new MiniZinc models:

Corrected some models

When testing the MiniZinc/FlatZinc support for the new version of JaCoP , I found problems in some models. These are now corrected:
  • strech_path.mzn: The former implementation was not correct.
  • min_index.mzn and max_index.mzn:
    The minimum(x[i], x) and maximum(x[i], x) don't work with the current MiniZinc ROTD version. Substituted to x[i] = min(x) and x[i] = max(x).

Improved all global constraints models

The global constraints section of My MiniZinc Page contains about 160 decompositions of global constraints from Global Constraint Catalog (and some not in the Catalog). The following improvements has been done on all models, especially for the older models:
  • Corrected the links to Global Constraint Catalog in the presentation of the constraint (only older models)
  • Removed some strange characters in the quoted text from Global Constraint Catalog (I hope all these has been removed now).
  • Made older models more general by using index_set, ub, lb, instead of assuming that all arrays start with index 1 etc. Some examples of this generality
           ...
           let {
             int: lbx = min(index_set(x)),
             int: ubx = max(index_set(x))
           } in
             forall(i in lbx+1..ubx) (
               forall(j in i+1..ubx-1) (
                  % ...
               )
             )
    
            forall(i in index_set(x)) (
              all_different([x[i,j] | j in index_set(x)) 
            )