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

4 vues (au cours des 30 derniers jours)
Amani mahdy
Amani mahdy le 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

Réponses (1)

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

Catégories

En savoir plus sur Systems of Nonlinear Equations dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by