Necessary guestion

hi my dear friends… help me plz.

first i have a variable w(i,j,t,m) and i want to Define a constraint that if Indexs " i " &" j " be egual (i mean i=j) In this case w(i,j,t,m)=0 ???

\

To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.

Hi Amin



This is not difficult to answer, but you should provide more information (read the guidelines to this forum before you post a question).

What elements are in the set I and j? Are the sets related?

The best is always to send the code you have (even if it has errors), so people can easily answer your question without having to guess and code a lot.



Cheers

Renger



From: gamsworld@googlegroups.com [mailto:gamsworld@googlegroups.com] On Behalf Of Amin Alizadeh
Sent: Samstag, 13. Juni 2015 10:18
To: gamsworld@googlegroups.com
Subject: Necessary guestion



hi my dear friends… help me plz.



first i have a variable w(i,j,t,m) and i want to Define a constraint that if Indexs " i " &" j " be egual (i mean i=j) In this case w(i,j,t,m)=0 ???




\

To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.

my model is a transportation model and w(i,j,t,m) Refers to number of products delivery from node i to node j that means i & j both refer to nodes then delivery products between i & j is 0. then i have to define a constraint that avoid to w to be positive.one way that i do itØŒis this code:w(1,1,t,m)=0 & w(2,2,t,m)=0 & w(3,3,t,m)=0 & … but if the number of nodes be a lot this code will be infinite line code. then i have to define a general code that cover all i&j that be egual.

On Mon, Jun 15, 2015 at 12:29 PM, Renger van Nieuwkoop wrote:

Hi Amin



This is not difficult to answer, but you should provide more information (read the guidelines to this forum before you post a question).

What elements are in the set I and j? Are the sets related?

The best is always to send the code you have (even if it has errors), so people can easily answer your question without having to guess and code a lot.



Cheers

Renger



From: gamsworld@googlegroups.com [mailto:gamsworld@googlegroups.com] On Behalf Of Amin Alizadeh
Sent: Samstag, 13. Juni 2015 10:18
To: gamsworld@googlegroups.com
Subject: Necessary guestion



hi my dear friends… help me plz.



first i have a variable w(i,j,t,m) and i want to Define a constraint that if Indexs " i " &" j " be egual (i mean i=j) In this case w(i,j,t,m)=0 ???




\

To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.

\

To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.

Hi Alim



Here two examples how to do this:



set nodes /1*100/;



alias(nodes,I,j);



** Method 1 using ord

w(i,j,t,m)$(ord(i) eq ord(j))=0;



** method 2 using sameas

w(i,j,t,m)$sameas(i,j) = 0;



Hope this helps

Renger



From: gamsworld@googlegroups.com [mailto:gamsworld@googlegroups.com] On Behalf Of Amin Alizadeh
Sent: Montag, 15. Juni 2015 12:14
To: gamsworld@googlegroups.com
Subject: Re: Necessary guestion



my model is a transportation model and w(i,j,t,m) Refers to number of products delivery from node i to node j that means i & j both refer to nodes then delivery products between i & j is 0. then i have to define a constraint that avoid to w to be positive.one way that i do itØŒis this code:w(1,1,t,m)=0 & w(2,2,t,m)=0 & w(3,3,t,m)=0 & … but if the number of nodes be a lot this code will be infinite line code. then i have to define a general code that cover all i&j that be egual.



On Mon, Jun 15, 2015 at 12:29 PM, Renger van Nieuwkoop wrote:

Hi Amin



This is not difficult to answer, but you should provide more information (read the guidelines to this forum before you post a question).

What elements are in the set I and j? Are the sets related?

The best is always to send the code you have (even if it has errors), so people can easily answer your question without having to guess and code a lot.



Cheers

Renger



From: gamsworld@googlegroups.com [mailto:gamsworld@googlegroups.com] On Behalf Of Amin Alizadeh
Sent: Samstag, 13. Juni 2015 10:18
To: gamsworld@googlegroups.com
Subject: Necessary guestion



hi my dear friends… help me plz.



first i have a variable w(i,j,t,m) and i want to Define a constraint that if Indexs " i " &" j " be egual (i mean i=j) In this case w(i,j,t,m)=0 ???




\

To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.


\

To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.

thank you so much… dear renger… its good Apparently… thanks for your time … good luck…

On Mon, Jun 15, 2015 at 6:53 PM, Renger van Nieuwkoop wrote:

