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

Requesting a new type of variable introduction

回答済み

コメント

5件のコメント

  • 正式なコメント
    Simranjit Kaur
    • Gurobi Staff
    This post is more than three years old. Some information may not be up to date. For current information, please check the Gurobi Documentation or Knowledge Base. If you need more help, please create a new post in the community forum, or try Gurobot, our chatbot interface offering instant, expert-level support.
  • David Torres Sanchez
    • Gurobi Staff

    Hi Santanu,

    You can model "Bucket" variables with fixed step sizes by adding an integer variable and a multiple.
    E.g. say \(x\in\{3,6,9\}\) you can model this with an integer variable \(z\in\{1,2,3\}\) and have \(x=3z\).

    Cheers, 
    David

    0
  • Santanu Banerjee
    • Gurobi-versary
    • First Comment
    • First Question

    Unfortunately, I don't have a linear formula for this. The formula for getting the Integer cluster which are the only one's to be used in the variable is a very complex non-linear equation involving square-root, floor and the functions value for the term just before it. Therefore I would be separately computing it and then using those results as possible "Bucket Variable Values".

    I have thought of major options and have understood that it is necessary I use a variable which uses a select few numbers only (which in my case are positive integers). Therefore I am unable to model this presently in Gurobi which is my first choice since I am sure that I would be able to solve huge problems till optimality which is not possible in case of other solvers.

    From my basic understanding, this would be essentially similar to a Binary Variable just that the user would be able to define the list of values from among which the variable must take its values.

    0
  • Jonasz Staszek
    • Community Moderator
    • Gurobi-versary
    • Thought Leader
    • First Question

    Hi Santanu,

    I am afraid that the change you request would take a lot of time, and many of the algorithms Gurobi uses would not be as efficient as they are for binary programs.

    As a workaround, you could try using indicator variables and constraints (I discussed a bunch of somewhat similar cases here and here), but my intuition tells me that the performance of Gurobi would take a hit if you wanted to use this logic for larger models.

    Perhaps someone from Gurobi development team can comment further?

    Best regards
    Jonasz

    0
  • David Torres Sanchez
    • Gurobi Staff

    Hi again Santanu,

    This feature will be considered if more people would like this.

    Cheers, 
    David

    0

投稿コメントは受け付けていません。