SOS1 for linearizing complementarity condition












0












$begingroup$


I am trying to linearize the complementarity condition
$0<a perp b>0$ with SOS1 method by the following formulation:



$p_1+p_2 = 1e5 label{1}tag{1}$



$a < p_1label{2}tag{2}$



$b < p_2label{3}tag{3}$



where, $p_1$ and $p_2$ are the SOS1 variables. If equation eqref{1} is set to 1, the problem becomes integer infeasible. If i set it to 1e5, both the variables attain values greater than 1. However, the definition of SOS1 says, at the most only 1 variable can take non zero value. Any clarification in this regard will be helpful.










share|cite|improve this question









$endgroup$












  • $begingroup$
    As i understand, the equality in eq. (1) causes the integer infeasibility. Hence, i reformed the equation to $p_1+p_2 < 1$. In this case,, after the solve $p_1$ is taking a value over 5000 and $p_2$ is taking a value just over 800.
    $endgroup$
    – S_Scouse
    Dec 11 '18 at 11:21










  • $begingroup$
    What are the domains of all the variables (lower and upper bounds, integral or not)? Also, do you mean <= in (2) and (3)? Math programs are generally intolerant of strict inequalities.
    $endgroup$
    – prubin
    Dec 13 '18 at 0:07










  • $begingroup$
    The variables a are indexed with different generation resources with their limits not exceeding 5950. b are Lagrangian dual variables with no upper bound and both a and b have their lower bound set to 0. There is no integral conditions involved. Yes, i meant <=, thank you for pointing that out. I tried big-M method but the optimization results vary depending on the M value.
    $endgroup$
    – S_Scouse
    Dec 13 '18 at 20:20










  • $begingroup$
    I agree that in an SOS1 constraint at most one variable should be nonzero. Is it possible that the solver you are using does not understand or support SOS1 constraints? If it does, I would have to guess that you entered the constraint incorrectly.
    $endgroup$
    – prubin
    Dec 14 '18 at 21:12










  • $begingroup$
    I am using cplex solver which from what I read supports sos1 constraints. Please let me know if that is the case. Also, is it possible that two variables in a sos1 set take positive values, where one of the sos1 variable value takes a higher value and the other takes a significant lower value which essentially set the constraint as binding. I am guessing this is far fetched but I am wondering if there is any truth behind it.
    $endgroup$
    – S_Scouse
    Dec 14 '18 at 23:01
















0












$begingroup$


I am trying to linearize the complementarity condition
$0<a perp b>0$ with SOS1 method by the following formulation:



$p_1+p_2 = 1e5 label{1}tag{1}$



$a < p_1label{2}tag{2}$



$b < p_2label{3}tag{3}$



where, $p_1$ and $p_2$ are the SOS1 variables. If equation eqref{1} is set to 1, the problem becomes integer infeasible. If i set it to 1e5, both the variables attain values greater than 1. However, the definition of SOS1 says, at the most only 1 variable can take non zero value. Any clarification in this regard will be helpful.










share|cite|improve this question









$endgroup$












  • $begingroup$
    As i understand, the equality in eq. (1) causes the integer infeasibility. Hence, i reformed the equation to $p_1+p_2 < 1$. In this case,, after the solve $p_1$ is taking a value over 5000 and $p_2$ is taking a value just over 800.
    $endgroup$
    – S_Scouse
    Dec 11 '18 at 11:21










  • $begingroup$
    What are the domains of all the variables (lower and upper bounds, integral or not)? Also, do you mean <= in (2) and (3)? Math programs are generally intolerant of strict inequalities.
    $endgroup$
    – prubin
    Dec 13 '18 at 0:07










  • $begingroup$
    The variables a are indexed with different generation resources with their limits not exceeding 5950. b are Lagrangian dual variables with no upper bound and both a and b have their lower bound set to 0. There is no integral conditions involved. Yes, i meant <=, thank you for pointing that out. I tried big-M method but the optimization results vary depending on the M value.
    $endgroup$
    – S_Scouse
    Dec 13 '18 at 20:20










  • $begingroup$
    I agree that in an SOS1 constraint at most one variable should be nonzero. Is it possible that the solver you are using does not understand or support SOS1 constraints? If it does, I would have to guess that you entered the constraint incorrectly.
    $endgroup$
    – prubin
    Dec 14 '18 at 21:12










  • $begingroup$
    I am using cplex solver which from what I read supports sos1 constraints. Please let me know if that is the case. Also, is it possible that two variables in a sos1 set take positive values, where one of the sos1 variable value takes a higher value and the other takes a significant lower value which essentially set the constraint as binding. I am guessing this is far fetched but I am wondering if there is any truth behind it.
    $endgroup$
    – S_Scouse
    Dec 14 '18 at 23:01














