top of page

検索結果

「」に対する検索結果が41件見つかりました

  • 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.

  • Is it more efficient to use list() variable over normal bool() variables?

    Is it more efficient to use list() variable over normal bool() variables? And if it is more efficient, how is it so? For example when defining a variable that is a subset of {0, 1, ..., n-1} which one of the two models below will be more efficient and why? i. var <- list(n) constraint count(var) == N (0 <= N < n) constraint contains(i, var) ii.var[0..n-1] <- bool() constraint sum(var) == N constraint var[i] == 1 A:There are two special kinds of variables when modelling with LocalSolver: set variables and list variables. Sets are unordered, and therefore can be used the way you described. The point of using sets instead of boolean variables appears when you use more structural expressions on them such as partition, disjoint, cover, count etc. If you use a set variable but right after you create all the boolean expressions with “contains”, there is no point in using set variables. However, if you do not need to explicitly have all boolean expressions, sets can be very powerful in both modelling and solving problems. A very good example if the bin packing problem which can be found here: https://www.localsolver.com/docs/last/exampletour/binpacking.html. You can also take a look at the capacitated facility location problem: https://www.localsolver.com/docs/last/exampletour/capacitated-facility-location-problem-cflp.html.

  • Q: How tomake a constraint that an array of lists is disjoint?

    Q:How tomake a constraint that an array of lists is disjoint? Example: x[0..9] <- list(30); constraint disjoint(x); A:Your example is correct. This means are all 10lists in x are pairwise disjoints.

  • Q: Is itpossible to define a union of disjoint lists?

    Q:Is itpossible to define a union of disjoint lists? Example: x[0..9] <- list(30); y[i in 0..4] <- union(x[i], x[2*i+1]); so that for [i in 0..4][k in 0..29] contains(y[i], k) == max(contains(x[i],k), contains(x[2*i+1], k)); A:It is not possible to create directly a"union" object, but you can mimic its behaviour using arrays. y[i in 0..4][k in 0..29] <- max(contains(x[i],k), contains(x[2*i+1], k);

  • Q:Is it possible too loop over elements of alist and use the values as indices?

    Q: Is it possible too loop over elements of alist and use the values as indices? Example: A[0..29] = inFile.readInt(); x <- list(30); // some constraints for x result <- sum[i in x](A[i]); maximize result; A:Yes, you can do this using variadic operators. In your example, you canwrite: A[0..29] = inFile.readInt(); x <- list(30); // some constraints for x result <- sum(x, i => A[i]); maximize result; A good use case of lambda functions can be found for instance in the CVRPproblem

  • Q:Is itpossible to define an intersection of lists?

    Q:Is itpossible to define an intersection of lists? Example: x[0..9] <- list(30); y[i in 0..4] <- intersection(x[i], x[2*i+1]); so that for [i in 0..4][k in 0..29] contains(y[i], k) == min(contains(x[i],k), contains(x[2*i+1], k)); A:You cannot build an "intersection"object, but you can implement a similar idea to 2. y[i in 0..4][k in 0..29] <- min(contains(x[i],k), contains(x[2*i+1], k);

  • Q:Set変数とlist変数について教えてください。

    Setとlistもまた、非常に差別化された強力な機能があり、モデルを簡潔かつスケーラブルにし、非常に効率的に解けます。 私の好きな例としては、ビン詰め問題とTSP問題です。です。 もし、もっと複雑なモデルを示したい場合は、CVRP問題を参照してください。多くの場合、Setとlistは、初めて見たときに同化することが困難です。通常、私がそれらを完全に紹介するには、多くの時間がかかるので、ご不明な点があればいつでもお問合せください。

  • Q:MIPソルバーとの違いは?

    A:LocalSolverには「中間変数」のようなものはありません。 意思決定変数と中間式という2つの重要な概念を区別しています。式は、意思決定変数から推論することができます。

  • Q:意思決定変数と中間式という2つの重要な概念を区別について詳細を教えてください

    A:MILPモデリングでは、 Mc Cormickの不等式を使用して、 2つの変数の積を表現します。 ただし、LocalSolverでは、 単に積を直接x * yと書けばよいのです。 (追加の意思決定を導入する必要はありません)。 より完全な例を挙げると、 私はよく施設配置問題をよく使用します。 この場合、LocalSolverモデルには、 開始位置の変数(opening location variable)だけ を必要とします。 オープンな位置から推測される 割り当てのための変数は必要ありません。

  • Q:デスクトップライセンスとサーバーライセンスの違いを教えてください。

    A:デスクトップライセンスは1ライセンスで、同時使用として1台の物理的コンピュータ上でのLocalSolverを使用できます。 サーバーライセンスは仮想環境およびクラウド環境に対応しているライセンスです。(GCP、AWS、EC2、Dockerなど)1ライセンスで1サーバにインストールすることが可能です。 どちらのライセンスも1ライセンスで同時に1つの問題を解くことが可能です。

  • Q: GPUの活用について

    A:LocalSolverはGPUを使用しません。

  • Q:[optimalitygap]: aa.aa%と出力されるのですが、これの意味は何になりますか?理想値とのずれ、であればこれが0になるまで繰り返し計算を続けるのがいいのでしょうか

    A: MIP問題の場合、現時点の整数解と緩和LP解とのずれです。 この場合、0にならないこともあります。 打ち切るまでの判断は、個々のモデルに依存するので、 通常、何らかの終了基準を設けます。

bottom of page