Hi Konstantinos
What is the probability that the sum of three random numbers is 1? My guess is zero. This means that you will not solve any model instance, at least not with this probability distribution.
Regards
Arne
\
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 Renger van Nieuwkoop
Sent: Friday, October 04, 2013 5:11 PM
To:
Subject: Re: sum of weight equal to 1
Hi Konstantinos
You should use i not ii in the loop.
Cheers
Renger
sent from my iPad
Am 04.10.2013 um 16:18 schrieb “Κωνσταντίνος ΠετÏίδης” :
Hello,
I have three weights let’s say: w1=U[0,1], w2=U[0,1], w3=U[0,1].
I want to solve a model only if the sum of the three weights are equal to 1 or w1+w2+w3=1.
I did the following:
set i/1*100/;
.
.
.
w1(i)=uniform(0,1);
w2(i)=uniform(0,1);
w3(i)=uniform(0,1);
.
.
.
alias(i,ii);
loop(ii,
if( w1(i)+w2(i)+w3(i)=1,
Solve MODEL MAX OBJ;
);
);
But after the first iteration it stops.
Can you please help me?
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.
–
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.