0












0








0





$begingroup$


I am trying to linearize the complementarity condition
$0<a perp b>0$ with SOS1 method by the following formulation:



$p_1+p_2 = 1e5 label{1}tag{1}$



$a < p_1label{2}tag{2}$



$b < p_2label{3}tag{3}$



where, $p_1$ and $p_2$ are the SOS1 variables. If equation eqref{1} is set to 1, the problem becomes integer infeasible. If i set it to 1e5, both the variables attain values greater than 1. However, the definition of SOS1 says, at the most only 1 variable can take non zero value. Any clarification in this regard will be helpful.










share|cite|improve this question









$endgroup$




I am trying to linearize the complementarity condition
$0<a perp b>0$ with SOS1 method by the following formulation:



$p_1+p_2 = 1e5 label{1}tag{1}$



$a < p_1label{2}tag{2}$



$b < p_2label{3}tag{3}$



where, $p_1$ and $p_2$ are the SOS1 variables. If equation eqref{1} is set to 1, the problem becomes integer infeasible. If i set it to 1e5, both the variables attain values greater than 1. However, the definition of SOS1 says, at the most only 1 variable can take non zero value. Any clarification in this regard will be helpful.







optimization mixed-integer-programming






share|cite|improve this question













share|cite|improve this question











share|cite|improve this question




share|cite|improve this question










asked Dec 11 '18 at 2:28









S_ScouseS_Scouse

61




61












  • $begingroup$
    As i understand, the equality in eq. (1) causes the integer infeasibility. Hence, i reformed the equation to $p_1+p_2 < 1$. In this case,, after the solve $p_1$ is taking a value over 5000 and $p_2$ is taking a value just over 800.
    $endgroup$
    – S_Scouse
    Dec 11 '18 at 11:21










  • $begingroup$
    What are the domains of all the variables (lower and upper bounds, integral or not)? Also, do you mean <= in (2) and (3)? Math programs are generally intolerant of strict inequalities.
    $endgroup$
    – prubin
    Dec 13 '18 at 0:07










  • $begingroup$
    The variables a are indexed with different generation resources with their limits not exceeding 5950. b are Lagrangian dual variables with no upper bound and both a and b have their lower bound set to 0. There is no integral conditions involved. Yes, i meant <=, thank you for pointing that out. I tried big-M method but the optimization results vary depending on the M value.
    $endgroup$
    – S_Scouse
    Dec 13 '18 at 20:20










  • $begingroup$
    I agree that in an SOS1 constraint at most one variable should be nonzero. Is it possible that the solver you are using does not understand or support SOS1 constraints? If it does, I would have to guess that you entered the constraint incorrectly.
    $endgroup$
    – prubin
    Dec 14 '18 at 21:12










  • $begingroup$
    I am using cplex solver which from what I read supports sos1 constraints. Please let me know if that is the case. Also, is it possible that two variables in a sos1 set take positive values, where one of the sos1 variable value takes a higher value and the other takes a significant lower value which essentially set the constraint as binding. I am guessing this is far fetched but I am wondering if there is any truth behind it.
    $endgroup$
    – S_Scouse
    Dec 14 '18 at 23:01


















  • $begingroup$
    As i understand, the equality in eq. (1) causes the integer infeasibility. Hence, i reformed the equation to $p_1+p_2 < 1$. In this case,, after the solve $p_1$ is taking a value over 5000 and $p_2$ is taking a value just over 800.
    $endgroup$
    – S_Scouse
    Dec 11 '18 at 11:21










  • $begingroup$
    What are the domains of all the variables (lower and upper bounds, integral or not)? Also, do you mean <= in (2) and (3)? Math programs are generally intolerant of strict inequalities.
    $endgroup$
    – prubin
    Dec 13 '18 at 0:07










  • $begingroup$
    The variables a are indexed with different generation resources with their limits not exceeding 5950. b are Lagrangian dual variables with no upper bound and both a and b have their lower bound set to 0. There is no integral conditions involved. Yes, i meant <=, thank you for pointing that out. I tried big-M method but the optimization results vary depending on the M value.
    $endgroup$
    – S_Scouse
    Dec 13 '18 at 20:20










  • $begingroup$
    I agree that in an SOS1 constraint at most one variable should be nonzero. Is it possible that the solver you are using does not understand or support SOS1 constraints? If it does, I would have to guess that you entered the constraint incorrectly.
    $endgroup$
    – prubin
    Dec 14 '18 at 21:12










  • $begingroup$
    I am using cplex solver which from what I read supports sos1 constraints. Please let me know if that is the case. Also, is it possible that two variables in a sos1 set take positive values, where one of the sos1 variable value takes a higher value and the other takes a significant lower value which essentially set the constraint as binding. I am guessing this is far fetched but I am wondering if there is any truth behind it.
    $endgroup$
    – S_Scouse
    Dec 14 '18 at 23:01
















