Page 1 of 1

Solving the division by zero problem

Posted: Thu Mar 21, 2019 6:02 pm
by Yehuda
Hi all,

My model contains, by definition, division by zero possibilities.
In a nutshell, the model needs to decide how much water to transfer in a pipeline network. The pipeline network includes some pipes which the model can decide not to use.
Due to some other equations, the model confronts the division by zero problem, by not using pipelines.

I would like to know if someone dealt with this problem and has a solution that is both simple and effective.

Thank you,

Yehuda

Re: Solving the division by zero problem

Posted: Sat Mar 23, 2019 3:03 am
by Job
You can use manual means of dealing with the problem by ensuring that no variable is absolute zero, like making them 0.0000001.

Re: Solving the division by zero problem

Posted: Mon Mar 25, 2019 4:08 pm
by Yehuda
Thank you, Job.

I already tried your suggestion but it causes me other problems.
I thought that there is a simple solution to my problem, but it seems there isn't.

Anyway, thanks for your response.

Yehuda