« Return to Thread: [AMPL 2576] Assignment and constraints

[AMPL 2576] Assignment and constraints

by x-22 :: Rate this Message:

Reply to Author | View in Thread



Hi all,

I have the following. I'm keeping the syntax simple here for ease of discussion.

var L{0..4}, M{0..4};
var final >= 0;

c1{j in 0..4}: L[j] <= M[j];

c2{j in 1..4}: L[j] = L[0];

c{j in 0..4}: final = sum{j} (M[j] - L[j]);

minimize{j in 0..4}: final;

#need this explicitly?
#c3{j in 0..4}: L[0] <= M[j];

This crashes FilMINT solver. Unfortunately, I don't get any indication of what or where the problem is when the solver crashes.. So, I tried it with MINOS solver; it ignores integrality (not related to the variables shown here) but solves the problem. However, it picks L[0] to have a value that is not <= each M[j] which makes final negative. But this is not what I expected.

So, my question is this - when L[1..4] is assigned L[0], will L[0] value be selected by the solver to be <= each of the M[j] per constraint c1?

[Or, does the solver pick L[0] <= M[0], assign L[0] to the rest of the L[j] and then crash if c1 or final_LB is violated? In that case, I'd have to include c3 constraint but even that hasn't helped me with FilMINT so far. However, me forcing L[0] to have a valid value (through a constraint) helps..]

Sincere thanks in advance for any and all information!


     

--~--~---------~--~----~------------~-------~--~----~
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 2576] Assignment and constraints