SMIN FUNCTION IS NOT WORKING

Hello GAMSworld,

I observed a dysfunction with SMIN function.

I run the following model:

solve model1 max obj using lp

data(‘xx1’)=x1.l;
data(‘xx2’)=x2.l;
data(‘xx3’)=x3.l;
data(‘xx4’)=x4.l;

solve model2 max obj1 using lp/dnlp

I set two additional constraints in model 2 which are the following:

CONMAX… XMAX=E=SMAX(i, data(i)); /data(i) parameter, set i/xx1*xx4/, XMAX, XMIN nonnegative variables.
CONMIN… XMIN=E=SMIN(i, data(i));

After getting the results data(xx1)=0.661, data(xx2)=0.339 and XMAX=0.661 but XMIN=0… which consequently means that SMIN function is not working properly.

Can please anyone help?

thank you in advance,

Konstantinos Petridis

\

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/groups/opt_out.

Konstantinos Petridis:



You mention two elements in your ‘data’ parameter, but there are four elements in your set. I expect that the last two data values are zero (which are not printed by Display) and SMIN is therefore doing exactly what it should.



Regards



Arne Stolbjerg Drud


\

Arne Stolbjerg Drud

ARKI Consulting & Development A/S

Bagsvaerdvej 246A, DK-2880 Bagsvaerd, Denmark

Phone: (+45) 44 49 03 23, Fax: (+45) 44 49 03 33, email: adrud@arki.dk



From: gamsworld@googlegroups.com [mailto:gamsworld@googlegroups.com] On Behalf Of ???sta?t??? ?et??d??
Sent: Friday, September 13, 2013 8:26 AM
To: gamsworld@googlegroups.com
Subject: SMIN FUNCTION IS NOT WORKING



Hello GAMSworld,

I observed a dysfunction with SMIN function.

I run the following model:

solve model1 max obj using lp

data(‘xx1’)=x1.l;
data(‘xx2’)=x2.l;
data(‘xx3’)=x3.l;
data(‘xx4’)=x4.l;

solve model2 max obj1 using lp/dnlp

I set two additional constraints in model 2 which are the following:

CONMAX… XMAX=E=SMAX(i, data(i)); /data(i) parameter, set i/xx1*xx4/, XMAX, XMIN nonnegative variables.
CONMIN… XMIN=E=SMIN(i, data(i));

After getting the results data(xx1)=0.661, data(xx2)=0.339 and XMAX=0.661 but XMIN=0… which consequently means that SMIN function is not working properly.

Can please anyone help?

thank you in advance,

Konstantinos Petridis


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/groups/opt_out.


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/groups/opt_out.

Hi Kostas,
Default value for partially assigned parameter data(i) is zero.
If you only specify :
data(‘xx1’) = 0.661 ;
data(‘xx2’) = 0.339 ;
then, implicitely, you will also have
data(‘xx3’) = 0 ;
data(‘xx4’) = 0 ;

… which tends to indicate that SMIN works properly.
By the way, if data is indeed a parameter, there is no need to obtain XMIN by the means of constraints and variables, you may estimate it as a simple paramter – no need to resort to DNLP for this.

Hope this helps

dax


Le vendredi 13 septembre 2013 08:25:50 UTC+2, Κωνσταντίνος Πετρίδης a écrit :

Hello GAMSworld,

I observed a dysfunction with SMIN function.

I run the following model:

solve model1 max obj using lp

data(‘xx1’)=x1.l;
data(‘xx2’)=x2.l;
data(‘xx3’)=x3.l;
data(‘xx4’)=x4.l;

solve model2 max obj1 using lp/dnlp

I set two additional constraints in model 2 which are the following:

CONMAX… XMAX=E=SMAX(i, data(i)); /data(i) parameter, set i/xx1*xx4/, XMAX, XMIN nonnegative variables.
CONMIN… XMIN=E=SMIN(i, data(i));

After getting the results data(xx1)=0.661, data(xx2)=0.339 and XMAX=0.661 but XMIN=0… which consequently means that SMIN function is not working properly.

Can please anyone help?

thank you in advance,

Konstantinos Petridis

\

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/groups/opt_out.