Expressing a chain of boolean ORs using ILPHow to determine if a given problem seems to be a good fit to be solved using combinatorial Benders decompositionHow to reduce recursion when using Gomory cutting planes to solve an integer program?Difference between lazy callbacks and using lazy constraints directlyTightness of an LP relaxation without using objective functionHow to linearize a constraint with a maximum of binary variables times some coefficient in the right-hand-sideBin Packing with Relational PenalizationHow to formulate this scheduling problem efficiently?How to reformulate (linearize/convexify) a budgeted assignment problem?Static stochastic knapsack problem: unbounded version

What are the advantages of this gold finger shape?

What is the purpose/function of this power inductor in parallel?

Setting up a Mathematical Institute of Refereeing?

Is Fourier series a sampled version of Fourier transform?

Why does "auf der Strecke bleiben" mean "to fall by the wayside"?

Physical Interpretation of an Overdamped Pendulum

If a person claims to know anything could it be disproven by saying 'prove that we are not in a simulation'?

What allows us to use imaginary numbers?

What is the question mark?

Has the speed of light ever been measured in vacuum?

What should I do if actually I found a serious flaw in someone's PhD thesis and an article derived from that PhD thesis?

What is the opposite of "hunger level"?

Attacking the Hydra

What is the hottest thing in the universe?

Why do so many people play out of turn on the last lead?

When does The Truman Show take place?

100 Years of GCHQ - A quick afternoon puzzle!

Are there liquid fueled rocket boosters having coaxial fuel/oxidizer tanks?

What should I do with the stock I own if I anticipate there will be a recession?

What does 〇〇〇〇 mean when combined with おじさん?

Set theory with antielements?

How does the Moon's gravity affect Earth's oceans despite Earth's stronger gravitational pull?

Scam? Phone call from "Department of Social Security" asking me to call back

How do I answer an interview question about how to handle a hard deadline I won't be able to meet?



Expressing a chain of boolean ORs using ILP


How to determine if a given problem seems to be a good fit to be solved using combinatorial Benders decompositionHow to reduce recursion when using Gomory cutting planes to solve an integer program?Difference between lazy callbacks and using lazy constraints directlyTightness of an LP relaxation without using objective functionHow to linearize a constraint with a maximum of binary variables times some coefficient in the right-hand-sideBin Packing with Relational PenalizationHow to formulate this scheduling problem efficiently?How to reformulate (linearize/convexify) a budgeted assignment problem?Static stochastic knapsack problem: unbounded version













9












$begingroup$


How to express a chain of OR operations in an ILP in which each expression is a less than or equal constraint and the left hand side variable in all inequalities is always the same? All the variables are binary.



For example, I would like to express $x_1 leq x_3$ OR $x_1 leq x_4$ OR $x_1 leq x_6$. Notice the first variable in all the inequality constraints is $x_1$.










share|improve this question









New contributor



ephemeral is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






