Reducing data sparsity in linear integer programming

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
-1
down vote

favorite












I have following decision variables and constrains in my ILP model. Resolution time of CPLEX solver grows exponentially with respect to problem space getting larger. Is that solely because 4D matrix of decision variables and are there any recommended performance tuning approaches to overcome this?



string V = "A","B";
string K = "Y","Z";

dvar boolean X[V][K];
dvar boolean Y[V][V][K][K];

subject to


forall(i,j in V,u,v in K) Y[i][j][u][v]<=X[i][u] ;
forall(i,j in V,u,v in K) Y[i][j][u][v]<=X[j][v];
forall(i,j in V,u,v in K) Y[i][j][u][v]>=X[i][u]+X[j][v]-1;


assert forall(i,j in V,u,v in K) Y[i][j][u][v]==X[i][u]*X[j][v];






share|cite|improve this question


























    up vote
    -1
    down vote

    favorite












    I have following decision variables and constrains in my ILP model. Resolution time of CPLEX solver grows exponentially with respect to problem space getting larger. Is that solely because 4D matrix of decision variables and are there any recommended performance tuning approaches to overcome this?



    string V = "A","B";
    string K = "Y","Z";

    dvar boolean X[V][K];
    dvar boolean Y[V][V][K][K];

    subject to


    forall(i,j in V,u,v in K) Y[i][j][u][v]<=X[i][u] ;
    forall(i,j in V,u,v in K) Y[i][j][u][v]<=X[j][v];
    forall(i,j in V,u,v in K) Y[i][j][u][v]>=X[i][u]+X[j][v]-1;


    assert forall(i,j in V,u,v in K) Y[i][j][u][v]==X[i][u]*X[j][v];






    share|cite|improve this question
























      up vote
      -1
      down vote

      favorite









      up vote
      -1
      down vote

      favorite











      I have following decision variables and constrains in my ILP model. Resolution time of CPLEX solver grows exponentially with respect to problem space getting larger. Is that solely because 4D matrix of decision variables and are there any recommended performance tuning approaches to overcome this?



      string V = "A","B";
      string K = "Y","Z";

      dvar boolean X[V][K];
      dvar boolean Y[V][V][K][K];

      subject to


      forall(i,j in V,u,v in K) Y[i][j][u][v]<=X[i][u] ;
      forall(i,j in V,u,v in K) Y[i][j][u][v]<=X[j][v];
      forall(i,j in V,u,v in K) Y[i][j][u][v]>=X[i][u]+X[j][v]-1;


      assert forall(i,j in V,u,v in K) Y[i][j][u][v]==X[i][u]*X[j][v];






      share|cite|improve this question














      I have following decision variables and constrains in my ILP model. Resolution time of CPLEX solver grows exponentially with respect to problem space getting larger. Is that solely because 4D matrix of decision variables and are there any recommended performance tuning approaches to overcome this?



      string V = "A","B";
      string K = "Y","Z";

      dvar boolean X[V][K];
      dvar boolean Y[V][V][K][K];

      subject to


      forall(i,j in V,u,v in K) Y[i][j][u][v]<=X[i][u] ;
      forall(i,j in V,u,v in K) Y[i][j][u][v]<=X[j][v];
      forall(i,j in V,u,v in K) Y[i][j][u][v]>=X[i][u]+X[j][v]-1;


      assert forall(i,j in V,u,v in K) Y[i][j][u][v]==X[i][u]*X[j][v];








      share|cite|improve this question













      share|cite|improve this question




      share|cite|improve this question








      edited Aug 29 at 10:47

























      asked Aug 29 at 10:32









      Malith

      12




      12




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          0
          down vote













          You can delete the last set of constraints (forall(i,j in V,u,v in K) Y[i][j][u][v]==X[i][u]*X[j][v];) because it is already expressed by the first three sets of constraints due to the X and Y variables being binary.






          share|cite|improve this answer




















          • That is needed to derive Y from X. Which is Y=X*X
            – Malith
            Aug 29 at 14:33










          • No, as I said, the first few sets of constraints implies that Y=X*X. There is no need to add this as a constraint.
            – YukiJ
            Aug 29 at 14:48










          • Yes you are right. I removed the line but the execution time of the solver remains the same.
            – Malith
            Aug 29 at 15:06










          • @Malith what is the objective function you are maximizing/minimizing?
            – YukiJ
            Aug 30 at 7:03










          • It is to maximize (E - e) with constrain $$ e >= sum_k=1^Np sum_u x(i,u) + sum_k=1^Np-1 sum_u,v y(i_k,i_k+1),(u,v) ~~~~~~~~~~~~~~~~~ ∀p∈ G $$
            – Malith
            Aug 31 at 12:56










          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: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          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%2f2898219%2freducing-data-sparsity-in-linear-integer-programming%23new-answer', 'question_page');

          );

          Post as a guest






























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          0
          down vote













          You can delete the last set of constraints (forall(i,j in V,u,v in K) Y[i][j][u][v]==X[i][u]*X[j][v];) because it is already expressed by the first three sets of constraints due to the X and Y variables being binary.






          share|cite|improve this answer




















          • That is needed to derive Y from X. Which is Y=X*X
            – Malith
            Aug 29 at 14:33










          • No, as I said, the first few sets of constraints implies that Y=X*X. There is no need to add this as a constraint.
            – YukiJ
            Aug 29 at 14:48










          • Yes you are right. I removed the line but the execution time of the solver remains the same.
            – Malith
            Aug 29 at 15:06










          • @Malith what is the objective function you are maximizing/minimizing?
            – YukiJ
            Aug 30 at 7:03










          • It is to maximize (E - e) with constrain $$ e >= sum_k=1^Np sum_u x(i,u) + sum_k=1^Np-1 sum_u,v y(i_k,i_k+1),(u,v) ~~~~~~~~~~~~~~~~~ ∀p∈ G $$
            – Malith
            Aug 31 at 12:56














          up vote
          0
          down vote













          You can delete the last set of constraints (forall(i,j in V,u,v in K) Y[i][j][u][v]==X[i][u]*X[j][v];) because it is already expressed by the first three sets of constraints due to the X and Y variables being binary.






          share|cite|improve this answer




















          • That is needed to derive Y from X. Which is Y=X*X
            – Malith
            Aug 29 at 14:33










          • No, as I said, the first few sets of constraints implies that Y=X*X. There is no need to add this as a constraint.
            – YukiJ
            Aug 29 at 14:48










          • Yes you are right. I removed the line but the execution time of the solver remains the same.
            – Malith
            Aug 29 at 15:06










          • @Malith what is the objective function you are maximizing/minimizing?
            – YukiJ
            Aug 30 at 7:03










          • It is to maximize (E - e) with constrain $$ e >= sum_k=1^Np sum_u x(i,u) + sum_k=1^Np-1 sum_u,v y(i_k,i_k+1),(u,v) ~~~~~~~~~~~~~~~~~ ∀p∈ G $$
            – Malith
            Aug 31 at 12:56












          up vote
          0
          down vote










          up vote
          0
          down vote









          You can delete the last set of constraints (forall(i,j in V,u,v in K) Y[i][j][u][v]==X[i][u]*X[j][v];) because it is already expressed by the first three sets of constraints due to the X and Y variables being binary.






          share|cite|improve this answer












          You can delete the last set of constraints (forall(i,j in V,u,v in K) Y[i][j][u][v]==X[i][u]*X[j][v];) because it is already expressed by the first three sets of constraints due to the X and Y variables being binary.







          share|cite|improve this answer












          share|cite|improve this answer



          share|cite|improve this answer










          answered Aug 29 at 12:09









          YukiJ

          1,6752624




          1,6752624











          • That is needed to derive Y from X. Which is Y=X*X
            – Malith
            Aug 29 at 14:33










          • No, as I said, the first few sets of constraints implies that Y=X*X. There is no need to add this as a constraint.
            – YukiJ
            Aug 29 at 14:48










          • Yes you are right. I removed the line but the execution time of the solver remains the same.
            – Malith
            Aug 29 at 15:06










          • @Malith what is the objective function you are maximizing/minimizing?
            – YukiJ
            Aug 30 at 7:03










          • It is to maximize (E - e) with constrain $$ e >= sum_k=1^Np sum_u x(i,u) + sum_k=1^Np-1 sum_u,v y(i_k,i_k+1),(u,v) ~~~~~~~~~~~~~~~~~ ∀p∈ G $$
            – Malith
            Aug 31 at 12:56
















          • That is needed to derive Y from X. Which is Y=X*X
            – Malith
            Aug 29 at 14:33










          • No, as I said, the first few sets of constraints implies that Y=X*X. There is no need to add this as a constraint.
            – YukiJ
            Aug 29 at 14:48










          • Yes you are right. I removed the line but the execution time of the solver remains the same.
            – Malith
            Aug 29 at 15:06










          • @Malith what is the objective function you are maximizing/minimizing?
            – YukiJ
            Aug 30 at 7:03










          • It is to maximize (E - e) with constrain $$ e >= sum_k=1^Np sum_u x(i,u) + sum_k=1^Np-1 sum_u,v y(i_k,i_k+1),(u,v) ~~~~~~~~~~~~~~~~~ ∀p∈ G $$
            – Malith
            Aug 31 at 12:56















          That is needed to derive Y from X. Which is Y=X*X
          – Malith
          Aug 29 at 14:33




          That is needed to derive Y from X. Which is Y=X*X
          – Malith
          Aug 29 at 14:33












          No, as I said, the first few sets of constraints implies that Y=X*X. There is no need to add this as a constraint.
          – YukiJ
          Aug 29 at 14:48




          No, as I said, the first few sets of constraints implies that Y=X*X. There is no need to add this as a constraint.
          – YukiJ
          Aug 29 at 14:48












          Yes you are right. I removed the line but the execution time of the solver remains the same.
          – Malith
          Aug 29 at 15:06




          Yes you are right. I removed the line but the execution time of the solver remains the same.
          – Malith
          Aug 29 at 15:06












          @Malith what is the objective function you are maximizing/minimizing?
          – YukiJ
          Aug 30 at 7:03




          @Malith what is the objective function you are maximizing/minimizing?
          – YukiJ
          Aug 30 at 7:03












          It is to maximize (E - e) with constrain $$ e >= sum_k=1^Np sum_u x(i,u) + sum_k=1^Np-1 sum_u,v y(i_k,i_k+1),(u,v) ~~~~~~~~~~~~~~~~~ ∀p∈ G $$
          – Malith
          Aug 31 at 12:56




          It is to maximize (E - e) with constrain $$ e >= sum_k=1^Np sum_u x(i,u) + sum_k=1^Np-1 sum_u,v y(i_k,i_k+1),(u,v) ~~~~~~~~~~~~~~~~~ ∀p∈ G $$
          – Malith
          Aug 31 at 12:56

















           

          draft saved


          draft discarded















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2898219%2freducing-data-sparsity-in-linear-integer-programming%23new-answer', 'question_page');

          );

          Post as a guest













































































          這個網誌中的熱門文章

          How to combine Bézier curves to a surface?

          Mutual Information Always Non-negative

          Why am i infinitely getting the same tweet with the Twitter Search API?