It has been a long while since I have used GAMS, but today I started to use it again and have been having a problem.
When I run my program I get a divided by 0 error, I think that it is my por(e) variable. Is it possible to either make this variable strictly greater than 0 or better yet, in case that it is 0 to not include it in the sum?
Thanks,
Daniel
Sets
e Tipos de empresas /g, m, p/ ;
Parameters
Em(e) Empleados por tipo de empresa
/ g 15
m 5
p 1 /
V(e) # de visitas por tipo de empresa
/g 4
m 3
p 2/
Con(e) Efectividad en la consecución de empresas
/g 0.25
m 0.5
p 0.75/ ;
Scalar T Tiempo empleado en la consecucÃon de empresas
/64/ ;
Variables
x(e) numero de empresas a conseguir
por(e) porcentaje de tiempo utilizado en la consecución de empresas
i ingresos;
positive variable x(e)
Positive variable por(e) ;
Equations
ingresos funcion objetivo
empresas funcion de consecucion de empresas
porcentual limite del tiempo;
ingresos… i =e= sum(e, Em(e)*x(e));
porcentual… sum(e, por(e)) =e= 1;
empresas… sum(e$ (por(e) gt 0) ,(x(e)*V(e)*Con(e))/(por(e))) =l= T;
Model ensayo /all/;
Solve ensayo using nlp maximizing i
\
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
\