tag:blogger.com,1999:blog-8781383461061929571.post2500949242689900688..comments2024-03-14T09:08:19.035-04:00Comments on OR in an OB World: Consecutive OnesPaul A. Rubinhttp://www.blogger.com/profile/05801891157261357482noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-8781383461061929571.post-82568918088905978212013-05-12T19:41:58.523-04:002013-05-12T19:41:58.523-04:00Thanks Michael. Your version is indeed considerabl...Thanks Michael. Your version is indeed considerably more sparse.Paul A. Rubinhttps://www.blogger.com/profile/05801891157261357482noreply@blogger.comtag:blogger.com,1999:blog-8781383461061929571.post-42814994318023920432013-05-12T17:16:38.216-04:002013-05-12T17:16:38.216-04:00Paul,
another way to enforce (b) is the following...Paul,<br /><br />another way to enforce (b) is the following:<br />Replace the last constraint in your last formulation with the following constraint (leaving out the straightforward handling of the border cases i = 1 and i > n - K):<br /><br />x~_i <= y_i + x~_{i-1}<br /><br />This way, it is ensured that x^~_i = 1 requires that i is either the first index in a row for which x~_i = 1 or that for its predecessor is one, that is, x~_{i-1} = 1. This approach results in the same number of constraints but considerably reduces the number of nonzeros.<br /><br /><br />Cheers,<br /><br />Michael<br />Michael Römerhttp://wior.wiwi.uni-halle.de/noreply@blogger.com