Merge master.

commit ce2f1bab1eed9eaf256ffbee68ad24b45b89f55a
Merge: 2e01ca3 3cd78d7
Author: Barry Hurley <9thbit@gmail.com>
Date:   Mon Jul 29 08:46:56 2013 -0700

    Merge pull request #10 from ten0s/master

    Make sure the local_lib folder is created

commit 3cd78d781500be0889d62a64ee4a111c2a20ddd5
Author: Dmitry Klionsky <d.klionsky@dev.powermemobile.com>
Date:   Wed Jul 17 18:29:35 2013 +0300

    Make sure the local_lib folder is created

commit 2e01ca3a036ff94cbce631b61933bf702d407fa8
Author: 9thbit <9thbit@gmail.com>
Date:   Thu Jul 4 16:38:44 2013 +0100

    Ability to set thread count for Gurobi.

commit 3fc5f3e2fa49ffe4e143c7dacde8ad0a82f71680
Author: 9thbit <9thbit@gmail.com>
Date:   Thu Jul 4 16:38:26 2013 +0100

    Fix for Gurobi parameter changes not taking effect.

    GRBModel takes a copy of the environment we created, so to change parameters of the environment we need to use model->getEnv() and modify that.

commit 068a56d00cb8dc66ed90998bb247db9f6c91a32c
Author: 9thbit <9thbit@gmail.com>
Date:   Thu Jul 4 16:35:30 2013 +0100

    In the case of a variable not being created in the interface, return its lower bound.

commit 50343ed4e3bcd3a59b0380aea0354210bd189a6d
Author: 9thbit <9thbit@gmail.com>
Date:   Wed Jul 3 18:05:37 2013 +0100

    Doc additions to clarify the behaviour of get_value() in cases where the variable is not passed to the solver.

commit 222c9da087efa3b748e990fb1d02b277ec4ae3f6
Author: 9thbit <9thbit@gmail.com>
Date:   Wed Jul 3 17:54:11 2013 +0100

    Fix for seg fault when calling get_value on a MIP variable that did not need to be added to the model.

    The variable may not be passed to the solver if it is not involved in a non-trivial constraint. get_value() will return the variable's lower bound as the value in this case.

commit 1e9c448b7b20620dfa308a2998ce0af0c3bd270c
Author: 9thbit <9thbit@gmail.com>
Date:   Wed Jul 3 17:51:30 2013 +0100

    Rename _var to _arg in MipWrapper_neg and abs to avoid name clash with MipWrapper_Expression.

commit 98ed42e957b6627d083f69d70634dacd45a2dd06
Author: 9thbit <9thbit@gmail.com>
Date:   Mon Jul 1 15:02:52 2013 +0100

    Support for MIP encoding reification of disequality Z == (X != Y).

commit 787285b426f7c5cb4b194e58b9e5ac6801f7cc00
Author: 9thbit <9thbit@gmail.com>
Date:   Mon Jul 1 15:01:43 2013 +0100

    Bug fix for MIP encoding of reified equality.

commit 3a20bfd1534f6a5458775c3ed532f2330cf79a8b
Author: 9thbit <9thbit@gmail.com>
Date:   Thu Jun 27 15:01:00 2013 +0100

    Add support for MIP encoding of modulus, absolute and negation.

    Squashed commit of the following:

    commit f14c51c9107e7397bba503a686c5721fdc087324
    Author: 9thbit <9thbit@gmail.com>
    Date:   Thu Jun 27 15:00:17 2013 +0100

        Add support for MIP encoding of modulus, absolute and negation.

    commit 3db04bf1235caa60d4ceb3c0cb6b1091976fc64f
    Author: 9thbit <9thbit@gmail.com>
    Date:   Thu Jun 27 14:57:08 2013 +0100

        Small fixes for some debug statements and error output.

commit 8a37c6a948d0605daf97264e48dd9c1c59d2882c
Author: 9thbit <9thbit@gmail.com>
Date:   Fri Jun 21 23:20:36 2013 +0100

    Small bit of tidy in SatWrapper deleting old commented code.