$endgroup$


















    9












    $begingroup$


    How to express a chain of OR operations in an ILP in which each expression is a less than or equal constraint and the left hand side variable in all inequalities is always the same? All the variables are binary.



    For example, I would like to express $x_1 leq x_3$ OR $x_1 leq x_4$ OR $x_1 leq x_6$. Notice the first variable in all the inequality constraints is $x_1$.










    share|improve this question









    New contributor



    ephemeral is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.






    $endgroup$
















      9












      9








      9


      1



      $begingroup$


      How to express a chain of OR operations in an ILP in which each expression is a less than or equal constraint and the left hand side variable in all inequalities is always the same? All the variables are binary.



      For example, I would like to express $x_1 leq x_3$ OR $x_1 leq x_4$ OR $x_1 leq x_6$. Notice the first variable in all the inequality constraints is $x_1$.










      share|improve this question









      New contributor



      ephemeral is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      $endgroup$




      How to express a chain of OR operations in an ILP in which each expression is a less than or equal constraint and the left hand side variable in all inequalities is always the same? All the variables are binary.



      For example, I would like to express $x_1 leq x_3$ OR $x_1 leq x_4$ OR $x_1 leq x_6$. Notice the first variable in all the inequality constraints is $x_1$.







      optimization modeling integer-programming






      share|improve this question









      New contributor



      ephemeral is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.










      share|improve this question









      New contributor



      ephemeral is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.








      share|improve this question




      share|improve this question








      edited 7 hours ago









      Oguz Toragay

      2,2472 silver badges26 bronze badges




      2,2472 silver badges26 bronze badges






      New contributor



      ephemeral is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.








      asked 8 hours ago









      ephemeralephemeral

      462 bronze badges




      462 bronze badges




      New contributor



      ephemeral is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.




      New contributor




      ephemeral is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.

























          2 Answers
          2






          active

          oldest

          votes


















          8












          $begingroup$

          Your example constraint is equivalent to $x_1 le textmax(x_3,x_4,x_6)$, which I will generalize to $x_1 le max(x_2,ldots,x_n)$.



          This max can be handled using section 2.6 "Logical OR" of FICO MIP formulations and linearizations: Quick reference.



          Specifically, introduce a binary variable, $d$, to be constrained as follows so that it will be equal to $textmax(x_2,ldots,x_n)$



          beginalignd &ge x_i, quad i=2,ldots, n\d &le sumlimits_i=2^n x_iendalign



          Now add the constraint: $x_1 le d$.






          share|improve this answer











          $endgroup$










          • 1




            $begingroup$
            @TheSimpliFire Re: your edit. Centering constraints is o.k., but I prefer my dots at "ground level" rather than in the middle of the air. I think my way is far more common.
            $endgroup$
            – Mark L. Stone
            7 hours ago







          • 1




            $begingroup$
            Right, changed from cdots to ldots, rather than ...
            $endgroup$
            – TheSimpliFire
            7 hours ago






          • 2




            $begingroup$
            Note that if you are not interested in the variable $d$ itself, you can eliminate the variable to obtain $x_1 le sum_i=2^n x_i$ as in Rob Pratt's answer.
            $endgroup$
            – Kevin Dalmeijer
            5 hours ago










          • $begingroup$
            @Kevin Dalmeijer Yes indeedy.
            $endgroup$
            – Mark L. Stone
            5 hours ago


















          8












          $begingroup$

          Derivation via conjunctive normal form:
          beginequation
          x_1 implies underseti=2overset nlor x_i \
          neg x_1 bigvee underseti=2overset nlor x_i \
          1 - x_1 + sum_i=2^n x_i ge 1 \
          x_1 le sum_i=2^n x_i
          endequation






          share|improve this answer











          $endgroup$

















            Your Answer








            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "700"
            ;
            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',
            autoActivateHeartbeat: false,
            convertImagesToLinks: false,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            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
            );



            );






            ephemeral is a new contributor. Be nice, and check out our Code of Conduct.









            draft saved

            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2for.stackexchange.com%2fquestions%2f1300%2fexpressing-a-chain-of-boolean-ors-using-ilp%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            8












            $begingroup$

            Your example constraint is equivalent to $x_1 le textmax(x_3,x_4,x_6)$, which I will generalize to $x_1 le max(x_2,ldots,x_n)$.



            This max can be handled using section 2.6 "Logical OR" of FICO MIP formulations and linearizations: Quick reference.



            Specifically, introduce a binary variable, $d$, to be constrained as follows so that it will be equal to $textmax(x_2,ldots,x_n)$



            beginalignd &ge x_i, quad i=2,ldots, n\d &le sumlimits_i=2^n x_iendalign



            Now add the constraint: $x_1 le d$.






            share|improve this answer











            $endgroup$










            • 1




              $begingroup$
              @TheSimpliFire Re: your edit. Centering constraints is o.k., but I prefer my dots at "ground level" rather than in the middle of the air. I think my way is far more common.
              $endgroup$
              – Mark L. Stone
              7 hours ago







            • 1




              $begingroup$
              Right, changed from cdots to ldots, rather than ...
              $endgroup$
              – TheSimpliFire
              7 hours ago






            • 2




              $begingroup$
              Note that if you are not interested in the variable $d$ itself, you can eliminate the variable to obtain $x_1 le sum_i=2^n x_i$ as in Rob Pratt's answer.
              $endgroup$
              – Kevin Dalmeijer
              5 hours ago










            • $begingroup$
              @Kevin Dalmeijer Yes indeedy.
              $endgroup$
              – Mark L. Stone
              5 hours ago















            8












            $begingroup$

            Your example constraint is equivalent to $x_1 le textmax(x_3,x_4,x_6)$, which I will generalize to $x_1 le max(x_2,ldots,x_n)$.



            This max can be handled using section 2.6 "Logical OR" of FICO MIP formulations and linearizations: Quick reference.



            Specifically, introduce a binary variable, $d$, to be constrained as follows so that it will be equal to $textmax(x_2,ldots,x_n)$



            beginalignd &ge x_i, quad i=2,ldots, n\d &le sumlimits_i=2^n x_iendalign



            Now add the constraint: $x_1 le d$.






            share|improve this answer











            $endgroup$










            • 1




              $begingroup$
              @TheSimpliFire Re: your edit. Centering constraints is o.k., but I prefer my dots at "ground level" rather than in the middle of the air. I think my way is far more common.
              $endgroup$
              – Mark L. Stone
              7 hours ago







            • 1




              $begingroup$
              Right, changed from cdots to ldots, rather than ...
              $endgroup$
              – TheSimpliFire
              7 hours ago






            • 2




              $begingroup$
              Note that if you are not interested in the variable $d$ itself, you can eliminate the variable to obtain $x_1 le sum_i=2^n x_i$ as in Rob Pratt's answer.
              $endgroup$
              – Kevin Dalmeijer
              5 hours ago










            • $begingroup$
              @Kevin Dalmeijer Yes indeedy.
              $endgroup$
              – Mark L. Stone
              5 hours ago













            8












            8








            8





            $begingroup$

            Your example constraint is equivalent to $x_1 le textmax(x_3,x_4,x_6)$, which I will generalize to $x_1 le max(x_2,ldots,x_n)$.



            This max can be handled using section 2.6 "Logical OR" of FICO MIP formulations and linearizations: Quick reference.



            Specifically, introduce a binary variable, $d$, to be constrained as follows so that it will be equal to $textmax(x_2,ldots,x_n)$



            beginalignd &ge x_i, quad i=2,ldots, n\d &le sumlimits_i=2^n x_iendalign



            Now add the constraint: $x_1 le d$.






            share|improve this answer











            $endgroup$



            Your example constraint is equivalent to $x_1 le textmax(x_3,x_4,x_6)$, which I will generalize to $x_1 le max(x_2,ldots,x_n)$.



            This max can be handled using section 2.6 "Logical OR" of FICO MIP formulations and linearizations: Quick reference.



            Specifically, introduce a binary variable, $d$, to be constrained as follows so that it will be equal to $textmax(x_2,ldots,x_n)$



            beginalignd &ge x_i, quad i=2,ldots, n\d &le sumlimits_i=2^n x_iendalign



            Now add the constraint: $x_1 le d$.







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited 5 hours ago









            Kevin Dalmeijer

            1,8945 silver badges24 bronze badges




            1,8945 silver badges24 bronze badges










            answered 7 hours ago









            Mark L. StoneMark L. Stone

            3,3077 silver badges27 bronze badges




            3,3077 silver badges27 bronze badges










            • 1




              $begingroup$
              @TheSimpliFire Re: your edit. Centering constraints is o.k., but I prefer my dots at "ground level" rather than in the middle of the air. I think my way is far more common.
              $endgroup$
              – Mark L. Stone
              7 hours ago







            • 1




              $begingroup$
              Right, changed from cdots to ldots, rather than ...
              $endgroup$
              – TheSimpliFire
              7 hours ago






            • 2




              $begingroup$
              Note that if you are not interested in the variable $d$ itself, you can eliminate the variable to obtain $x_1 le sum_i=2^n x_i$ as in Rob Pratt's answer.
              $endgroup$
              – Kevin Dalmeijer
              5 hours ago










            • $begingroup$
              @Kevin Dalmeijer Yes indeedy.
              $endgroup$
              – Mark L. Stone
              5 hours ago












            • 1




              $begingroup$
              @TheSimpliFire Re: your edit. Centering constraints is o.k., but I prefer my dots at "ground level" rather than in the middle of the air. I think my way is far more common.
              $endgroup$
              – Mark L. Stone
              7 hours ago







            • 1




              $begingroup$
              Right, changed from cdots to ldots, rather than ...
              $endgroup$
              – TheSimpliFire
              7 hours ago






            • 2




              $begingroup$
              Note that if you are not interested in the variable $d$ itself, you can eliminate the variable to obtain $x_1 le sum_i=2^n x_i$ as in Rob Pratt's answer.
              $endgroup$
              – Kevin Dalmeijer
              5 hours ago










            • $begingroup$
              @Kevin Dalmeijer Yes indeedy.
              $endgroup$
              – Mark L. Stone
              5 hours ago







            1




            1




            $begingroup$
            @TheSimpliFire Re: your edit. Centering constraints is o.k., but I prefer my dots at "ground level" rather than in the middle of the air. I think my way is far more common.
            $endgroup$
            – Mark L. Stone
            7 hours ago





            $begingroup$
            @TheSimpliFire Re: your edit. Centering constraints is o.k., but I prefer my dots at "ground level" rather than in the middle of the air. I think my way is far more common.
            $endgroup$
            – Mark L. Stone
            7 hours ago





            1




            1




            $begingroup$
            Right, changed from cdots to ldots, rather than ...
            $endgroup$
            – TheSimpliFire
            7 hours ago




            $begingroup$
            Right, changed from cdots to ldots, rather than ...
            $endgroup$
            – TheSimpliFire
            7 hours ago




            2




            2




            $begingroup$
            Note that if you are not interested in the variable $d$ itself, you can eliminate the variable to obtain $x_1 le sum_i=2^n x_i$ as in Rob Pratt's answer.
            $endgroup$
            – Kevin Dalmeijer
            5 hours ago




            $begingroup$
            Note that if you are not interested in the variable $d$ itself, you can eliminate the variable to obtain $x_1 le sum_i=2^n x_i$ as in Rob Pratt's answer.
            $endgroup$
            – Kevin Dalmeijer
            5 hours ago












            $begingroup$
            @Kevin Dalmeijer Yes indeedy.
            $endgroup$
            – Mark L. Stone
            5 hours ago




            $begingroup$
            @Kevin Dalmeijer Yes indeedy.
            $endgroup$
            – Mark L. Stone
            5 hours ago











            8












            $begingroup$

            Derivation via conjunctive normal form:
            beginequation
            x_1 implies underseti=2overset nlor x_i \
            neg x_1 bigvee underseti=2overset nlor x_i \
            1 - x_1 + sum_i=2^n x_i ge 1 \
            x_1 le sum_i=2^n x_i
            endequation






            share|improve this answer











            $endgroup$



















              8












              $begingroup$

              Derivation via conjunctive normal form:
              beginequation
              x_1 implies underseti=2overset nlor x_i \
              neg x_1 bigvee underseti=2overset nlor x_i \
              1 - x_1 + sum_i=2^n x_i ge 1 \
              x_1 le sum_i=2^n x_i
              endequation






              share|improve this answer











              $endgroup$

















                8












                8








                8





                $begingroup$

                Derivation via conjunctive normal form:
                beginequation
                x_1 implies underseti=2overset nlor x_i \
                neg x_1 bigvee underseti=2overset nlor x_i \
                1 - x_1 + sum_i=2^n x_i ge 1 \
                x_1 le sum_i=2^n x_i
                endequation






                share|improve this answer











                $endgroup$



                Derivation via conjunctive normal form:
                beginequation
                x_1 implies underseti=2overset nlor x_i \
                neg x_1 bigvee underseti=2overset nlor x_i \
                1 - x_1 + sum_i=2^n x_i ge 1 \
                x_1 le sum_i=2^n x_i
                endequation







                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited 3 hours ago









                TheSimpliFire

                1,9826 silver badges38 bronze badges




                1,9826 silver badges38 bronze badges










                answered 6 hours ago









                Rob PrattRob Pratt

                9321 silver badge9 bronze badges




                9321 silver badge9 bronze badges























                    ephemeral is a new contributor. Be nice, and check out our Code of Conduct.









                    draft saved

                    draft discarded


















                    ephemeral is a new contributor. Be nice, and check out our Code of Conduct.












                    ephemeral is a new contributor. Be nice, and check out our Code of Conduct.











                    ephemeral is a new contributor. Be nice, and check out our Code of Conduct.














                    Thanks for contributing an answer to Operations Research 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.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2for.stackexchange.com%2fquestions%2f1300%2fexpressing-a-chain-of-boolean-ors-using-ilp%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

                    Canceling a color specificationRandomly assigning color to Graphics3D objects?Default color for Filling in Mathematica 9Coloring specific elements of sets with a prime modified order in an array plotHow to pick a color differing significantly from the colors already in a given color list?Detection of the text colorColor numbers based on their valueCan color schemes for use with ColorData include opacity specification?My dynamic color schemes

                    Invision Community Contents History See also References External links Navigation menuProprietaryinvisioncommunity.comIPS Community ForumsIPS Community Forumsthis blog entry"License Changes, IP.Board 3.4, and the Future""Interview -- Matt Mecham of Ibforums""CEO Invision Power Board, Matt Mecham Is a Liar, Thief!"IPB License Explanation 1.3, 1.3.1, 2.0, and 2.1ArchivedSecurity Fixes, Updates And Enhancements For IPB 1.3.1Archived"New Demo Accounts - Invision Power Services"the original"New Default Skin"the original"Invision Power Board 3.0.0 and Applications Released"the original"Archived copy"the original"Perpetual licenses being done away with""Release Notes - Invision Power Services""Introducing: IPS Community Suite 4!"Invision Community Release Notes

                    François Viète Contents Biography Work and thought Bibliography See also Notes Further reading External links Navigation menup. 21Google Bookspp. 75–77Google BooksDe thou (from University of Saint Andrews)ArchivedGoogle BooksGoogle BooksGoogle BooksGoogle booksGoogle Bookscc-parthenay.frL'histoire universelle (fr)Universal History (en)ArchivedAdsabs.harvard.eduPagesperso-orange.frArchive.orgChikara Sasaki. Descartes' mathematical thought p.259Google BooksGoogle BooksGoogle Bookspp. 152 and onwardGoogle BooksGoogle BooksScribd.comGoogle Books1257-7979Google BooksGoogle BooksGoogle BooksGoogle BooksGoogle BooksGoogle BooksGallica.bnf.frGoogle BooksGoogle Books"François Viète"Francois Viète: Father of Modern Algebraic NotationThe Lawyer and the GamblerAbout TarporleySite de Jean-Paul GuichardL'algèbre nouvelle"About the Harmonicon"cb120511976(data)1188044800000 0001 0913 5903n82164680ola2013766880073431702w6vt1sb70287374827140948071409480