0

I'm running a DOCPLEX model using the python API and one of the constraints causes the following error to be thrown.:

My question is 1. what does this mean and 2. how do I disable the warning?

Warning: constraint has already been posted: _x4844 <-> [14202+14203+14204+14205+14206+14207+14208+14209+14210+19854+19855+19856+19857+19858+19859+19860+19861+19862+5175+5176+5177+5178+5179+5180+5181+5182+5183 >= 1], index is: 17
Warning: constraint has already been posted: _x4845 <-> [20034+20035+20036+20037+20038+20039+20040+20041+20042+14382+14383+14384+14385+14386+14387+14388+14389+14390+5355+5356+5357+5358+5359+5360+5361+5362+5363+2538+2539+2540+2541+2542+2543+2544+2545+2546+31293+31294+31295+31296+31297+31298+31299+31300+31301+56502+56503+56504+56505+56506+56507+56508+56509+56510+42489+42490+42491+42492+42493+42494+42495+42496+42497+17208+17209+17210+17211+17212+17213+17214+17215+17216+28485+28486+28487+28488+28489+28490+28491+28492+28493+39654+39655+39656+39657+39658+39659+39660+39661+39662+12690+12691+12692+12693+12694+12695+12696+12697+12698+17775+17776+17777+17778+17779+17780+17781+17782+17783+18342+18343+18344+18345+18346+18347+18348+18349+18350+855+856+857+858+859+860+861+862+863 >= 1], index is: 18
Sledge
  • 1,245
  • 1
  • 23
  • 47

1 Answers1

1

This warning indicates that you added the same constraint to a model more than once. Rather than suppressing the warning, you should fix your code and not add the same constraint multiple times.

Daniel Junglas
  • 5,830
  • 1
  • 5
  • 22
  • Will this break my model, or is it just a bad practice? – Sledge Nov 19 '19 at 14:06
  • 1
    It is very bad practice. Duplicate constraints mean at least duplicate work for the solver. Most likely the solver will remove the duplicates in presolve but it is still bad practice to cause this unnecessary work. – Daniel Junglas Nov 19 '19 at 15:01