linearization of objective functionHow to linearize the product of a binary and a non-negative continuous variable?Simplest way to eliminate redundant constraints due to a new cutVariable bounds in column generationHow to formulate maximum function in a constraint?Is my approach to my internship project good? Optimal allocation of product across stores, constrained optimizationQA techniques for optimization problem codingFormulation of a constraint in a MIP for an element in different SetsHow to formulate this scheduling problem efficiently?How to reformulate (linearize/convexify) a budgeted assignment problem?Linearize or approximate a square root constraintFinding minimum time for vehicle to reach to its destination

How do I respond appropriately to an overseas company that obtained a visa for me without hiring me?

How is Sword Coast North governed?

What do the screens say after you are set free?

When did J.K. Rowling decide to make Ron and Hermione a couple?

Who's behind community AMIs on Amazon EC2?

speaker impedence

Does the problem of P vs NP come under the category of Operational Research?

Is there a general term for the items in a directory?

Can I shorten this filter, that finds disk sizes over 100G?

Were there any unmanned expeditions to the moon that returned to Earth prior to Apollo?

What is the difference between 2/4 and 4/4 when it comes the accented beats?

HackerRank Implement Queue using two stacks Solution

Is Norway in the Single Market?

How to power down external drive safely

Gold Battle KoTH

How do I safety check that there is no light in Darkroom / Darkbag?

Skipping same old introductions

Could flaps be raised upward to serve as spoilers / lift dumpers?

Password management for kids - what's a good way to start?

Why interlaced CRT scanning wasn't done back and forth?

Why do we need a voltage divider when we get the same voltage at the output as the input?

Should 2FA be enabled on service accounts?

Has J.J.Jameson ever found out that Peter Parker is Spider-Man?

Can an alphabet for a Turing machine contain subsets of other alphabets?



linearization of objective function


How to linearize the product of a binary and a non-negative continuous variable?Simplest way to eliminate redundant constraints due to a new cutVariable bounds in column generationHow to formulate maximum function in a constraint?Is my approach to my internship project good? Optimal allocation of product across stores, constrained optimizationQA techniques for optimization problem codingFormulation of a constraint in a MIP for an element in different SetsHow to formulate this scheduling problem efficiently?How to reformulate (linearize/convexify) a budgeted assignment problem?Linearize or approximate a square root constraintFinding minimum time for vehicle to reach to its destination













4












$begingroup$


$src_h,s$, $dst_h,s$, $ch_h,s$ are constants.



$a_h,s$, $x_i,j,s$ are binary variables.



$wt_h,s$ are continuous variables.



$mini.$
$$
sum_h in H sum_s in S (src_h,s + ch_h,s + dst_h,s + wt_h,s) times a_h,s
$$



$s.t.$



$$
forall i in H hspace0.3cm forall j in H hspace0.3cm forall s in S hspace0.3cm
$$

$$
wt_j,s geq ((src_i,s + ch_i,s+wt_i,s) - src_j,s) times x_i,j,s
$$



$$
forall i in H hspace0.3cm forall j in H hspace0.3cm
x_ij + x_ji leq 1
$$



$$
forall i in H hspace0.3cm forall j in H hspace0.3cm forall s in S hspace0.3cm
$$

$$
x_ij + x_ji geq a_i,s + a_j,s + 1
$$



$$
forall h in H sum_s in S b_h,s leq 1
$$



I want to use a LP solver on this problem but there are continuous variable $wt_h,s$ and Boolean variable $a_h,s$ together in objective function, how to separate them.



