how to code the position of last element in a set
how to code the position of last element in a set
Hallo,
the position for the first element in a set we can code like this: ord(i)=1, how to code the position for the last one?
Thanks in advance.
Yu
--
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 https://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.
Re: how to code the position of last element in a set
hallo,
i mean the element in a set is infinity.
Thank you!> 写é“:
> Hallo,
>
> the position for the first element in a set we can code like this: ord(i)=1, how to code the position for the last one?
>
> Thanks in advance.
>
> Yu
>
> --
> 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 https://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 https://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.
RE: how to code the position of last element in a set
Hi Yu
Use card(i) which will give you the cardinality of the set (the number of elements)
Cheers
Renger
From: gamsworld@googlegroups.com [mailto:gamsworld@googlegroups.com] On Behalf Of Yu Li
Sent: Dienstag, 19. Januar 2016 15:14
To: gamsworld
Subject: how to code the position of last element in a set
Hallo,
the position for the first element in a set we can code like this: ord(i)=1, how to code the position for the last one?
Thanks in advance.
Yu
--
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 https://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 https://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.
Re: how to code the position of last element in a set
hi Renger,
I want to defind the order of the element. I show you my example:
my code:
NB5(i,l)$(ord(l)>1 and ord(l)1 and ord(l) 写é“:
> Hi Yu
> Use card(i) which will give you the cardinality of the set (the number of elements)
> Cheers
> Renger
>
> From: gamsworld@googlegroups.com [mailto:gamsworld@googlegroups.com] On Behalf Of Yu Li
> Sent: Dienstag, 19. Januar 2016 15:14
> To: gamsworld
> Subject: how to code the position of last element in a set
>
> Hallo,
>
> the position for the first element in a set we can code like this: ord(i)=1, how to code the position for the last one?
>
> Thanks in advance.
>
> Yu
> --
> 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 https://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 https://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 https://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.
RE: how to code the position of last element in a set
NB5(i,l)$(ord(l)>1 and ord(i) 1 and ord(l)1 and ord(l) 写é“:
Hi Yu
Use card(i) which will give you the cardinality of the set (the number of elements)
Cheers
Renger
From: gamsworld@googlegroups.com [mailto:gamsworld@googlegroups.com] On Behalf Of Yu Li
Sent: Dienstag, 19. Januar 2016 15:14
To: gamsworld
Subject: how to code the position of last element in a set
Hallo,
the position for the first element in a set we can code like this: ord(i)=1, how to code the position for the last one?
Thanks in advance.
Yu
--
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 https://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 https://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 https://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 https://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.
Re: how to code the position of last element in a set
hi Renger,
thank you for you help, but i don’t unterstand , why hier is ord(i) 写é“:
> NB5(i,l)$(ord(l)>1 and ord(i) Cheers
> Renger
>
> From: gamsworld@googlegroups.com [mailto:gamsworld@googlegroups.com]
> Sent: Dienstag, 19. Januar 2016 16:15
> To: gamsworld@googlegroups.com
> Subject: Re: how to code the position of last element in a set
>
> hi Renger,
>
> I want to defind the order of the element. I show you my example:
>
>
> my code:
>
> NB5(i,l)$(ord(l)>1 and ord(l) NB6(i,l)$(ord(l)>1 and ord(l)
> In there 1 ist the number of order for the first element, is the order number for the last one.
>
> some advice. Thank you!
>
> Best regards
>
> Yu
> 在 2016å¹´1月19日,15:58,Renger van Nieuwkoop 写é“:
>
>
> Hi Yu
> Use card(i) which will give you the cardinality of the set (the number of elements)
> Cheers
> Renger
>
> From: gamsworld@googlegroups.com [mailto:gamsworld@googlegroups.com] On Behalf Of Yu Li
> Sent: Dienstag, 19. Januar 2016 15:14
> To: gamsworld
> Subject: how to code the position of last element in a set
>
> Hallo,
>
> the position for the first element in a set we can code like this: ord(i)=1, how to code the position for the last one?
>
> Thanks in advance.
>
> Yu
> --
> 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 https://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 https://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 https://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 https://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 https://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.
RE: how to code the position of last element in a set
Yes, it should be.
Cheers
Renger
From: gamsworld@googlegroups.com [mailto:gamsworld@googlegroups.com]
Sent: Mittwoch, 20. Januar 2016 09:49
To: gamsworld@googlegroups.com
Subject: Re: how to code the position of last element in a set
hi Renger,
thank you for you help, but i don’t unterstand , why hier is ord(i) 写é“:
NB5(i,l)$(ord(l)>1 and ord(i)
my code:
NB5(i,l)$(ord(l)>1 and ord(l)1 and ord(l) is the order number for the last one.
some advice. Thank you!
Best regards
Yu
在 2016å¹´1月19日,15:58,Renger van Nieuwkoop 写é“:
Hi Yu
Use card(i) which will give you the cardinality of the set (the number of elements)
Cheers
Renger
From: gamsworld@googlegroups.com [mailto:gamsworld@googlegroups.com] On Behalf Of Yu Li
Sent: Dienstag, 19. Januar 2016 15:14
To: gamsworld
Subject: how to code the position of last element in a set
Hallo,
the position for the first element in a set we can code like this: ord(i)=1, how to code the position for the last one?
Thanks in advance.
Yu
--
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 https://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 https://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 https://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 https://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 https://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 https://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.
Re: how to code the position of last element in a set
hi Renger,
thank you very much again!
Yu
在 2016å¹´1月20日,10:56,Renger van Nieuwkoop 写é“:
> Yes, it should be.
> Cheers
> Renger
>
> From: gamsworld@googlegroups.com [mailto:gamsworld@googlegroups.com]
> Sent: Mittwoch, 20. Januar 2016 09:49
> To: gamsworld@googlegroups.com
> Subject: Re: how to code the position of last element in a set
>
> hi Renger,
>
> thank you for you help, but i don’t unterstand , why hier is ord(i)
> Best regards
>
> Yu
> 在 2016å¹´1月19日,16:25,Renger van Nieuwkoop 写é“:
>
>
> NB5(i,l)$(ord(l)>1 and ord(i) Cheers
> Renger
>
> From: gamsworld@googlegroups.com [mailto:gamsworld@googlegroups.com]
> Sent: Dienstag, 19. Januar 2016 16:15
> To: gamsworld@googlegroups.com
> Subject: Re: how to code the position of last element in a set
>
> hi Renger,
>
> I want to defind the order of the element. I show you my example:
>
>
> my code:
>
> NB5(i,l)$(ord(l)>1 and ord(l) NB6(i,l)$(ord(l)>1 and ord(l)
> In there 1 ist the number of order for the first element, is the order number for the last one.
>
> some advice. Thank you!
>
> Best regards
>
> Yu
> 在 2016å¹´1月19日,15:58,Renger van Nieuwkoop 写é“:
>
>
>
> Hi Yu
> Use card(i) which will give you the cardinality of the set (the number of elements)
> Cheers
> Renger
>
> From: gamsworld@googlegroups.com [mailto:gamsworld@googlegroups.com] On Behalf Of Yu Li
> Sent: Dienstag, 19. Januar 2016 15:14
> To: gamsworld
> Subject: how to code the position of last element in a set
>
> Hallo,
>
> the position for the first element in a set we can code like this: ord(i)=1, how to code the position for the last one?
>
> Thanks in advance.
>
> Yu
> --
> 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 https://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 https://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 https://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 https://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 https://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 https://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 https://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.
Re: how to code the position of last element in a set
hi Renger,
can you please help me again, how can i write the code for output the number of Iteration for some certain model, is there an option for this or some easy way?
Thank you!
yu
在 2016å¹´1月20日,10:56,Renger van Nieuwkoop 写é“:
> Yes, it should be.
> Cheers
> Renger
>
> From: gamsworld@googlegroups.com [mailto:gamsworld@googlegroups.com]
> Sent: Mittwoch, 20. Januar 2016 09:49
> To: gamsworld@googlegroups.com
> Subject: Re: how to code the position of last element in a set
>
> hi Renger,
>
> thank you for you help, but i don’t unterstand , why hier is ord(i)
> Best regards
>
> Yu
> 在 2016å¹´1月19日,16:25,Renger van Nieuwkoop 写é“:
>
>
> NB5(i,l)$(ord(l)>1 and ord(i) Cheers
> Renger
>
> From: gamsworld@googlegroups.com [mailto:gamsworld@googlegroups.com]
> Sent: Dienstag, 19. Januar 2016 16:15
> To: gamsworld@googlegroups.com
> Subject: Re: how to code the position of last element in a set
>
> hi Renger,
>
> I want to defind the order of the element. I show you my example:
>
>
> my code:
>
> NB5(i,l)$(ord(l)>1 and ord(l) NB6(i,l)$(ord(l)>1 and ord(l)
> In there 1 ist the number of order for the first element, is the order number for the last one.
>
> some advice. Thank you!
>
> Best regards
>
> Yu
> 在 2016å¹´1月19日,15:58,Renger van Nieuwkoop 写é“:
>
>
>
> Hi Yu
> Use card(i) which will give you the cardinality of the set (the number of elements)
> Cheers
> Renger
>
> From: gamsworld@googlegroups.com [mailto:gamsworld@googlegroups.com] On Behalf Of Yu Li
> Sent: Dienstag, 19. Januar 2016 15:14
> To: gamsworld
> Subject: how to code the position of last element in a set
>
> Hallo,
>
> the position for the first element in a set we can code like this: ord(i)=1, how to code the position for the last one?
>
> Thanks in advance.
>
> Yu
> --
> 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 https://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 https://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 https://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 https://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 https://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 https://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 https://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.
RE: how to code the position of last element in a set
Hi Yu
You can the iterations used to solve a model by storing yourmodelname.iterusd in a parameter.
e.g.
model test /all/;
solve test…
parameter iterationsused;
iterationsused = test.iterusd;
Cheers
Renger
From: gamsworld@googlegroups.com [mailto:gamsworld@googlegroups.com]
Sent: Freitag, 22. Januar 2016 18:59
To: gamsworld@googlegroups.com
Subject: Re: how to code the position of last element in a set
hi Renger,
can you please help me again, how can i write the code for output the number of Iteration for some certain model, is there an option for this or some easy way?
Thank you!
yu
在 2016å¹´1月20日,10:56,Renger van Nieuwkoop 写é“:
Yes, it should be.
Cheers
Renger
From: gamsworld@googlegroups.com [mailto:gamsworld@googlegroups.com]
Sent: Mittwoch, 20. Januar 2016 09:49
To: gamsworld@googlegroups.com
Subject: Re: how to code the position of last element in a set
hi Renger,
thank you for you help, but i don’t unterstand , why hier is ord(i) 写é“:
NB5(i,l)$(ord(l)>1 and ord(i)
my code:
NB5(i,l)$(ord(l)>1 and ord(l)1 and ord(l) is the order number for the last one.
some advice. Thank you!
Best regards
Yu
在 2016å¹´1月19日,15:58,Renger van Nieuwkoop 写é“:
Hi Yu
Use card(i) which will give you the cardinality of the set (the number of elements)
Cheers
Renger
From: gamsworld@googlegroups.com [mailto:gamsworld@googlegroups.com] On Behalf Of Yu Li
Sent: Dienstag, 19. Januar 2016 15:14
To: gamsworld
Subject: how to code the position of last element in a set
Hallo,
the position for the first element in a set we can code like this: ord(i)=1, how to code the position for the last one?
Thanks in advance.
Yu
--
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 https://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 https://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 https://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 https://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 https://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 https://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 https://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 https://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.