メインコンテンツへスキップ

About PoolSearchMode

回答済み

コメント

1件のコメント

  • Gurobot AI-generated response
    Gurobi Staff Gurobi Staff

    To collect a diverse set of feasible solutions in Gurobi, including both high-quality and lower-quality ones, you can utilize the Solution Pool feature. The behavior you're observing with PoolSearchMode is influenced by how Gurobi is configured to search for and store these solutions. Here's how you can adjust your settings to gather a broader spectrum of solutions:

    1. PoolSearchMode: This parameter controls how the solution pool is populated. You've noted the behaviors of values 1 and 2, where 1 focuses on finding more solutions quickly without necessarily optimizing for quality, and 2 focuses on finding solutions that are close to the best found solution. To gather both high-quality and lower-quality solutions:

      • Consider running your optimization with PoolSearchMode set to 1 initially to populate the pool with a broad set of solutions.
      • Then, in a separate run, use PoolSearchMode set to 2 to refine the pool with higher-quality solutions. This two-step approach can help balance between quantity and quality of solutions.
    2. PoolSolutions: Increase the PoolSolutions parameter to specify the maximum number of solutions to be stored in the solution pool. The default is 10, but you can increase this to collect more solutions. Keep in mind that increasing this number can also increase the memory usage and potentially the computation time.

    3. PoolGap: Set the PoolGap parameter to specify the maximum relative gap allowed between the best solution found and the worst solution in the solution pool. By setting a higher gap, you allow Gurobi to keep solutions that are worse compared to the best solution.

    4. Iterative Approach: Another strategy is to use an iterative approach where you solve the model multiple times, each time adding a constraint to exclude the previously found solutions or to push the search towards different regions of the solution space. This can be more manual but allows for customized exploration of the solution space.

    5. Custom Heuristics: For very specific needs or complex models, implementing custom heuristics using callbacks can be a powerful way to guide the search process toward or away from certain areas of the solution space.

    Remember, collecting a wide range of solutions can significantly increase the computational time and memory requirements, especially for large-scale problems. It's a good practice to start with a smaller, manageable set of parameters and gradually adjust them based on the results and performance observed.

    0

サインインしてコメントを残してください。