how to do summation over j where j = 0: X(i); X(i) is control variable?

hi there

my problem:

SETS
i , j ;

SCALAR Q;

PARAMETERS A(i);

PARAMETERS val(j);
val(j) = ord(j);

VARIABLES
X(i) , T, Z ;
INTEGER VARIABLE X;
POSITIVE VARIABLE T;
EQUATIONS COST;
COST … Z =E= Q/T + SUM(i, SUM((j$(val(j) le X(i)), (X(i) - val(j)) * exp(-A(i)*T))) ;
MODEL TRANSPORT /ALL/ ;
SOLVE TRANSPORT USING MINLP MINIMIZING Z ;

Guys, is it possible to do summation with condition on variable

%% in LaTeX
\sum_{j = 0}^{X_i} (X_i - j)exp(-A_iT)
%%%%%%%%
X_i is variable??


thank you


\

To view this discussion on the web visit https://groups.google.com/d/msg/gamsworld/-/SopqAEYDrXMJ.
To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.

Hi Adel
I don’t think it is possible directly.
However, you might play around this using binary variables.
Suppose you define:

binary variable U(i,j) ;

and write the constraint:

X(i) =e= sum(j, U(i,j)) ;

(where set j has sufficient cardinality)
and that you add the condition

U(i,j) =l= U(i,j-1) ;

to ensure that binary variables are filled in the right order (I suppose you could also make use of SOS variables in this case).
Then your objective would become :

… + sum((i,j), U(i,j) * (X(i) - val(j)) * exp(-a(i)*T)) ;

which looks like a nasty MINLP, but… should do the trick, if your problem size isn’t too big.
Hope this helps,

cheers
dax

Le lundi 10 septembre 2012 13:15:56 UTC+2, Adel a écrit :


hi there

my problem:

SETS
i , j ;

SCALAR Q;

PARAMETERS A(i);

PARAMETERS val(j);
val(j) = ord(j);

VARIABLES
X(i) , T, Z ;
INTEGER VARIABLE X;
POSITIVE VARIABLE T;
EQUATIONS COST;
COST … Z =E= Q/T + SUM(i, SUM((j$(val(j) le X(i)), (X(i) - val(j)) * exp(-A(i)*T))) ;
MODEL TRANSPORT /ALL/ ;
SOLVE TRANSPORT USING MINLP MINIMIZING Z ;

Guys, is it possible to do summation with condition on variable

%% in LaTeX
\sum_{j = 0}^{X_i} (X_i - j)exp(-A_iT)
%%%%%%%%
X_i is variable??


thank you


\

To view this discussion on the web visit https://groups.google.com/d/msg/gamsworld/-/lAgMGrP2VkoJ.
To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.