model

6 views
Skip to first unread message

Hugo Caçote

unread,
May 31, 2012, 9:14:57 AM5/31/12
to gams...@googlegroups.com
Hi,
 
I have model where i want of force that the solution variable x (j) is more than 2. How can I do this without having to specify an equation forcing the variable to be more than 2 for each j ? Currently I only have 4 j indexes but in case I increase my model I do not want to write an equation for each.
 
 
Currently I have the following modeled:
 
table d(j,k) "annual demand for j, intermediate k"
  0       1        2
1 4645    5014     8397
2 13631   19734    18219
3 10163   19667    5818
4 22168   6229     1182 ;
 
positive variable x(j) "number of campaign of j"; 
...
 
risk1..
d('1','2')/ x('1')
=g=2 ;
risk2..
d('2','2')/x('2')
=g=2 ;
risk3..
d('3','2')/ x('3')
=g=2;
risk4..
d('4','2')/ x('4')
=g=2;
 
Thank you, Cheers,
Hugo

Edson Cordeiro do Valle

unread,
May 31, 2012, 10:28:22 AM5/31/12
to gams...@googlegroups.com
You must set the lowerbound of the variable to the desired value
  x.lo(j) = 2; 

2012/5/31 Hugo Caçote <hca...@gmail.com>

--
You received this message because you are subscribed to the Google Groups "gamsworld" group.
To view this discussion on the web visit https://groups.google.com/d/msg/gamsworld/-/VUzyFRyU6QgJ.
To post to this group, send email to gams...@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.



--
       Edson Valle
eds...@gmail.com
Reply all
Reply to author
Forward
0 new messages