How convert the follow equations in AMPL to GAMS:

s.t. GeneraUnit2b{i in I, k in K, t in La..(La+LT[k]-1)}:
    if LT[k]>0 then x[i,k,t]=0;

s.t. GeneraUnit2{i in I, k in K, t in (La+LT[k])..Lb}:
    x[i,k,t]=N[i,k]*z[k,t-LT[k]];

Can you help me?

asked 09 Sep '13, 13:00

Jaracohe's gravatar image

Jaracohe
11
accept rate: 0%

edited 09 Sep '13, 14:00

fbahr's gravatar image

fbahr ♦
4.6k716


GeneraUnit2b(i,k,t)$(ord(t) lt LT(k)).. x(i,k,t)$(LT(k)>0)=e=0;

GeneraUnit2(i,k,t)$(ord(t) ge LT(k)-1).. x(i,k,t)=e=N(i,k)*z(k, t-LT(k));

link

answered 09 Sep '13, 15:25

Jaracohe's gravatar image

Jaracohe
11
accept rate: 0%

edited 09 Sep '13, 15:25

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×51
×29

Asked: 09 Sep '13, 13:00

Seen: 950 times

Last updated: 09 Sep '13, 15:25

OR-Exchange! Your site for questions, answers, and announcements about operations research.