フィルターのクリア

binary non-linear-optimization with a variable in the denominator

4 ビュー (過去 30 日間)
Amani mahdy
Amani mahdy 2016 年 5 月 28 日
回答済み: John D'Errico 2016 年 5 月 28 日
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

回答 (1 件)

John D'Errico
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?

カテゴリ

Help Center および File ExchangeGet Started with Optimization Toolbox についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by