{"id":104749,"date":"2021-01-29T14:46:24","date_gmt":"2021-01-29T09:16:24","guid":{"rendered":"https:\/\/www.vskills.in\/certification\/tutorial\/?page_id=104749"},"modified":"2024-04-12T14:28:12","modified_gmt":"2024-04-12T08:58:12","slug":"integer-optimization-models-with-binary-variables","status":"publish","type":"page","link":"https:\/\/www.vskills.in\/certification\/tutorial\/integer-optimization-models-with-binary-variables\/","title":{"rendered":"Integer Optimization Models with Binary Variables"},"content":{"rendered":"\n<p>In binary problems, each variable can only take on the value of 0 or 1. This may represent the selection or rejection of an option, the turning on or off of switches, a yes\/no answer, or many other situations. We will study a specialized branch and bound algorithm for solving BIPs, known as Balas Additive Algorithm. It requires that the problem be put into a standard form:<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img decoding=\"async\" src=\"http:\/\/www.vskills.in\/lms\/wp-content\/uploads\/2016\/05\/integer-optimization-models-with-binary-variables.jpg\" alt=\"integer-optimization-models-with-binary-variables\" class=\"wp-image-26599\"\/><\/figure><\/div>\n\n\n\n<p>This may seem like a restrictive set of conditions, but many problems are easy to convert to this form. For example, negative objective function coefficients are handled by a change of variables in which xj is replaced by (1 -xj\u2019). It is also easy to reorder the variables. Constraint right hand sides can be negative, so \u2264 constraints are easily converted to \u2265 form by multiplying through by -1. The biggest restriction is that Balas Additive Algorithm does not handle equality constraints.<\/p>\n\n\n\n<p>The keys to how Balas Algorithm works lies in its special structure<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>The objective function sense is minimization, and all of the coefficients are nonnegative, so we would prefer to set all of the variables to zero to give the smallest value of Z.<\/li><li>If we cannot s et all of the variables to 0 without violating one or more constraints, then we prefer to set the variable that has the smallest index to 1. This is because the variables are ordered so that those earlier in the list increase Z by the smallest amount.<\/li><\/ul>\n\n\n\n<p>These features also affect the rest of the branch and bound procedures. Branching is simple: each variable can only take on one of two values: 0 or 1. Bounding is the interesting part. Balas algorithm does not perform any kind of look -ahead to try to complete the solution or a simplified version of it. Instead the bounding function just looks at the cost of the next cheapest solution that might provide a feasible solution.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img decoding=\"async\" src=\"http:\/\/www.vskills.in\/lms\/wp-content\/uploads\/2016\/05\/integer-optimization-models-with-binary-variables-01.jpg\" alt=\"integer-optimization-models-with-binary-variables-01\" class=\"wp-image-26601\"\/><\/figure><\/div>\n\n\n\n<p>It is easy to determine whether the solution proposed by the bounding function is feasible: just assume that all of the variables past x<sub>N<\/sub> (when x<sub>N<\/sub> = 1) or past x<sub>N+1<\/sub> (when x<sub>N<\/sub> = 0) take on the value of zero and check all of the constraints. If all of the constraints are satisfied at the solution proposed by the bounding function, then the node is fathomed, since it is not possible to get a lower value of the objective function at any node that descends from this one (the bounding function has made sure of that). All that remains is to compare the solution value at the node to the value of the incumbent, and to replace the incumbent if the current node has a lower value.<\/p>\n\n\n\n<p>Infeasibility pruning is also worthwhile in this algorithm since it is easy to determine when a bud node can never develop into a feasible solution, no matter how the remaining variables are set. This is done by examining each constraint one by one. For each constraint, calculate the largest possible left hand side value, given the decisions made so far, as follows: (left hand side value for variables set so far) + (maximum left hand side value for variables not yet set). The second term is obtained by assuming that a variable will be set to 0 if its coefficient is negative and 1 if its coefficient is positive. If the largest possible left hand side value is still less than the right hand side constant, then the constraint can never be satisfied, no matter how the remaining variables are set, so this node can be eliminated as \u201cimpossible\u201d. For example, consider the constraint<\/p>\n\n\n\n<p>\u20134x<sub>1<\/sub> \u2013 5x<sub>2<\/sub> + 2x<sub>3 <\/sub>+ 2x<sub>4<\/sub> \u2013 3x<sub>5<\/sub> \u2265 1. Suppose that both x<sub>1<\/sub> and x<sub>2<\/sub> have already been set to 1, while the remaining variables have not yet been set. The largest possible left hand side results if x<sub>3<\/sub> and x<sub>4<\/sub> are set to 1 while x<sub>5<\/sub> is set to 0, giving a left hand side value of ( \u20139) + (4) = \u20135, which is not \u2265 1, hence the partial solution (1,1,?,?,?) cannot ever yield a feasible solution, so the node is fathomed as \u201cimpossible\u201d.<\/p>\n\n\n\n<p>Balas Additive Algorithm uses depth -first node selection. It is of course possible to replace this by another node selection strategy, such as best &#8211; first, but if you do so then you are no longer following Balas\u2019 algorithm, strictly speaking. If your problem formulation states that you are using the Balas algorithm, then you must use depth-first node selection.<\/p>\n\n\n\n<p><strong>Example<\/strong><\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img decoding=\"async\" src=\"http:\/\/www.vskills.in\/lms\/wp-content\/uploads\/2016\/05\/integer-optimization-models-with-binary-variables-03.jpg\" alt=\"integer-optimization-models-with-binary-variables-03\" class=\"wp-image-26602\"\/><\/figure><\/div>\n\n\n\n<p>Note that the variables are already ordered as required by Balas\u2019 algorithm. There are 2<sup>6<\/sup> = 64 possible solutions if they are all enumerated, but we expect that Balas\u2019 algorithm will generate far fewer full and partial solutions. The branch and bound tree develops as shown in the following diagrams. Figure below shows the root node, which has an objective function value of 0 and is infeasible by constraints 1 and 3, hence it must be expanded. From here on, each node is labeled with the bounding function value, and an indication of status for the current solution that the node represents (note that this is not the same as the bounding function solution for zero nodes). Inf indicates that the node is currently infeasible and Imp indicates that the node has been found to be impossible to satisfy; each of these notations is followed by an indication of which constraints are causing infeasibility or impossibility.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img decoding=\"async\" src=\"http:\/\/www.vskills.in\/lms\/wp-content\/uploads\/2016\/05\/integer-optimization-models-with-binary-variables-02.jpg\" alt=\"integer-optimization-models-with-binary-variables-02\" class=\"wp-image-26600\"\/><\/figure><\/div>\n\n\n\n<p>There are still live bud nodes on the developing branch and bound tree, so we choose the next node to expand, via the depth-first rule. Here we have just the two nodes to choose from, and since this is a minimization problem, we choose the node having the smallest value of the bounding function, and expand it using the next variable in the list, x<sub>2<\/sub>. This is shown in second branching figure. Note that node (1,1,?,?,?,?) is impossible by constraint 2. Once x<sub>1<\/sub> and x<sub>2<\/sub> are set to 1, no matter how the remaining variables are set, the left hand side will never be greater than \u20132.<\/p>\n\n\n\n<p>Now we select the next node for expansion. Since we are using depth-first node selection, we are left only a single bud node to choose: (1,0,?,?,?,?), with a bounding function value of 9. Best-first node selection would have chosen node (0,?,?,?,?,?) because it has a lower bounding function value of 5.<\/p>\n\n\n\n<p>The expansion of node (1,0,?,?,?,?) is shown in third branching figure. Node (1,0,0,?,?,?) is fathomed and found to be feasible when using the bounding function solution (1,0,0,1,0, 0), with an objective function value of 12. This is our first incumbent solution. Node (1,0,1,?,?,?) is found to be impossible by constraint 1.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img decoding=\"async\" src=\"http:\/\/www.vskills.in\/lms\/wp-content\/uploads\/2016\/05\/integer-optimization-models-with-binary-variables-04.jpg\" alt=\"integer-optimization-models-with-binary-variables-04\" class=\"wp-image-26610\"\/><\/figure><\/div>\n","protected":false},"excerpt":{"rendered":"<p>In binary problems, each variable can only take on the value of 0 or 1. This may represent the selection or rejection of an option, the turning on or off of switches, a yes\/no answer, or many other situations. We will study a specialized branch and bound algorithm for solving BIPs, known as Balas Additive&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-104749","page","type-page","status-publish","hentry"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Integer Optimization Models with Binary Variables - Tutorial<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.vskills.in\/certification\/tutorial\/integer-optimization-models-with-binary-variables\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Integer Optimization Models with Binary Variables - Tutorial\" \/>\n<meta property=\"og:description\" content=\"In binary problems, each variable can only take on the value of 0 or 1. This may represent the selection or rejection of an option, the turning on or off of switches, a yes\/no answer, or many other situations. We will study a specialized branch and bound algorithm for solving BIPs, known as Balas Additive...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.vskills.in\/certification\/tutorial\/integer-optimization-models-with-binary-variables\/\" \/>\n<meta property=\"og:site_name\" content=\"Tutorial\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/vskills.in\/\" \/>\n<meta property=\"article:modified_time\" content=\"2024-04-12T08:58:12+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/www.vskills.in\/lms\/wp-content\/uploads\/2016\/05\/integer-optimization-models-with-binary-variables.jpg\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.vskills.in\/certification\/tutorial\/integer-optimization-models-with-binary-variables\/\",\"url\":\"https:\/\/www.vskills.in\/certification\/tutorial\/integer-optimization-models-with-binary-variables\/\",\"name\":\"Integer Optimization Models with Binary Variables - Tutorial\",\"isPartOf\":{\"@id\":\"https:\/\/www.vskills.in\/certification\/tutorial\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.vskills.in\/certification\/tutorial\/integer-optimization-models-with-binary-variables\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.vskills.in\/certification\/tutorial\/integer-optimization-models-with-binary-variables\/#primaryimage\"},\"thumbnailUrl\":\"http:\/\/www.vskills.in\/lms\/wp-content\/uploads\/2016\/05\/integer-optimization-models-with-binary-variables.jpg\",\"datePublished\":\"2021-01-29T09:16:24+00:00\",\"dateModified\":\"2024-04-12T08:58:12+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.vskills.in\/certification\/tutorial\/integer-optimization-models-with-binary-variables\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.vskills.in\/certification\/tutorial\/integer-optimization-models-with-binary-variables\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.vskills.in\/certification\/tutorial\/integer-optimization-models-with-binary-variables\/#primaryimage\",\"url\":\"http:\/\/www.vskills.in\/lms\/wp-content\/uploads\/2016\/05\/integer-optimization-models-with-binary-variables.jpg\",\"contentUrl\":\"http:\/\/www.vskills.in\/lms\/wp-content\/uploads\/2016\/05\/integer-optimization-models-with-binary-variables.jpg\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.vskills.in\/certification\/tutorial\/integer-optimization-models-with-binary-variables\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.vskills.in\/certification\/tutorial\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Integer Optimization Models with Binary Variables\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.vskills.in\/certification\/tutorial\/#website\",\"url\":\"https:\/\/www.vskills.in\/certification\/tutorial\/\",\"name\":\"Tutorial\",\"description\":\"Vskills - A initiative in elearning and certification\",\"publisher\":{\"@id\":\"https:\/\/www.vskills.in\/certification\/tutorial\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.vskills.in\/certification\/tutorial\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.vskills.in\/certification\/tutorial\/#organization\",\"name\":\"Vskills\",\"url\":\"https:\/\/www.vskills.in\/certification\/tutorial\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.vskills.in\/certification\/tutorial\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.vskills.in\/certification\/tutorial\/wp-content\/uploads\/2017\/07\/vskills-min-logo.jpg\",\"contentUrl\":\"https:\/\/www.vskills.in\/certification\/tutorial\/wp-content\/uploads\/2017\/07\/vskills-min-logo.jpg\",\"width\":73,\"height\":55,\"caption\":\"Vskills\"},\"image\":{\"@id\":\"https:\/\/www.vskills.in\/certification\/tutorial\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/vskills.in\/\",\"https:\/\/x.com\/vskills_in\",\"https:\/\/www.linkedin.com\/company-beta\/1371554\/\",\"https:\/\/www.youtube.com\/channel\/UCMWnscxPwRF_PqXo9B7q_Tw\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Integer Optimization Models with Binary Variables - Tutorial","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.vskills.in\/certification\/tutorial\/integer-optimization-models-with-binary-variables\/","og_locale":"en_US","og_type":"article","og_title":"Integer Optimization Models with Binary Variables - Tutorial","og_description":"In binary problems, each variable can only take on the value of 0 or 1. This may represent the selection or rejection of an option, the turning on or off of switches, a yes\/no answer, or many other situations. We will study a specialized branch and bound algorithm for solving BIPs, known as Balas Additive...","og_url":"https:\/\/www.vskills.in\/certification\/tutorial\/integer-optimization-models-with-binary-variables\/","og_site_name":"Tutorial","article_publisher":"https:\/\/www.facebook.com\/vskills.in\/","article_modified_time":"2024-04-12T08:58:12+00:00","og_image":[{"url":"http:\/\/www.vskills.in\/lms\/wp-content\/uploads\/2016\/05\/integer-optimization-models-with-binary-variables.jpg","type":"","width":"","height":""}],"twitter_misc":{"Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.vskills.in\/certification\/tutorial\/integer-optimization-models-with-binary-variables\/","url":"https:\/\/www.vskills.in\/certification\/tutorial\/integer-optimization-models-with-binary-variables\/","name":"Integer Optimization Models with Binary Variables - Tutorial","isPartOf":{"@id":"https:\/\/www.vskills.in\/certification\/tutorial\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.vskills.in\/certification\/tutorial\/integer-optimization-models-with-binary-variables\/#primaryimage"},"image":{"@id":"https:\/\/www.vskills.in\/certification\/tutorial\/integer-optimization-models-with-binary-variables\/#primaryimage"},"thumbnailUrl":"http:\/\/www.vskills.in\/lms\/wp-content\/uploads\/2016\/05\/integer-optimization-models-with-binary-variables.jpg","datePublished":"2021-01-29T09:16:24+00:00","dateModified":"2024-04-12T08:58:12+00:00","breadcrumb":{"@id":"https:\/\/www.vskills.in\/certification\/tutorial\/integer-optimization-models-with-binary-variables\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.vskills.in\/certification\/tutorial\/integer-optimization-models-with-binary-variables\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.vskills.in\/certification\/tutorial\/integer-optimization-models-with-binary-variables\/#primaryimage","url":"http:\/\/www.vskills.in\/lms\/wp-content\/uploads\/2016\/05\/integer-optimization-models-with-binary-variables.jpg","contentUrl":"http:\/\/www.vskills.in\/lms\/wp-content\/uploads\/2016\/05\/integer-optimization-models-with-binary-variables.jpg"},{"@type":"BreadcrumbList","@id":"https:\/\/www.vskills.in\/certification\/tutorial\/integer-optimization-models-with-binary-variables\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.vskills.in\/certification\/tutorial\/"},{"@type":"ListItem","position":2,"name":"Integer Optimization Models with Binary Variables"}]},{"@type":"WebSite","@id":"https:\/\/www.vskills.in\/certification\/tutorial\/#website","url":"https:\/\/www.vskills.in\/certification\/tutorial\/","name":"Tutorial","description":"Vskills - A initiative in elearning and certification","publisher":{"@id":"https:\/\/www.vskills.in\/certification\/tutorial\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.vskills.in\/certification\/tutorial\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.vskills.in\/certification\/tutorial\/#organization","name":"Vskills","url":"https:\/\/www.vskills.in\/certification\/tutorial\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.vskills.in\/certification\/tutorial\/#\/schema\/logo\/image\/","url":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-content\/uploads\/2017\/07\/vskills-min-logo.jpg","contentUrl":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-content\/uploads\/2017\/07\/vskills-min-logo.jpg","width":73,"height":55,"caption":"Vskills"},"image":{"@id":"https:\/\/www.vskills.in\/certification\/tutorial\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/vskills.in\/","https:\/\/x.com\/vskills_in","https:\/\/www.linkedin.com\/company-beta\/1371554\/","https:\/\/www.youtube.com\/channel\/UCMWnscxPwRF_PqXo9B7q_Tw"]}]}},"_links":{"self":[{"href":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-json\/wp\/v2\/pages\/104749","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-json\/wp\/v2\/comments?post=104749"}],"version-history":[{"count":1,"href":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-json\/wp\/v2\/pages\/104749\/revisions"}],"predecessor-version":[{"id":104751,"href":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-json\/wp\/v2\/pages\/104749\/revisions\/104751"}],"wp:attachment":[{"href":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-json\/wp\/v2\/media?parent=104749"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-json\/wp\/v2\/categories?post=104749"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-json\/wp\/v2\/tags?post=104749"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}