• linear conditional constraint

    From nardine.basta@gmail.com@21:1/5 to All on Mon Mar 26 02:17:05 2018
    hi
    i would like to linearise the following constraints

    if attraction(v,u1)>=attraction(v,u2) then ranking(v,u1)>=ranking(v,u2) attraction is continuous in[0,2]
    ranking id integer in [0,30]

    I tried the following based on the aimms programming guide: attraction(v,u1)>=attraction(v,u2) +0.0001-1*y(v,u1,u2) ranking(v,u1)<=ranking(v,u2)+30*(1-y(v,u1,u2))

    but it still doesn't work. it makes all the rankings 30


    your help is highly appreciated

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Paul@21:1/5 to All on Mon Mar 26 13:22:48 2018
    Your first constraint should be attraction(v, u1) <= attraction(v, u2) - 0.0001 + 2.0001*y(v, u1, u2). That way, if y is 0, attraction(v, u1) < attraction(v, u2); if y is 1, attraction(v, u1) can be greater than attraction(v, u2) by as much as 2 (which
    is all the [0,2] domain allows) or can be less than attraction(v, u2). So attraction(v, u1) >= attraction(v, u2) => y = 1.

    Your second constraint should be ranking(v, u1) >= ranking(v, u2) - 30(1 - y(v, u1, u2)). If y is 0, ranking(v, u1) can be less than or greater than ranking(v, u2). If y is 1, ranking(v, u1) >= ranking(v, u2).

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Nardine Basta@21:1/5 to All on Tue Mar 27 00:48:58 2018
    many thanks, but i still have a problem

    applying this gives all the ranking the value of 30.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Paul@21:1/5 to Nardine Basta on Wed Mar 28 12:26:18 2018
    On Tuesday, March 27, 2018 at 3:49:00 AM UTC-4, Nardine Basta wrote:
    many thanks, but i still have a problem

    applying this gives all the ranking the value of 30.

    Then either some other part of your model is wrong (or missing), or all rankings = 30 is the correct answer.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)