commit b8d2c79a89f039a6b3b3665e259f61a08cb11ee2
Author: 9thbit <9thbit@gmail.com>
Date:   Fri Jun 21 22:24:23 2013 +0100

    Add error message to get_index_n/p if called without a value list being set.

    This may happen if a LeqDomain domain is created, e.g. (x <= 5) == z, and equal() is called without the order encoding of 'x' being enabled.
    For now, in the unit tests, it will enable the order encoding where needed, but we should find a better solution for parameterized test-cases in future.

commit 464ab4b1f280f5204451b6cb9a42b9706a8f8716
Author: 9thbit <9thbit@gmail.com>
Date:   Fri Jun 21 19:38:14 2013 +0100

    Support for SAT encoding of modulus operator.
    Squashed commit of the following:

    commit 3f54a7fd2dca148223fe44b8e7e094e05882dc8a
    Author: 9thbit <9thbit@gmail.com>
    Date:   Fri Jun 21 19:30:41 2013 +0100

        Tests for modulus.

    commit 6943f6777e76557ae8bad835aa3664191bebb66d
    Author: 9thbit <9thbit@gmail.com>
    Date:   Fri Jun 21 19:15:17 2013 +0100

        Support for SAT encoding of modulus in order encoding.

    commit 9ed56caf71a1b75a16d012d74e8dc0ce71535eea
    Author: 9thbit <9thbit@gmail.com>
    Date:   Fri Jun 21 17:08:31 2013 +0100

        Expand mod support to two variables, X % Y == Z. Still just direct and support encoding.

    commit 0eefa7d654b214f2250bb115febb2ce73f5aa1ff
    Author: 9thbit <9thbit@gmail.com>
    Date:   Fri Jun 21 14:47:57 2013 +0100

        Support for SAT encoding (X % value == Z) in direct and support encoding.
Merge master.

commit 017018e50c19fee9ccbe736cabbc0647971352d7
Author: 9thbit <9thbit@gmail.com>
Date:   Tue Jul 30 10:11:18 2013 +0100

    -I is not needed before `python-config --cflags`

commit 603c1c1967c0cce966453b4df58a0490c8df0c4c
Author: 9thbit <9thbit@gmail.com>
Date:   Tue Jul 30 10:09:20 2013 +0100

    Change to wildcards in gitignore.

commit e94b9b992d498aaa6de0103d82f42a4a49758d20
Author: 9thbit <9thbit@gmail.com>
Date:   Tue Jul 30 10:06:39 2013 +0100

    Move ExampleInterface to available_interfaces directory.

commit ce2f1bab1eed9eaf256ffbee68ad24b45b89f55a
Merge: 2e01ca3 3cd78d7
Author: Barry Hurley <9thbit@gmail.com>
Date:   Mon Jul 29 08:46:56 2013 -0700

    Merge pull request #10 from ten0s/master

    Make sure the local_lib folder is created

commit 3cd78d781500be0889d62a64ee4a111c2a20ddd5
Author: Dmitry Klionsky <d.klionsky@dev.powermemobile.com>
Date:   Wed Jul 17 18:29:35 2013 +0300

    Make sure the local_lib folder is created

commit 2e01ca3a036ff94cbce631b61933bf702d407fa8
Author: 9thbit <9thbit@gmail.com>
Date:   Thu Jul 4 16:38:44 2013 +0100

    Ability to set thread count for Gurobi.

commit 3fc5f3e2fa49ffe4e143c7dacde8ad0a82f71680
Author: 9thbit <9thbit@gmail.com>
Date:   Thu Jul 4 16:38:26 2013 +0100

    Fix for Gurobi parameter changes not taking effect.

    GRBModel takes a copy of the environment we created, so to change parameters of the environment we need to use model->getEnv() and modify that.

commit 068a56d00cb8dc66ed90998bb247db9f6c91a32c
Author: 9thbit <9thbit@gmail.com>
Date:   Thu Jul 4 16:35:30 2013 +0100

    In the case of a variable not being created in the interface, return its lower bound.

commit 50343ed4e3bcd3a59b0380aea0354210bd189a6d
Author: 9thbit <9thbit@gmail.com>
Date:   Wed Jul 3 18:05:37 2013 +0100

    Doc additions to clarify the behaviour of get_value() in cases where the variable is not passed to the solver.

