### loop until all values in a parameter reaches a specific value

Posted:

**Wed Dec 09, 2020 3:01 pm**Dear,

I have an iteration (ITR) loop in which I have a p-parameter that has to have values between -1 and 1. For example, my parameter is p (PRISER,DKM,VAK,Tid) - 4 dimensional, that is calculated using gravity model. This parameter converges to 0, when iterating.

As I said, I want this parameter to have all values between -1 and 1. I do not know how many iterations I have to run to receive this condition for all cells in this parameter. Therefore, my question is: What kind of statement in the ITR-loop I need to include to fulfill the condition (-1,1) for this parameter? It can be more for some cells, but less for other cells. So I want to just stop iterating, once the condition is fulfilled for a cell.

I have tried with break statement, but it iterates over all iterations defined as a default (max ITR = 300).

Best regards

Irena

I have an iteration (ITR) loop in which I have a p-parameter that has to have values between -1 and 1. For example, my parameter is p (PRISER,DKM,VAK,Tid) - 4 dimensional, that is calculated using gravity model. This parameter converges to 0, when iterating.

As I said, I want this parameter to have all values between -1 and 1. I do not know how many iterations I have to run to receive this condition for all cells in this parameter. Therefore, my question is: What kind of statement in the ITR-loop I need to include to fulfill the condition (-1,1) for this parameter? It can be more for some cells, but less for other cells. So I want to just stop iterating, once the condition is fulfilled for a cell.

I have tried with break statement, but it iterates over all iterations defined as a default (max ITR = 300).

Best regards

Irena