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
The grades of the students in a class
Basic transistor circuit
A conjectural trigonometric identity
Went to a big 4 but got fired for underperformance in a year recently - Now every one thinks I'm pro - How to balance expectations?
Python π = 1 + (1/2) + (1/3) + (1/4) - (1/5) + (1/6) + (1/7) + (1/8) + (1/9) - (1/10) ...1748 Euler
How to trick a fairly simplistic kill-counter?
Can an alphabet for a Turing machine contain subsets of other alphabets?
Move label of an angle in Tikz
Does the use of a new concept require a prior definition?
speaker impedence
Why are Star Wars Rebel Alliance ships named after letters from the Latin alphabet?
Is the EU really banning "toxic propellants" in 2020? How is that going to work?
What is the difference between 2/4 and 4/4 when it comes the accented beats?
Skipping same old introductions
Why have both: BJT and FET transistors on IC output?
Pre-Greek θάλασσα "thalassa" and Turkish talaz
Does the problem of P vs NP come under the category of Operational Research?
Why did the United States not resort to nuclear weapons in Vietnam?
How to power down external drive safely
How do I solve such questions on paramagnetism and ferromagnetism?
How to get maximum number that newcount can hold?
HackerRank Implement Queue using two stacks Solution
cannot trash malware NGPlayerSetup.dmg
When did J.K. Rowling decide to make Ron and Hermione a couple?
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
$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.
linear-programming optimization linearization
$endgroup$
add a comment |
$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.
linear-programming optimization linearization
$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
7 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
add a comment |
$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.
linear-programming optimization linearization
$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
linear-programming optimization linearization
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
7 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
add a comment |
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
7 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
7 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
7 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
add a comment |
2 Answers
2
active
oldest
votes
$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]
$endgroup$
add a comment |
$begingroup$
Add some additional continuous variables $s_h,s$ to your model and use those variables in the objective, instead of the products.
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.
$endgroup$
add a comment |
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
$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]
$endgroup$
add a comment |
$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]
$endgroup$
add a comment |
$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]
$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]
answered 7 hours ago
Oguz ToragayOguz Toragay
1,5691 silver badge20 bronze badges
1,5691 silver badge20 bronze badges
add a comment |
add a comment |
$begingroup$
Add some additional continuous variables $s_h,s$ to your model and use those variables in the objective, instead of the products.
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.
$endgroup$
add a comment |
$begingroup$
Add some additional continuous variables $s_h,s$ to your model and use those variables in the objective, instead of the products.
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.
$endgroup$
add a comment |
$begingroup$
Add some additional continuous variables $s_h,s$ to your model and use those variables in the objective, instead of the products.
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.
$endgroup$
Add some additional continuous variables $s_h,s$ to your model and use those variables in the objective, instead of the products.
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.
answered 4 hours ago
SimonSimon
4471 silver badge12 bronze badges
4471 silver badge12 bronze badges
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
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
7 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