top of page

In what kind of models does using the list() variable makes the most sense(performance-wise)?

In what kind of models does using the list() variable makes the most sense(performance-wise)? For example if you already have a working model, in what cases can it's performance be improved by rewritting the model using list() variable?


A; Lists are richer structure in the sense that they maintain an ordered collection of elements. Therefore, there is no direct equivalence between a list and the boolean variables representing the contains: in the latter case the order is missing. Lists are extremely powerful for both modelling and solving problems that need to maintain some kind of order. Very good examples are the traveling salesman problem (https://www.localsolver.com/docs/last/exampletour/tsp.html), routing problems (https://www.localsolver.com/docs/last/exampletour/vrp.html) and scheduling problems (https://www.localsolver.com/docs/last/exampletour/flowshop.html). For these kinds of problems using lists in LocalSolver is in general extremely powerful.


More generally speaking, when you want to model a complex problem, I suggest you find a similar one from our example tour (https://www.localsolver.com/docs/last/exampletour/index.html) and start from there, and then adapt it to fit your needs. It will give you nice hints to see if using lists seems relevant. Additionally, if you have any question about your specific model, feel free to reach us. We provide reactive support for our clients and we help designing their models with LocalSolver.

最新記事

すべて表示
bottom of page