Installation

Naturally, the first thing is to have Julia installed in your system. Afterwards, you can add CALiPPSO.jl package using the Julia's package manager. From a Julia REPL, Jupyter notebook, etc. simply do

]add CALiPPSO

Or, if you prefer to import the Package manager (Pkg), do:

import Pkg
Pkg.add("CALiPPSO")

This should also install the required dependencies, of which a very important one is GLPK, because it is the default solver of CALiPPSO. In any case, once added, you can simply import CALiPPSO into your current working space (i.e. the REPL, a Jupyter notebook, script, etc) as any other package, namely using CALiPPSO.

Default solver

We chose GLPK as the default solver in our package mainly because its Julia package can be easily installed, and thus is a "safe" dependency. However, we suggest using another, more performant solver for large systems. In this section we explain how to choose the solver used by CALiPPSO.

If you have everything set up, you can jump to the Basic usage section.

Dependencies

All the dependencies should be downloaded and installed once you add CALiPPSO. However, as mentioned above, its default solver is GNU Linear Programming Kit (a.k.a. GLPK). This solver has been amply tested in the community, but is not really performant compared to more modern options, at least for the linear optimization problems involved in CALiPPSO. Thus, we suggest to use a different solver if you are going to use CALiPPSO for systems of, say, $N >2000$ particles.

We have mostly tested our algorithm with the Gurobi optimizer, naturally using it through its Julia package: Gurobi.jl.

Installing Gurobi

Gurobi requires manual installation. This means that, before adding Gurobi.jl via the Julia's package manager, you need to have Gurobi properly installed in your system. Once you've downloaded Gurobi's latest version, follow the installation instructions of your operative system.

  • Note that Gurobi is a licensed solver, but a free license is available for academic use.
  • Consider also that, of the different solvers we tested, we observed that Gurobi is clearly the most performant and accurate solver, so if have access to a license, we do recommend using CALiPPSO.jl in combination with it for more precise results.

In any case, see the choosing another solver for instructions on how to use another optimizer. Our implementation already includes working code for these other solvers: HiGHS.jl, Clp.jl, Hypatia.jl, and COSMO.jl. However, you'll need to install them separately. Fortunately, any (or all) of them are readily available from Julia's package manager interface, i.e. using Pkg; Pkg.add("<solver of your choice>") for a single one, or

using Pkg
Pkg.add(["HiGHS", "GLPK", "Clp", "Hypatia", "COSMO"])

for adding all of them simultaneously. This latter option might be useful if you want to run the tests described using different solvers.

Issue with COSMO and Hypatia

In our tests we observed that while our code runs without any errors using both COSMO and Hypatia solvers, the packing obtained maybe either non-isostatic or the contact forces differ significantly from the ones found using the other solvers. We think that this is due to a lower precision in the solutions obtained by these solvers.

If this is the case, it is likely that this issue can be easily solved by a correct tunning of the solvers' parameters. We were not able to find such good combination, but we did not try much. So if you have any ideas or can help us, please contact us