binary non-linear-optimization with a variable in the denominator
3 次查看(过去 30 天)
显示 更早的评论
Dear all , I am trying to do a non-linear optimization in MATLAB
The point is that my variable " x" could take the value of zero or one - binary optimization-
however, -i will try to simplify the problem - , my objective function (in a loop) is as follows :
y = y+(d/(x((2*j))*B;
i have the following questions if it is possible to be answered. 1) 2) can a possible value of a zero or inf. be in the denominator of the objective function ?
3) can the denominator and the numerator contains zero or inf ? so we may get zero / inf
4) what should be done otherwise?
Thank you in advance
0 个评论
回答(1 个)
John D'Errico
2016-5-28
Never divide by zero. The result is meaningless. Well, maybe +/- inf, sometimes NaN, but all equally useless.
Optimizations of infinite objective functions tend to be poorly posed.
What should be done? Spend some time in rethinking your problem, as what you have so far cannot be solved. Given that we don't know the source of this problem, anything about it including how you have chosen to solve it but for a one line code fragment, how can we possibly help more?
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!