Hi You Yaxiong
It is not possible to do this directly. You can think about this way: you have a MIP or MINLP model and in order to solve it you need to be able to solve a relaxed model, i.e. a model in which s is continuous. What does e_t(j+2.5) mean? Or in another way, depending on where you are in your solution process you suddenly have a model with a different set of variables. We do not have algorithms that can handle this.
The trick is usually to have a set that represent the possible value of s, e.g.
set sb / 0*15 /;
and a binary variable that tells you which of these values have been chosen, plus a copy of your e_t variable with an extra sb index:
binary variable y(i,j,sb);
positive variable e_tb(i,j,sb)
plus an upper bound on e_t (safe but not too large -- the following is a big-M formulation)
parameter e_tmax(j) / values .../;
You then have the relationship
Equation ydef(i,j); ydef(i,j) .. s(i,j) =E= sum(sb, ord(sb)*y(i,j,sb) );
Equation et_def1(i,j); et_def1(j).. e_t(i,j) =E= sum(sb, e_tb(i,j,sb));
Equation et_def2(i,j,sb); et_def2(j) .. e_tb(i,j,sb) =L= e_tmax(j)*y(i,j,sb);
You can then use e_tb(i,j,sb) instead of e_t(j-s(i,j)).
This is a lot of machinery and meant as an initial inspiration. If you work with your own model you should be able to reduce it to something simpler. But it will never be simple.
Regards
Arne
-------------------------------------------
Arne Stolbjerg Drud
ARKI Consulting & Development A/S
Bagsvaerdvej 246A, DK-2880 Bagsvaerd, Denmark
Phone:
(+45) 44 49 03 23, Fax:
(+45) 44 49 03 33, email:
ad...@arki.dk