constraint is ignored!

516 views
Skip to first unread message

Mahboobeh Moghaddam

unread,
May 21, 2014, 10:03:44 PM5/21/14
to am...@googlegroups.com
Hi all,

I have a simple model that does not include any optimization. In this model, I only look to find the first feasible solution.  There is a dummy objective function (minimize 1), and a set of constraints. One constraint ( allocation constraint below) is related to the need that for task in each workflow, we need to have at least one winning bid. 

# Objective function
minimize dummyobj:1;

#Allocation Constraint
subject to Task_Assignment {k in tasks_in_workflow[wfIndex]}: sum {i in BIDSN} a[i,k]*z[i] >= 1;


Now the problem is that the solver ignores this constraint in some instances. I have expanded the constraint, and I can clearly see that  it's not satisfied, as below:

subject to Task_Assignment[37]:
0 >= 1;

But the solver still finds an optimal integer solution, as per solve message below !

solve_message = 'CPLEX 10.0.0: optimal integer solution; objective 1\

Isn't it the case that a problem is only feasible if all the constraints are satisfied?

In the attached run file, I had limited the experiment to one workflow. Therefore, I can see that the problem is not caused by fixing or unfixing decision variables. Apparently, the solver ignores this constraint, but I don't understand how it's possible. 
I would really be grateful if you can help me resolve this problem. 

Regards,

fixedprice.mod
fixedprice_test.run
opt.dat.53

Mahboobeh Moghaddam

unread,
May 22, 2014, 10:12:01 PM5/22/14
to am...@googlegroups.com
Hi again,

I have also tried to turn off the presolve for both AMPL and CPLEX. But that didn't help either.  Any idea please?

Regards,

Mahboobeh Moghaddam

unread,
May 22, 2014, 10:29:32 PM5/22/14
to am...@googlegroups.com

Hi again,

Sorry for multiple posts, but I need to resolve this problem soon. 

Can this problem be related to a bug similar to this post? https://groups.google.com/forum/#!topic/ampl/V4Khc5rs_Lo

The situation seems to be similar; a constraint which is clearly not feasible from the beginning, bit it's being ignored by AMPL/CPLEX ? 

Regards,


Robert Fourer

unread,
May 23, 2014, 1:24:30 PM5/23/14
to am...@googlegroups.com
This seems to be some sort of bug, where the constraint 0 >= 1 is deleted from the problem as being an empty constraint, when it should trigger a "no feasible solution" message. (When I display Task_Assignment[37].astatus, it shows "pre"; certain presolve actions such as removing empty constraints are performed even when option presolve is 0.) I have reported this problem. In the mean time you could avoid generating such constraints, for example by writing:

subject to Task_Assignment
{k in tasks_in_workflow[wfIndex]: sum {i in BIDSN} a[i,k] > 0}:
sum {i in BIDSN} a[i,k]*z[i] >= 1;

Bob Fourer
am...@googlegroups.com

=======

Mahboobeh Moghaddam

unread,
May 25, 2014, 11:55:55 PM5/25/14
to am...@googlegroups.com, 4...@ampl.com
Hi Bob,

Thanks for your reply. As a matter of fact, I don't want to remove such empty constraints, as they are part of the data and I need such data sets to be identified as not having a feasible solution by the solver.
I couldn't try your suggestion as there is a problem with our new AMPL/CPLEX that the AMPL is up and running, but I get an error message that it can't find the CPLEX token server, as below:

" cplexamp: CPLEX Error 32201: ILM Error 4: CPLEX: cannot connect to token server on "serf13" (see http://support.ilog.com/faqmsg?m=ILM-4&v=2.6r)."

I'm not sure if this problem is related to our setup and servers or it's from your side. 

Anyway, if your suggestion will lead to not generating the empty constraint at all, and the data set will be identified as having a feasible solution, that's not really going to solve my problem.

Do you have any estimate how long it will take for the bug that you have reported to be resolved? I hope it doesn't take long as it's already more than a month that I had to stop my experiments because of the issue with the previous version of AMPL, and apparently I don't have a good luck with using AMPL recently. 

Regards,

Robert Fourer

unread,
May 26, 2014, 2:32:30 PM5/26/14
to am...@googlegroups.com
We can't make an absolute guarantee on bug fixes, but they are usually available within a week and are announced when posted. Also you could work around this problem by testing for empty constraints, with a statement like

if exists {k in tasks_in_workflow[wfIndex]} sum {i in BIDSN} a[i,k] = 0
then {...} else {...}

The condition of this if-then would be true iff there is at least one 0 >= 1 Task_Assignment constraint.

If you are getting a "cplexamp: ... ILM Error" message then you are still using a very old version of CPLEX that depends on ILOG's ILM license manager, which is no longer supported by IBM. When you renewed maintenance on AMPL you received a free 1-year academic license for the latest version of CPLEX, which you should be able to access by specifying "option solver cplex;" rather than "option solver cplexamp;". (If you get a "cplex not found" error message then probably CPLEX was not installed, and you'll have to go back to www.ampl.com/dl/ampl-download.html to download the CPLEX binaries.)

Robert Fourer

unread,
May 27, 2014, 11:01:47 PM5/27/14
to am...@googlegroups.com
The bug reported in this thread has been fixed, and new versions of the AMPL binaries (dated 20140524) have been made available for download.

Bob Fourer
am...@googlegroups.com



Reply all
Reply to author
Forward
0 new messages