Is it possible to use $Eval and $Ifthen with parameter values?

Dear all,

I have not been able to find any example where $Eval and $Ifthen are used using parameter values imported from Excel. For example if I try the following code:

  • Both parameters “years” and “years_limit” are imported from excel
    parameter years, years_limit;
    years = 12;
    years_limit = 15;

$Set Nyrs
$Eval Nyrs years

parameter test;
test = %Nyrs%;

$Ifthen.one “%Nyrs%” < years_limit
test = years_limit;
$Endif.one

display test;

I get an error that says: “Error 659 … Error in evaluation”. Any help on this issue is more than welcome.

Thanks in advance for your help,


Sincerely yours,
Pedro


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.

Dear all,

Any suggestions or ideas on this issue?


Thanks in advance for your help,


Sincerely yours,
Pedro


On Mon, Mar 3, 2014 at 1:03 PM, PowerChile wrote:

Dear all,

I have not been able to find any example where $Eval and $Ifthen are used using parameter values imported from Excel. For example if I try the following code:

  • Both parameters “years” and “years_limit” are imported from excel
    parameter years, years_limit;
    years = 12;
    years_limit = 15;

$Set Nyrs
$Eval Nyrs years

parameter test;
test = %Nyrs%;

$Ifthen.one “%Nyrs%” < years_limit
test = years_limit;
$Endif.one

display test;

I get an error that says: “Error 659 … Error in evaluation”. Any help on this issue is more than welcome.

Thanks in advance for your help,


Sincerely yours,
Pedro


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.



\

PEDRO JAVIER RAMÍREZ TORREALBA
Ingeniero Civil Eléctrico PUC
MSc en Ingeniería Eléctrica PUC
Londres, REINO UNIDO

Celular: +44-(0)75-8069-3119


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.