$begingroup$
As i understand, the equality in eq. (1) causes the integer infeasibility. Hence, i reformed the equation to $p_1+p_2 < 1$. In this case,, after the solve $p_1$ is taking a value over 5000 and $p_2$ is taking a value just over 800.
$endgroup$
– S_Scouse
Dec 11 '18 at 11:21




$begingroup$
As i understand, the equality in eq. (1) causes the integer infeasibility. Hence, i reformed the equation to $p_1+p_2 < 1$. In this case,, after the solve $p_1$ is taking a value over 5000 and $p_2$ is taking a value just over 800.
$endgroup$
– S_Scouse
Dec 11 '18 at 11:21












$begingroup$
What are the domains of all the variables (lower and upper bounds, integral or not)? Also, do you mean <= in (2) and (3)? Math programs are generally intolerant of strict inequalities.
$endgroup$
– prubin
Dec 13 '18 at 0:07




$begingroup$
What are the domains of all the variables (lower and upper bounds, integral or not)? Also, do you mean <= in (2) and (3)? Math programs are generally intolerant of strict inequalities.
$endgroup$
– prubin
Dec 13 '18 at 0:07












$begingroup$
The variables a are indexed with different generation resources with their limits not exceeding 5950. b are Lagrangian dual variables with no upper bound and both a and b have their lower bound set to 0. There is no integral conditions involved. Yes, i meant <=, thank you for pointing that out. I tried big-M method but the optimization results vary depending on the M value.
$endgroup$
– S_Scouse
Dec 13 '18 at 20:20




$begingroup$
The variables a are indexed with different generation resources with their limits not exceeding 5950. b are Lagrangian dual variables with no upper bound and both a and b have their lower bound set to 0. There is no integral conditions involved. Yes, i meant <=, thank you for pointing that out. I tried big-M method but the optimization results vary depending on the M value.
$endgroup$
– S_Scouse
Dec 13 '18 at 20:20












$begingroup$
I agree that in an SOS1 constraint at most one variable should be nonzero. Is it possible that the solver you are using does not understand or support SOS1 constraints? If it does, I would have to guess that you entered the constraint incorrectly.
$endgroup$
– prubin
Dec 14 '18 at 21:12




$begingroup$
I agree that in an SOS1 constraint at most one variable should be nonzero. Is it possible that the solver you are using does not understand or support SOS1 constraints? If it does, I would have to guess that you entered the constraint incorrectly.
$endgroup$
– prubin
Dec 14 '18 at 21:12












$begingroup$
I am using cplex solver which from what I read supports sos1 constraints. Please let me know if that is the case. Also, is it possible that two variables in a sos1 set take positive values, where one of the sos1 variable value takes a higher value and the other takes a significant lower value which essentially set the constraint as binding. I am guessing this is far fetched but I am wondering if there is any truth behind it.
$endgroup$
– S_Scouse
Dec 14 '18 at 23:01




$begingroup$
I am using cplex solver which from what I read supports sos1 constraints. Please let me know if that is the case. Also, is it possible that two variables in a sos1 set take positive values, where one of the sos1 variable value takes a higher value and the other takes a significant lower value which essentially set the constraint as binding. I am guessing this is far fetched but I am wondering if there is any truth behind it.
$endgroup$
– S_Scouse
Dec 14 '18 at 23:01










0






active

oldest

votes











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


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3034796%2fsos1-for-linearizing-complementarity-condition%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Mathematics Stack Exchange!


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

But avoid



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

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


Use MathJax to format equations. MathJax reference.


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




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3034796%2fsos1-for-linearizing-complementarity-condition%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

Le Mesnil-Réaume

Ida-Boy-Ed-Garten

web3.py web3.isConnected() returns false always