Hi Alim



Here two examples how to do this:



set nodes /1*100/;



alias(nodes,I,j);



** Method 1 using ord

w(i,j,t,m)$(ord(i) eq ord(j))=0;



** method 2 using sameas

w(i,j,t,m)$sameas(i,j) = 0;



Hope this helps

Renger



From: gamsworld@googlegroups.com [mailto:gamsworld@googlegroups.com] On Behalf Of Amin Alizadeh
Sent: Montag, 15. Juni 2015 12:14
To: gamsworld@googlegroups.com
Subject: Re: Necessary guestion



my model is a transportation model and w(i,j,t,m) Refers to number of products delivery from node i to node j that means i & j both refer to nodes then delivery products between i & j is 0. then i have to define a constraint that avoid to w to be positive.one way that i do itØŒis this code:w(1,1,t,m)=0 & w(2,2,t,m)=0 & w(3,3,t,m)=0 & … but if the number of nodes be a lot this code will be infinite line code. then i have to define a general code that cover all i&j that be egual.



On Mon, Jun 15, 2015 at 12:29 PM, Renger van Nieuwkoop wrote:

Hi Amin



This is not difficult to answer, but you should provide more information (read the guidelines to this forum before you post a question).

What elements are in the set I and j? Are the sets related?

The best is always to send the code you have (even if it has errors), so people can easily answer your question without having to guess and code a lot.



Cheers

Renger



From: gamsworld@googlegroups.com [mailto:gamsworld@googlegroups.com] On Behalf Of Amin Alizadeh
Sent: Samstag, 13. Juni 2015 10:18
To: gamsworld@googlegroups.com
Subject: Necessary guestion



hi my dear friends… help me plz.



first i have a variable w(i,j,t,m) and i want to Define a constraint that if Indexs " i " &" j " be egual (i mean i=j) In this case w(i,j,t,m)=0 ???




\

To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.


\

To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.

\

To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.

hi …sorry … another question … i want to define a ceil constraint in my code but its non linear… i want to define x=ceil(w(i,j,t,m)/a(m)) that w is a variable & a is a parameter … can u help me to write this code line So that my code stay linear???

On Tue, Jun 16, 2015 at 12:35 AM, Amin Alizadeh wrote:

thank you so much… dear renger… its good Apparently… thanks for your time … good luck…

On Mon, Jun 15, 2015 at 6:53 PM, Renger van Nieuwkoop wrote:

Hi Alim



Here two examples how to do this:



set nodes /1*100/;



alias(nodes,I,j);



** Method 1 using ord

w(i,j,t,m)$(ord(i) eq ord(j))=0;



** method 2 using sameas

w(i,j,t,m)$sameas(i,j) = 0;



Hope this helps

Renger



From: gamsworld@googlegroups.com [mailto:gamsworld@googlegroups.com] On Behalf Of Amin Alizadeh
Sent: Montag, 15. Juni 2015 12:14
To: gamsworld@googlegroups.com
Subject: Re: Necessary guestion



my model is a transportation model and w(i,j,t,m) Refers to number of products delivery from node i to node j that means i & j both refer to nodes then delivery products between i & j is 0. then i have to define a constraint that avoid to w to be positive.one way that i do itØŒis this code:w(1,1,t,m)=0 & w(2,2,t,m)=0 & w(3,3,t,m)=0 & … but if the number of nodes be a lot this code will be infinite line code. then i have to define a general code that cover all i&j that be egual.



On Mon, Jun 15, 2015 at 12:29 PM, Renger van Nieuwkoop wrote:

Hi Amin



This is not difficult to answer, but you should provide more information (read the guidelines to this forum before you post a question).

What elements are in the set I and j? Are the sets related?

The best is always to send the code you have (even if it has errors), so people can easily answer your question without having to guess and code a lot.



Cheers

Renger



From: gamsworld@googlegroups.com [mailto:gamsworld@googlegroups.com] On Behalf Of Amin Alizadeh
Sent: Samstag, 13. Juni 2015 10:18
To: gamsworld@googlegroups.com
Subject: Necessary guestion



hi my dear friends… help me plz.



first i have a variable w(i,j,t,m) and i want to Define a constraint that if Indexs " i " &" j " be egual (i mean i=j) In this case w(i,j,t,m)=0 ???




\

To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.


\

To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.


\

To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.