« Return to Thread: [AMPL 1826] Seemingly incorrect behavior: AMPL if block evaluation

[AMPL 1826] Seemingly incorrect behavior: AMPL if block evaluation

by David Veerasingam :: Rate this Message:

Reply to Author | View in Thread


Hello all,

It seems to me that AMPL is evaluating `if' blocks even when the
condition is false.

Example:
1) I have an `if' block that looks like this

    if (time >= 2) then {
        include process.run;
    }

2) However, I've found that even when time = 0, the block still
executes and AMPL quits on this error:

        Can't find  file "process.run"
context:  include  >>> process.run; <<<

Well, the process.run file isn't generated at the conditions time = 0
or time = 1. The `if' statement is supposed to prevent that block from
executing.

Therefore my question is: How can I force AMPL to avoid throwing an
error?

Thanks for your help!

David
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "AMPL Modeling Language" group.
To post to this group, send email to ampl@...
To unsubscribe from this group, send email to ampl-unsubscribe@...
For more options, visit this group at http://groups.google.com/group/ampl?hl=en
-~----------~----~----~----~------~----~------~--~---

 « Return to Thread: [AMPL 1826] Seemingly incorrect behavior: AMPL if block evaluation

LightInTheBox - Buy quality products at wholesale price!