<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent posts to Submit a (potential) bug + questions related to Min/Max</title><link>https://sourceforge.net/p/asteroid/discussion/bug/thread/01a083e7/</link><description>Recent posts to Submit a (potential) bug + questions related to Min/Max</description><atom:link href="https://sourceforge.net/p/asteroid/discussion/bug/thread/01a083e7/feed.rss" rel="self"/><language>en</language><lastBuildDate>Fri, 01 Jun 2012 11:05:17 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/asteroid/discussion/bug/thread/01a083e7/feed.rss" rel="self" type="application/rss+xml"/><item><title>Submit a (potential) bug + questions related to Min/Max</title><link>https://sourceforge.net/p/asteroid/discussion/howto/thread/01a083e7/</link><description>Corrected again (thank you Jean-Noël) in [r50]</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Renaud De Landtsheer</dc:creator><pubDate>Fri, 01 Jun 2012 11:05:17 -0000</pubDate><guid>https://sourceforge.netf28d8da26851d0ed3858ffc8c3a50a420d07a7b8</guid></item><item><title>Submit a (potential) bug + questions related to Min/Max</title><link>https://sourceforge.net/p/asteroid/discussion/howto/thread/01a083e7/</link><description>Better bounds are computed in [r49]</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Renaud De Landtsheer</dc:creator><pubDate>Fri, 01 Jun 2012 09:23:32 -0000</pubDate><guid>https://sourceforge.netacf7475bba121df2fc8ee33b4c3e4d5a18c05c4f</guid></item><item><title>Submit a (potential) bug + questions related to Min/Max</title><link>https://sourceforge.net/p/asteroid/discussion/howto/thread/01a083e7/</link><description>Oops, you are right. This is corrected in [r48] with correct bounds. Better bounds will be added soon. 
</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Renaud De Landtsheer</dc:creator><pubDate>Fri, 01 Jun 2012 09:13:08 -0000</pubDate><guid>https://sourceforge.neta7f9a784e6a6c99ad3d9efc5bef48366ff0ecccf</guid></item><item><title>Submit a (potential) bug + questions related to Min/Max</title><link>https://sourceforge.net/p/asteroid/discussion/howto/thread/01a083e7/</link><description>Hi again,

Thank you for the rapid answer! For ArgMaxArray, I had a look at this also, but it would require me to know beforehand the set of all variables that would be potentially involved in the Max. Anyway, I found another way to do it: collecting all the variables in a SortedSet, and only posting the Invariant just before closing the whole model. In fact, this is no more complicated ;-)

Regarding the MyMin and MyMax, I still feel that there is a problem to compute them... If I understand correctly, MyMin and MyMax must bound the range of possible values for the output variable. So, imagine we compute the min or max of x1 which has a range of possible values in 1..5 and x2 in 6..10. Clearly the possible range of the output variable will be 1..5 if we look for the min, while it will be 6..10 if we look for the max. So they cannot be computed the same way. They might be computed the same way, if you approximated the output range to 1..10, but this is not what is done either, as in both case, you would return 6..10. Am I missing something?

Cheers,

JN</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jean-Noël Monette</dc:creator><pubDate>Fri, 01 Jun 2012 09:04:48 -0000</pubDate><guid>https://sourceforge.netb05e77b08b5954f9fb99a6aef6f86ad43855d642</guid></item><item><title>Submit a (potential) bug + questions related to Min/Max</title><link>https://sourceforge.net/p/asteroid/discussion/howto/thread/01a083e7/</link><description>
MyMax and MyMin are actually the range of the output variable of the invariant. This is a mechanism that is proposed for IntInvariants and IntSetInvariants. Using this comparison symbol is tehrefore correct, as it is not influenced by the implementation of MiaxLin

About the override, you are right, it is corrected, and comitted to the SVN, thank you :-)

About why MiaxLin uses a SorteSet, you are right as well, I am removing all these, and putting iterables instead, or arrays. SortedSets are defined at the scala level, so you cannot modify the SortedSet after the invariant is created. 

At present, it is not possible to doi this using the Miax or MiaxLin. Instead, I suggest you have a look at the ArgMaxArray and ArgMin Array. They not only output the ArgMax/ArgMin, but also the Max/Min (see getMax and getMin methods), and they take two parameters: an array of IntVar, on which they compute the Miax and ArgMiax, and an IntSetVar, which specifies the indexes of the IntVar to be considered in this invariant. To do wat you want, you rather add/remove values to this IntSetVar. 
</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Renaud De Landtsheer</dc:creator><pubDate>Fri, 01 Jun 2012 08:44:21 -0000</pubDate><guid>https://sourceforge.net5a57b4fc4f7dcbbff4f0c73cb78eece7be75d12a</guid></item></channel></rss>