I have found a link for linearization in constraints, (https://www.leandro-coelho.com/linearization-product-variables/) but how to linearize in objective function.



Also in first constraint there are two continuous variable $wt_j,s$ and $wt_i,s$, is it possible to linearize it.










share|improve this question











$endgroup$









  • 1




    $begingroup$
    Linearize the objective function the same way you would a constraint. Having two continuous variables in the first constraint doesn't add any complications because one of these variable appears "by itself", i.e., not multiplied by another variable, and therefore that variable already appears linearly.
    $endgroup$
    – Mark L. Stone
    8 hours ago






  • 1




    $begingroup$
    Maybe take a look at this question: How to linearize the product of a binary and a non-negative continuous variable?
    $endgroup$
    – EhsanK
    6 hours ago










  • $begingroup$
    Is this $$ sum_h in H sum_s in S (src_h,s + ch_h,s + dst_h,s ) times a_h,s + ( wt_h,s - (1 - a_h,s) times infty ) $$ correct linearization of objective function, but what about the bounds.
    $endgroup$
    – anoop yadav
    6 hours ago
















4












$begingroup$


$src_h,s$, $dst_h,s$, $ch_h,s$ are constants.



$a_h,s$, $x_i,j,s$ are binary variables.



$wt_h,s$ are continuous variables.



$mini.$
$$
sum_h in H sum_s in S (src_h,s + ch_h,s + dst_h,s + wt_h,s) times a_h,s
$$



$s.t.$



$$
forall i in H hspace0.3cm forall j in H hspace0.3cm forall s in S hspace0.3cm
$$

$$
wt_j,s geq ((src_i,s + ch_i,s+wt_i,s) - src_j,s) times x_i,j,s
$$



$$
forall i in H hspace0.3cm forall j in H hspace0.3cm
x_ij + x_ji leq 1
$$



$$
forall i in H hspace0.3cm forall j in H hspace0.3cm forall s in S hspace0.3cm
$$

$$
x_ij + x_ji geq a_i,s + a_j,s + 1
$$



$$
forall h in H sum_s in S b_h,s leq 1
$$



I want to use a LP solver on this problem but there are continuous variable $wt_h,s$ and Boolean variable $a_h,s$ together in objective function, how to separate them.



I have found a link for linearization in constraints, (https://www.leandro-coelho.com/linearization-product-variables/) but how to linearize in objective function.



Also in first constraint there are two continuous variable $wt_j,s$ and $wt_i,s$, is it possible to linearize it.










share|improve this question











$endgroup$









  • 1




    $begingroup$
    Linearize the objective function the same way you would a constraint. Having two continuous variables in the first constraint doesn't add any complications because one of these variable appears "by itself", i.e., not multiplied by another variable, and therefore that variable already appears linearly.
    $endgroup$
    – Mark L. Stone
    8 hours ago






  • 1




    $begingroup$
    Maybe take a look at this question: How to linearize the product of a binary and a non-negative continuous variable?
    $endgroup$
    – EhsanK
    6 hours ago










  • $begingroup$
    Is this $$ sum_h in H sum_s in S (src_h,s + ch_h,s + dst_h,s ) times a_h,s + ( wt_h,s - (1 - a_h,s) times infty ) $$ correct linearization of objective function, but what about the bounds.
    $endgroup$
    – anoop yadav
    6 hours ago














4












4








4





$begingroup$


$src_h,s$, $dst_h,s$, $ch_h,s$ are constants.



$a_h,s$, $x_i,j,s$ are binary variables.



$wt_h,s$ are continuous variables.



$mini.$
$$
sum_h in H sum_s in S (src_h,s + ch_h,s + dst_h,s + wt_h,s) times a_h,s
$$



$s.t.$



$$
forall i in H hspace0.3cm forall j in H hspace0.3cm forall s in S hspace0.3cm
$$

$$
wt_j,s geq ((src_i,s + ch_i,s+wt_i,s) - src_j,s) times x_i,j,s
$$



$$
forall i in H hspace0.3cm forall j in H hspace0.3cm
x_ij + x_ji leq 1
$$



$$
forall i in H hspace0.3cm forall j in H hspace0.3cm forall s in S hspace0.3cm
$$

$$
x_ij + x_ji geq a_i,s + a_j,s + 1
$$



$$
forall h in H sum_s in S b_h,s leq 1
$$



I want to use a LP solver on this problem but there are continuous variable $wt_h,s$ and Boolean variable $a_h,s$ together in objective function, how to separate them.



I have found a link for linearization in constraints, (https://www.leandro-coelho.com/linearization-product-variables/) but how to linearize in objective function.



Also in first constraint there are two continuous variable $wt_j,s$ and $wt_i,s$, is it possible to linearize it.










share|improve this question











$endgroup$




$src_h,s$, $dst_h,s$, $ch_h,s$ are constants.



$a_h,s$, $x_i,j,s$ are binary variables.



$wt_h,s$ are continuous variables.



$mini.$
$$
sum_h in H sum_s in S (src_h,s + ch_h,s + dst_h,s + wt_h,s) times a_h,s
$$



$s.t.$



$$
forall i in H hspace0.3cm forall j in H hspace0.3cm forall s in S hspace0.3cm
$$

$$
wt_j,s geq ((src_i,s + ch_i,s+wt_i,s) - src_j,s) times x_i,j,s
$$



$$
forall i in H hspace0.3cm forall j in H hspace0.3cm
x_ij + x_ji leq 1
$$



$$
forall i in H hspace0.3cm forall j in H hspace0.3cm forall s in S hspace0.3cm
$$

$$
x_ij + x_ji geq a_i,s + a_j,s + 1
$$



$$
forall h in H sum_s in S b_h,s leq 1
$$



I want to use a LP solver on this problem but there are continuous variable $wt_h,s$ and Boolean variable $a_h,s$ together in objective function, how to separate them.



I have found a link for linearization in constraints, (https://www.leandro-coelho.com/linearization-product-variables/) but how to linearize in objective function.



Also in first constraint there are two continuous variable $wt_j,s$ and $wt_i,s$, is it possible to linearize it.







linear-programming optimization linearization






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 6 hours ago









Simon

4471 silver badge12 bronze badges




4471 silver badge12 bronze badges










asked 8 hours ago









anoop yadavanoop yadav

1084 bronze badges




1084 bronze badges










  • 1




    $begingroup$
    Linearize the objective function the same way you would a constraint. Having two continuous variables in the first constraint doesn't add any complications because one of these variable appears "by itself", i.e., not multiplied by another variable, and therefore that variable already appears linearly.
    $endgroup$
    – Mark L. Stone
    8 hours ago






  • 1




    $begingroup$
    Maybe take a look at this question: How to linearize the product of a binary and a non-negative continuous variable?
    $endgroup$
    – EhsanK
    6 hours ago










  • $begingroup$
    Is this $$ sum_h in H sum_s in S (src_h,s + ch_h,s + dst_h,s ) times a_h,s + ( wt_h,s - (1 - a_h,s) times infty ) $$ correct linearization of objective function, but what about the bounds.
    $endgroup$
    – anoop yadav
    6 hours ago













  • 1




    $begingroup$
    Linearize the objective function the same way you would a constraint. Having two continuous variables in the first constraint doesn't add any complications because one of these variable appears "by itself", i.e., not multiplied by another variable, and therefore that variable already appears linearly.
    $endgroup$
    – Mark L. Stone
    8 hours ago






  • 1




    $begingroup$
    Maybe take a look at this question: How to linearize the product of a binary and a non-negative continuous variable?
    $endgroup$
    – EhsanK
    6 hours ago










  • $begingroup$
    Is this $$ sum_h in H sum_s in S (src_h,s + ch_h,s + dst_h,s ) times a_h,s + ( wt_h,s - (1 - a_h,s) times infty ) $$ correct linearization of objective function, but what about the bounds.
    $endgroup$
    – anoop yadav
    6 hours ago








1




1




$begingroup$
Linearize the objective function the same way you would a constraint. Having two continuous variables in the first constraint doesn't add any complications because one of these variable appears "by itself", i.e., not multiplied by another variable, and therefore that variable already appears linearly.
$endgroup$
– Mark L. Stone
8 hours ago




$begingroup$
Linearize the objective function the same way you would a constraint. Having two continuous variables in the first constraint doesn't add any complications because one of these variable appears "by itself", i.e., not multiplied by another variable, and therefore that variable already appears linearly.
$endgroup$
– Mark L. Stone
8 hours ago




1




1




$begingroup$
Maybe take a look at this question: How to linearize the product of a binary and a non-negative continuous variable?
$endgroup$
– EhsanK
6 hours ago




$begingroup$
Maybe take a look at this question: How to linearize the product of a binary and a non-negative continuous variable?
$endgroup$
– EhsanK
6 hours ago












$begingroup$
Is this $$ sum_h in H sum_s in S (src_h,s + ch_h,s + dst_h,s ) times a_h,s + ( wt_h,s - (1 - a_h,s) times infty ) $$ correct linearization of objective function, but what about the bounds.
$endgroup$
– anoop yadav
6 hours ago





$begingroup$
Is this $$ sum_h in H sum_s in S (src_h,s + ch_h,s + dst_h,s ) times a_h,s + ( wt_h,s - (1 - a_h,s) times infty ) $$ correct linearization of objective function, but what about the bounds.
$endgroup$
– anoop yadav
6 hours ago











2 Answers
2






active

oldest

votes


















5












$begingroup$

Piecewise linearization methods have been widely applied to convert a nonlinear programming problem into a linear programming problem or a mixed-integer convex programming problem for obtaining an approximated global optimal solution. In the transformation process, extra binary variables, continuous variables, and constraints are introduced to reformulate the original problem. These extra variables and constraints mainly determine the solution efficiency of the converted problem.[source]






share|improve this answer









$endgroup$






















    2












    $begingroup$

    1. Add some additional continuous variables $s_h,s$ to your model and use those variables in the objective, instead of the products.



    2. Add the following constraints for each $s_h,s$:




      • This constraint ensures that $s_h,s$ is at most equal to the sum:



        $s_h,s leq src_h,s+ch_h,s+dst_h,s+wt_h,s$




      • This constraint ensures that $s_h,s$ will be at least the sum when $a_h,s=1$:



        $s_h,s geq src_h,s+ch_h,s+dst_h,s+wt_h,s - M times (1 - a_h,s) $




      • This constraints ensures that $s_h,s=0$ when $a_h,s=0$:



        $s_h,s leq M times a_h,s $




    Some notes about this:



    • I assumed that your constants and variables are all nonnegative.

    • You should pick small values for the constant $M$ to make it all work (e.g. $src_h,s+ch_h,s+dst_h,s+UB(wt_h,s)$). Picking much larger values leads to lower performance and might even introduce numerical problems.

    • If your solver of choice supports indicator constraints, you could also formulate it using those.





    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
      );



      );













      draft saved

      draft discarded


















      StackExchange.ready(
      function ()
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2for.stackexchange.com%2fquestions%2f1146%2flinearization-of-objective-function%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









      5












      $begingroup$

      Piecewise linearization methods have been widely applied to convert a nonlinear programming problem into a linear programming problem or a mixed-integer convex programming problem for obtaining an approximated global optimal solution. In the transformation process, extra binary variables, continuous variables, and constraints are introduced to reformulate the original problem. These extra variables and constraints mainly determine the solution efficiency of the converted problem.[source]






      share|improve this answer









      $endgroup$



















        5












        $begingroup$

        Piecewise linearization methods have been widely applied to convert a nonlinear programming problem into a linear programming problem or a mixed-integer convex programming problem for obtaining an approximated global optimal solution. In the transformation process, extra binary variables, continuous variables, and constraints are introduced to reformulate the original problem. These extra variables and constraints mainly determine the solution efficiency of the converted problem.[source]






        share|improve this answer









        $endgroup$

















          5












          5








          5





          $begingroup$

          Piecewise linearization methods have been widely applied to convert a nonlinear programming problem into a linear programming problem or a mixed-integer convex programming problem for obtaining an approximated global optimal solution. In the transformation process, extra binary variables, continuous variables, and constraints are introduced to reformulate the original problem. These extra variables and constraints mainly determine the solution efficiency of the converted problem.[source]






          share|improve this answer









          $endgroup$



          Piecewise linearization methods have been widely applied to convert a nonlinear programming problem into a linear programming problem or a mixed-integer convex programming problem for obtaining an approximated global optimal solution. In the transformation process, extra binary variables, continuous variables, and constraints are introduced to reformulate the original problem. These extra variables and constraints mainly determine the solution efficiency of the converted problem.[source]







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered 7 hours ago









          Oguz ToragayOguz Toragay

          1,5691 silver badge20 bronze badges




          1,5691 silver badge20 bronze badges
























              2












              $begingroup$

              1. Add some additional continuous variables $s_h,s$ to your model and use those variables in the objective, instead of the products.



              2. Add the following constraints for each $s_h,s$:




                • This constraint ensures that $s_h,s$ is at most equal to the sum:



                  $s_h,s leq src_h,s+ch_h,s+dst_h,s+wt_h,s$




                • This constraint ensures that $s_h,s$ will be at least the sum when $a_h,s=1$:



                  $s_h,s geq src_h,s+ch_h,s+dst_h,s+wt_h,s - M times (1 - a_h,s) $




                • This constraints ensures that $s_h,s=0$ when $a_h,s=0$:



                  $s_h,s leq M times a_h,s $




              Some notes about this:



              • I assumed that your constants and variables are all nonnegative.

              • You should pick small values for the constant $M$ to make it all work (e.g. $src_h,s+ch_h,s+dst_h,s+UB(wt_h,s)$). Picking much larger values leads to lower performance and might even introduce numerical problems.

              • If your solver of choice supports indicator constraints, you could also formulate it using those.





              share|improve this answer









              $endgroup$



















                2












                $begingroup$

                1. Add some additional continuous variables $s_h,s$ to your model and use those variables in the objective, instead of the products.



                2. Add the following constraints for each $s_h,s$:




                  • This constraint ensures that $s_h,s$ is at most equal to the sum:



                    $s_h,s leq src_h,s+ch_h,s+dst_h,s+wt_h,s$




                  • This constraint ensures that $s_h,s$ will be at least the sum when $a_h,s=1$:



                    $s_h,s geq src_h,s+ch_h,s+dst_h,s+wt_h,s - M times (1 - a_h,s) $




                  • This constraints ensures that $s_h,s=0$ when $a_h,s=0$:



                    $s_h,s leq M times a_h,s $




                Some notes about this:



                • I assumed that your constants and variables are all nonnegative.

                • You should pick small values for the constant $M$ to make it all work (e.g. $src_h,s+ch_h,s+dst_h,s+UB(wt_h,s)$). Picking much larger values leads to lower performance and might even introduce numerical problems.

                • If your solver of choice supports indicator constraints, you could also formulate it using those.





                share|improve this answer









                $endgroup$

















                  2












                  2








                  2





                  $begingroup$

                  1. Add some additional continuous variables $s_h,s$ to your model and use those variables in the objective, instead of the products.



                  2. Add the following constraints for each $s_h,s$:




                    • This constraint ensures that $s_h,s$ is at most equal to the sum:



                      $s_h,s leq src_h,s+ch_h,s+dst_h,s+wt_h,s$




                    • This constraint ensures that $s_h,s$ will be at least the sum when $a_h,s=1$:



                      $s_h,s geq src_h,s+ch_h,s+dst_h,s+wt_h,s - M times (1 - a_h,s) $




                    • This constraints ensures that $s_h,s=0$ when $a_h,s=0$:



                      $s_h,s leq M times a_h,s $




                  Some notes about this:



                  • I assumed that your constants and variables are all nonnegative.

                  • You should pick small values for the constant $M$ to make it all work (e.g. $src_h,s+ch_h,s+dst_h,s+UB(wt_h,s)$). Picking much larger values leads to lower performance and might even introduce numerical problems.

                  • If your solver of choice supports indicator constraints, you could also formulate it using those.





                  share|improve this answer









                  $endgroup$



                  1. Add some additional continuous variables $s_h,s$ to your model and use those variables in the objective, instead of the products.



                  2. Add the following constraints for each $s_h,s$:




                    • This constraint ensures that $s_h,s$ is at most equal to the sum:



                      $s_h,s leq src_h,s+ch_h,s+dst_h,s+wt_h,s$




                    • This constraint ensures that $s_h,s$ will be at least the sum when $a_h,s=1$:



                      $s_h,s geq src_h,s+ch_h,s+dst_h,s+wt_h,s - M times (1 - a_h,s) $




                    • This constraints ensures that $s_h,s=0$ when $a_h,s=0$:



                      $s_h,s leq M times a_h,s $




                  Some notes about this:



                  • I assumed that your constants and variables are all nonnegative.

                  • You should pick small values for the constant $M$ to make it all work (e.g. $src_h,s+ch_h,s+dst_h,s+UB(wt_h,s)$). Picking much larger values leads to lower performance and might even introduce numerical problems.

                  • If your solver of choice supports indicator constraints, you could also formulate it using those.






                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered 4 hours ago









                  SimonSimon

                  4471 silver badge12 bronze badges




                  4471 silver badge12 bronze badges






























                      draft saved

                      draft discarded
















































                      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%2f1146%2flinearization-of-objective-function%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

                      199年 目錄 大件事 到箇年出世嗰人 到箇年死嗰人 節慶、風俗習慣 導覽選單