<div dir="ltr"><div dir="ltr" class="gmail_msg"><div dir="ltr" class="gmail_msg">Hello Everybody<div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">I like your Python interface for the SCIP Optimization Suite. And I would like to learn more about the plugins. For that I try to solve following Election Problem:</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">I have a grid with the size of 10x10 (100 pieces/states). Every piece represents a state and every state has votes.</div><div class="gmail_msg">Votes for democrats and votes for republicans. The votes for the republicans are two times higher.</div><div class="gmail_msg">The sum of ten states defines which party wins the vote for the constituency. So there are 10 constituency.<br class="gmail_msg">The goal is that the party with the lower number of votes wins the most  constituency more precisely wins the election.</div><div class="gmail_msg">Now to make the whole part more trickier, I want that the constituency are all aside. Which means the constituency grid should look something like this:</div><div class="gmail_msg">[1, 1, 1, 1, 2, 2, 2, 5, 5, 6</div><div class="gmail_msg"> 1, 1, 1, 1, 1, 2, 2, 2, 5, 6</div><div class="gmail_msg"> 1, 4, 4, 4, 4, 2, 2, 2, 5, 6</div><div class="gmail_msg">  3, 3, 4, 4, 4, 2, 5, 5, 5,6</div><div class="gmail_msg"> ....</div><div class="gmail_msg"> ....]</div><div class="gmail_msg"><div class="gmail_msg">The number represents the number of the constituency which won the election.</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">To check if the winning constituency are aside I would like to use my own constraint handler. But I do not know which method (<a href="http://scip.zib.de/doc/html/CONS.php">http://scip.zib.de/doc/html/CONS.php</a>) I should use. </div><div class="gmail_msg">At the moment I implemented 'conscheck' and 'consenfolp'. But the time to check the correctness is way to long.</div><div class="gmail_msg">I am not sure if this is possible, but I would like to call my handler for every solution the solver sets the constituency of a state.</div><div class="gmail_msg"><br></div><div class="gmail_msg"><div class="gmail_msg">The code for my election problem with the handler can be found here:</div><div class="gmail_msg"><a href="https://gist.github.com/bhzunami/54cbc4f5ce37ba88e8c91d4ece0a4b56">https://gist.github.com/bhzunami/54cbc4f5ce37ba88e8c91d4ece0a4b56</a></div><div class="gmail_msg"><br></div></div><div class="gmail_msg">If there is a better idea I am happy to hear it.</div><div class="gmail_msg">If something is not clear please ask back or make some comments in the gist.</div><div class="gmail_msg"><br></div><div class="gmail_msg">Thank you for your help and time.<br></div><div class="gmail_msg"><br></div><div class="gmail_msg">Kind regards</div><div class="gmail_msg">Nicolas</div><div class="gmail_msg"><br></div><br class="m_-9016179870582273115inbox-inbox-Apple-interchange-newline gmail_msg"></div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg"><br></div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg"><br class="gmail_msg"></div></div></div></div>