Do redundant constraints help in big-M reformulation?











up vote
1
down vote

favorite












I am trying to reformulate an optimisation problem with unknown $x$ of dimension $Ktimes 1$ into a mixed-integer program using big-M transformation.





In this respect, among my constraints, I have that
$$
text{ $(star)$
for $i=1,...,21$: $r_i(x)=0$ $Rightarrow$ $l_{i,j}(x)=0$ for $j=1,...,8$}
$$

where $r_i, l_{i,j}$ are linear functions of $x$ mapping from $mathbb{R}^K$ to $mathbb{R}$.



Following the answers to my previous questions (e.g., here) $(star)$ can be rewritten introducing $3$ binary variables $gamma_{1,i,j},gamma_{2,i,j},gamma_{3,i,j}$ and a tolerance level $epsilon>0$



$$
begin{cases}
gamma_{1,i,j}=1Rightarrow r_i(x)leq -epsilon\
gamma_{3,i,j}=1Rightarrow r_i(x)geq epsilon\
gamma_{2,i,j}=1Rightarrow -epsilonleq r_i(x)leq epsilontext{, } l_{i,j}(x)=0\
gamma_{1,i,j}+gamma_{2,i,j}+gamma_{3,i,j}=1
end{cases}
$$



Now, the rewriting above means introducing $3*21$ binary variables. This, combined with my other constraints (that include many other big-M transformations), slow things down tremendously.





I have noticed that in my problem BY CONSTRUCTION there are some relations of the type
$$
r_i(x)=0 Rightarrow r_t(x)=0
$$

for some $i=1,...,8$, $t=1,...,8$ (these are not constraints; they just happen by construction).



Using the same logic as above, this can be rewritten
introducing $3$ binary variables $beta_{1,i},beta_{2,i},beta_{3,i}$ and a tolerance level $epsilon>0$



$$
begin{cases}
beta_{1,i}=1Rightarrow r_i(x)leq -epsilon\
beta_{3,i}=1Rightarrow r_i(x)geq epsilon\
beta_{2,i}=1Rightarrow -epsilonleq r_i(x)leq epsilontext{, } r_{t}(x)=0\
beta_{1,i}+beta_{2,i}+beta_{3,i}=1
end{cases}
$$





Question: does adding these additional constraints make the solver any faster? Or, since we are including even more binary variables, things get worse?










