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

5 Ansichten (letzte 30 Tage)
Amani mahdy
Amani mahdy am 28 Mai 2016
Beantwortet: John D'Errico am 28 Mai 2016
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

Antworten (1)

John D'Errico
John D'Errico am 28 Mai 2016
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?

Kategorien

Mehr zu Systems of Nonlinear Equations finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by