commit 222c9da087efa3b748e990fb1d02b277ec4ae3f6
Author: 9thbit <9thbit@gmail.com>
Date:   Wed Jul 3 17:54:11 2013 +0100

    Fix for seg fault when calling get_value on a MIP variable that did not need to be added to the model.

    The variable may not be passed to the solver if it is not involved in a non-trivial constraint. get_value() will return the variable's lower bound as the value in this case.

commit 1e9c448b7b20620dfa308a2998ce0af0c3bd270c
Author: 9thbit <9thbit@gmail.com>
Date:   Wed Jul 3 17:51:30 2013 +0100

    Rename _var to _arg in MipWrapper_neg and abs to avoid name clash with MipWrapper_Expression.

commit 98ed42e957b6627d083f69d70634dacd45a2dd06
Author: 9thbit <9thbit@gmail.com>
Date:   Mon Jul 1 15:02:52 2013 +0100

    Support for MIP encoding reification of disequality Z == (X != Y).

commit 787285b426f7c5cb4b194e58b9e5ac6801f7cc00
Author: 9thbit <9thbit@gmail.com>
Date:   Mon Jul 1 15:01:43 2013 +0100

    Bug fix for MIP encoding of reified equality.

commit 3a20bfd1534f6a5458775c3ed532f2330cf79a8b
Author: 9thbit <9thbit@gmail.com>
Date:   Thu Jun 27 15:01:00 2013 +0100

    Add support for MIP encoding of modulus, absolute and negation.

    Squashed commit of the following:

    commit f14c51c9107e7397bba503a686c5721fdc087324
    Author: 9thbit <9thbit@gmail.com>
    Date:   Thu Jun 27 15:00:17 2013 +0100

        Add support for MIP encoding of modulus, absolute and negation.

    commit 3db04bf1235caa60d4ceb3c0cb6b1091976fc64f
    Author: 9thbit <9thbit@gmail.com>
    Date:   Thu Jun 27 14:57:08 2013 +0100

        Small fixes for some debug statements and error output.

commit 8a37c6a948d0605daf97264e48dd9c1c59d2882c
Author: 9thbit <9thbit@gmail.com>
Date:   Fri Jun 21 23:20:36 2013 +0100

    Small bit of tidy in SatWrapper deleting old commented code.

commit b8d2c79a89f039a6b3b3665e259f61a08cb11ee2
Author: 9thbit <9thbit@gmail.com>
Date:   Fri Jun 21 22:24:23 2013 +0100

    Add error message to get_index_n/p if called without a value list being set.

    This may happen if a LeqDomain domain is created, e.g. (x <= 5) == z, and equal() is called without the order encoding of 'x' being enabled.
    For now, in the unit tests, it will enable the order encoding where needed, but we should find a better solution for parameterized test-cases in future.

commit 464ab4b1f280f5204451b6cb9a42b9706a8f8716
Author: 9thbit <9thbit@gmail.com>
Date:   Fri Jun 21 19:38:14 2013 +0100

    Support for SAT encoding of modulus operator.
    Squashed commit of the following:

    commit 3f54a7fd2dca148223fe44b8e7e094e05882dc8a
    Author: 9thbit <9thbit@gmail.com>
    Date:   Fri Jun 21 19:30:41 2013 +0100

        Tests for modulus.

    commit 6943f6777e76557ae8bad835aa3664191bebb66d
    Author: 9thbit <9thbit@gmail.com>
    Date:   Fri Jun 21 19:15:17 2013 +0100

        Support for SAT encoding of modulus in order encoding.

    commit 9ed56caf71a1b75a16d012d74e8dc0ce71535eea
    Author: 9thbit <9thbit@gmail.com>
    Date:   Fri Jun 21 17:08:31 2013 +0100

        Expand mod support to two variables, X % Y == Z. Still just direct and support encoding.

    commit 0eefa7d654b214f2250bb115febb2ce73f5aa1ff
    Author: 9thbit <9thbit@gmail.com>
    Date:   Fri Jun 21 14:47:57 2013 +0100

        Support for SAT encoding (X % value == Z) in direct and support encoding.
fzn_numberjack and njportfolio.py now handle the term and interrupt signals gracefully.

Will kill all child processes and solvers that are running before exiting.
Remove some debug output.
njportfolio.py will return the best solution found so far if we're about to timeout.

Also: custom total_seconds to work around lack of timedelta.total_seconds() in python 2.6
Merge origin/fzn