share|cite|improve this question




























    up vote
    1
    down vote

    favorite












    I am trying to reformulate an optimisation problem with unknown $x$ of dimension $Ktimes 1$ into a mixed-integer program using big-M transformation.





    In this respect, among my constraints, I have that
    $$
    text{ $(star)$
    for $i=1,...,21$: $r_i(x)=0$ $Rightarrow$ $l_{i,j}(x)=0$ for $j=1,...,8$}
    $$

    where $r_i, l_{i,j}$ are linear functions of $x$ mapping from $mathbb{R}^K$ to $mathbb{R}$.



    Following the answers to my previous questions (e.g., here) $(star)$ can be rewritten introducing $3$ binary variables $gamma_{1,i,j},gamma_{2,i,j},gamma_{3,i,j}$ and a tolerance level $epsilon>0$



    $$
    begin{cases}
    gamma_{1,i,j}=1Rightarrow r_i(x)leq -epsilon\
    gamma_{3,i,j}=1Rightarrow r_i(x)geq epsilon\
    gamma_{2,i,j}=1Rightarrow -epsilonleq r_i(x)leq epsilontext{, } l_{i,j}(x)=0\
    gamma_{1,i,j}+gamma_{2,i,j}+gamma_{3,i,j}=1
    end{cases}
    $$



    Now, the rewriting above means introducing $3*21$ binary variables. This, combined with my other constraints (that include many other big-M transformations), slow things down tremendously.





    I have noticed that in my problem BY CONSTRUCTION there are some relations of the type
    $$
    r_i(x)=0 Rightarrow r_t(x)=0
    $$

    for some $i=1,...,8$, $t=1,...,8$ (these are not constraints; they just happen by construction).



    Using the same logic as above, this can be rewritten
    introducing $3$ binary variables $beta_{1,i},beta_{2,i},beta_{3,i}$ and a tolerance level $epsilon>0$



    $$
    begin{cases}
    beta_{1,i}=1Rightarrow r_i(x)leq -epsilon\
    beta_{3,i}=1Rightarrow r_i(x)geq epsilon\
    beta_{2,i}=1Rightarrow -epsilonleq r_i(x)leq epsilontext{, } r_{t}(x)=0\
    beta_{1,i}+beta_{2,i}+beta_{3,i}=1
    end{cases}
    $$





    Question: does adding these additional constraints make the solver any faster? Or, since we are including even more binary variables, things get worse?










    share|cite|improve this question


























      up vote
      1
      down vote

      favorite









      up vote
      1
      down vote

      favorite











      I am trying to reformulate an optimisation problem with unknown $x$ of dimension $Ktimes 1$ into a mixed-integer program using big-M transformation.





      In this respect, among my constraints, I have that
      $$
      text{ $(star)$
      for $i=1,...,21$: $r_i(x)=0$ $Rightarrow$ $l_{i,j}(x)=0$ for $j=1,...,8$}
      $$

      where $r_i, l_{i,j}$ are linear functions of $x$ mapping from $mathbb{R}^K$ to $mathbb{R}$.



      Following the answers to my previous questions (e.g., here) $(star)$ can be rewritten introducing $3$ binary variables $gamma_{1,i,j},gamma_{2,i,j},gamma_{3,i,j}$ and a tolerance level $epsilon>0$



      $$
      begin{cases}
      gamma_{1,i,j}=1Rightarrow r_i(x)leq -epsilon\
      gamma_{3,i,j}=1Rightarrow r_i(x)geq epsilon\
      gamma_{2,i,j}=1Rightarrow -epsilonleq r_i(x)leq epsilontext{, } l_{i,j}(x)=0\
      gamma_{1,i,j}+gamma_{2,i,j}+gamma_{3,i,j}=1
      end{cases}
      $$



      Now, the rewriting above means introducing $3*21$ binary variables. This, combined with my other constraints (that include many other big-M transformations), slow things down tremendously.





      I have noticed that in my problem BY CONSTRUCTION there are some relations of the type
      $$
      r_i(x)=0 Rightarrow r_t(x)=0
      $$

      for some $i=1,...,8$, $t=1,...,8$ (these are not constraints; they just happen by construction).



      Using the same logic as above, this can be rewritten
      introducing $3$ binary variables $beta_{1,i},beta_{2,i},beta_{3,i}$ and a tolerance level $epsilon>0$



      $$
      begin{cases}
      beta_{1,i}=1Rightarrow r_i(x)leq -epsilon\
      beta_{3,i}=1Rightarrow r_i(x)geq epsilon\
      beta_{2,i}=1Rightarrow -epsilonleq r_i(x)leq epsilontext{, } r_{t}(x)=0\
      beta_{1,i}+beta_{2,i}+beta_{3,i}=1
      end{cases}
      $$





      Question: does adding these additional constraints make the solver any faster? Or, since we are including even more binary variables, things get worse?










      share|cite|improve this question















      I am trying to reformulate an optimisation problem with unknown $x$ of dimension $Ktimes 1$ into a mixed-integer program using big-M transformation.





      In this respect, among my constraints, I have that
      $$
      text{ $(star)$
      for $i=1,...,21$: $r_i(x)=0$ $Rightarrow$ $l_{i,j}(x)=0$ for $j=1,...,8$}
      $$

      where $r_i, l_{i,j}$ are linear functions of $x$ mapping from $mathbb{R}^K$ to $mathbb{R}$.



      Following the answers to my previous questions (e.g., here) $(star)$ can be rewritten introducing $3$ binary variables $gamma_{1,i,j},gamma_{2,i,j},gamma_{3,i,j}$ and a tolerance level $epsilon>0$



      $$
      begin{cases}
      gamma_{1,i,j}=1Rightarrow r_i(x)leq -epsilon\
      gamma_{3,i,j}=1Rightarrow r_i(x)geq epsilon\
      gamma_{2,i,j}=1Rightarrow -epsilonleq r_i(x)leq epsilontext{, } l_{i,j}(x)=0\
      gamma_{1,i,j}+gamma_{2,i,j}+gamma_{3,i,j}=1
      end{cases}
      $$



      Now, the rewriting above means introducing $3*21$ binary variables. This, combined with my other constraints (that include many other big-M transformations), slow things down tremendously.





      I have noticed that in my problem BY CONSTRUCTION there are some relations of the type
      $$
      r_i(x)=0 Rightarrow r_t(x)=0
      $$

      for some $i=1,...,8$, $t=1,...,8$ (these are not constraints; they just happen by construction).



      Using the same logic as above, this can be rewritten
      introducing $3$ binary variables $beta_{1,i},beta_{2,i},beta_{3,i}$ and a tolerance level $epsilon>0$



      $$
      begin{cases}
      beta_{1,i}=1Rightarrow r_i(x)leq -epsilon\
      beta_{3,i}=1Rightarrow r_i(x)geq epsilon\
      beta_{2,i}=1Rightarrow -epsilonleq r_i(x)leq epsilontext{, } r_{t}(x)=0\
      beta_{1,i}+beta_{2,i}+beta_{3,i}=1
      end{cases}
      $$





      Question: does adding these additional constraints make the solver any faster? Or, since we are including even more binary variables, things get worse?







      optimization nonlinear-optimization mixed-integer-programming






      share|cite|improve this question















      share|cite|improve this question













      share|cite|improve this question




      share|cite|improve this question








      edited Dec 3 at 17:47

























      asked Dec 3 at 12:31









      STF

      31420




      31420






















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          1
          down vote



          accepted










          I think the question of whether redundant constraints help is in general an empirical one. Sometimes they do, sometimes they don't. The extra binary variables might indeed slow things down, but they also might not.



          One concern I would have would be whether the $beta$ variables might "distract" the solver from focusing on other integer variables that perhaps would be more important. If I thought that were happening, I would try adding branching priorities (which at least some solvers let you supply). Branching priorities are basically weights assigned to the integer variables, such that the solver is encouraged/compelled to branch first on the variables with higher priority. Giving the $beta$ variables lower priorities would at least keep the solver focused on the other integer variables.






          share|cite|improve this answer





















            Your Answer





            StackExchange.ifUsing("editor", function () {
            return StackExchange.using("mathjaxEditing", function () {
            StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
            StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
            });
            });
            }, "mathjax-editing");

            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "69"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            noCode: true, onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3023993%2fdo-redundant-constraints-help-in-big-m-reformulation%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            1
            down vote



            accepted










            I think the question of whether redundant constraints help is in general an empirical one. Sometimes they do, sometimes they don't. The extra binary variables might indeed slow things down, but they also might not.



            One concern I would have would be whether the $beta$ variables might "distract" the solver from focusing on other integer variables that perhaps would be more important. If I thought that were happening, I would try adding branching priorities (which at least some solvers let you supply). Branching priorities are basically weights assigned to the integer variables, such that the solver is encouraged/compelled to branch first on the variables with higher priority. Giving the $beta$ variables lower priorities would at least keep the solver focused on the other integer variables.






            share|cite|improve this answer

























              up vote
              1
              down vote



              accepted










              I think the question of whether redundant constraints help is in general an empirical one. Sometimes they do, sometimes they don't. The extra binary variables might indeed slow things down, but they also might not.



              One concern I would have would be whether the $beta$ variables might "distract" the solver from focusing on other integer variables that perhaps would be more important. If I thought that were happening, I would try adding branching priorities (which at least some solvers let you supply). Branching priorities are basically weights assigned to the integer variables, such that the solver is encouraged/compelled to branch first on the variables with higher priority. Giving the $beta$ variables lower priorities would at least keep the solver focused on the other integer variables.






              share|cite|improve this answer























                up vote
                1
                down vote



                accepted







                up vote
                1
                down vote



                accepted






                I think the question of whether redundant constraints help is in general an empirical one. Sometimes they do, sometimes they don't. The extra binary variables might indeed slow things down, but they also might not.



                One concern I would have would be whether the $beta$ variables might "distract" the solver from focusing on other integer variables that perhaps would be more important. If I thought that were happening, I would try adding branching priorities (which at least some solvers let you supply). Branching priorities are basically weights assigned to the integer variables, such that the solver is encouraged/compelled to branch first on the variables with higher priority. Giving the $beta$ variables lower priorities would at least keep the solver focused on the other integer variables.






                share|cite|improve this answer












                I think the question of whether redundant constraints help is in general an empirical one. Sometimes they do, sometimes they don't. The extra binary variables might indeed slow things down, but they also might not.



                One concern I would have would be whether the $beta$ variables might "distract" the solver from focusing on other integer variables that perhaps would be more important. If I thought that were happening, I would try adding branching priorities (which at least some solvers let you supply). Branching priorities are basically weights assigned to the integer variables, such that the solver is encouraged/compelled to branch first on the variables with higher priority. Giving the $beta$ variables lower priorities would at least keep the solver focused on the other integer variables.







                share|cite|improve this answer












                share|cite|improve this answer



                share|cite|improve this answer










                answered Dec 4 at 21:08









                prubin

                1,345125




                1,345125






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Mathematics Stack Exchange!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    Use MathJax to format equations. MathJax reference.


                    To learn more, see our tips on writing great answers.





                    Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                    Please pay close attention to the following guidance:


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3023993%2fdo-redundant-constraints-help-in-big-m-reformulation%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Bressuire

                    Cabo Verde

                    Gyllenstierna