Using Binary Variables to Represent Logical Conditions in Optimization Models

Anton Ovchinnikov
{"title":"Using Binary Variables to Represent Logical Conditions in Optimization Models","authors":"Anton Ovchinnikov","doi":"10.2139/ssrn.2975153","DOIUrl":null,"url":null,"abstract":"Logical conditions that link different elements of a business decision are very common in managerial practice. For example, a firm can ship only to and from warehouses that are open; patients needing MRIs can only get service in clinics that have MRI equipment; regarding an old power plant, one can decide to close it or retrofit it, but one obviously cannot retrofit a closed plant. The list goes on. In quantitative modeling of such situations, a natural step is to use IF statements such as IF(a warehouse in city N is open, then we can ship to/from it; otherwise no shipments can be made in/out of a warehouse in N). In optimization models, however, IF statements lead to non-linearity with all the associated challenges. Fortunately, nearly all logical conditions can be modeled linearly using binary variables. This note describes some helpful modeling techniques for doing that. \nExcerpt \nUVA-QA-0786 \nApr. 11, 2012 \nUsing binary variables to represent logical \nconditions in optimization MODELS \nLogical conditions that link different elements of a business decision are very common in managerial practice. For example, a firm can ship only to and from warehouses that are open; patients needing MRIs can only get service in clinics that have MRI equipment; regarding an old power plant, one can decide to close it or retrofit it, but one obviously cannot retrofit a closed plant. The list goes on. In quantitative modeling of such situations, a natural step is to use IF statements such as IF(a warehouse in city N is open, then we can ship to/from it; otherwise no shipments can be made in/out of a warehouse in N). In optimization models, however, IF statements lead to non-linearity with all the associated challenges. Fortunately, nearly all logical conditions can be modeled linearly using binary variables. This note describes some helpful modeling techniques for doing that. \nWhat Are Binary Variables? \nA binary variable is one that can take two values: 1 (which traditionally stood for “True”) or 0 (which stood for “False”). The actual meanings for 1 and 0 can be context-specific: “yes/no,” “open/closed,” “have MRI/does not have MRI,” “good/bad,” “small/large,” and so on without restriction. \nBinary representations are at the heart of computing and, as surprising as it may be, any digital object—number, text, this electronic file, digital image, sound recording, video, and everything else you see, hear, or do on your computer/smartphone/tablet—is wholly composed of zeros and ones. Logical conditions in optimization modeling are no different. \n. . .","PeriodicalId":121773,"journal":{"name":"Darden Case: Business Communications (Topic)","volume":"78 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2017-06-02","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Darden Case: Business Communications (Topic)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.2139/ssrn.2975153","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

Abstract

Logical conditions that link different elements of a business decision are very common in managerial practice. For example, a firm can ship only to and from warehouses that are open; patients needing MRIs can only get service in clinics that have MRI equipment; regarding an old power plant, one can decide to close it or retrofit it, but one obviously cannot retrofit a closed plant. The list goes on. In quantitative modeling of such situations, a natural step is to use IF statements such as IF(a warehouse in city N is open, then we can ship to/from it; otherwise no shipments can be made in/out of a warehouse in N). In optimization models, however, IF statements lead to non-linearity with all the associated challenges. Fortunately, nearly all logical conditions can be modeled linearly using binary variables. This note describes some helpful modeling techniques for doing that. Excerpt UVA-QA-0786 Apr. 11, 2012 Using binary variables to represent logical conditions in optimization MODELS Logical conditions that link different elements of a business decision are very common in managerial practice. For example, a firm can ship only to and from warehouses that are open; patients needing MRIs can only get service in clinics that have MRI equipment; regarding an old power plant, one can decide to close it or retrofit it, but one obviously cannot retrofit a closed plant. The list goes on. In quantitative modeling of such situations, a natural step is to use IF statements such as IF(a warehouse in city N is open, then we can ship to/from it; otherwise no shipments can be made in/out of a warehouse in N). In optimization models, however, IF statements lead to non-linearity with all the associated challenges. Fortunately, nearly all logical conditions can be modeled linearly using binary variables. This note describes some helpful modeling techniques for doing that. What Are Binary Variables? A binary variable is one that can take two values: 1 (which traditionally stood for “True”) or 0 (which stood for “False”). The actual meanings for 1 and 0 can be context-specific: “yes/no,” “open/closed,” “have MRI/does not have MRI,” “good/bad,” “small/large,” and so on without restriction. Binary representations are at the heart of computing and, as surprising as it may be, any digital object—number, text, this electronic file, digital image, sound recording, video, and everything else you see, hear, or do on your computer/smartphone/tablet—is wholly composed of zeros and ones. Logical conditions in optimization modeling are no different. . . .
用二元变量表示优化模型中的逻辑条件
将商业决策的不同要素联系起来的逻辑条件在管理实践中非常常见。例如,一家公司只能在开放的仓库之间运送货物;需要核磁共振成像的患者只能在拥有核磁共振成像设备的诊所获得服务;对于一个老电厂,人们可以决定关闭它或改造它,但显然不能改造一个关闭的电厂。这样的例子不胜枚举。在这种情况的定量建模中,一个自然的步骤是使用IF语句,如IF(N城市的仓库是开放的,那么我们可以从它发货;否则,在N)内的仓库无法出货。然而,在优化模型中,IF语句会导致所有相关挑战的非线性。幸运的是,几乎所有的逻辑条件都可以使用二元变量进行线性建模。本文描述了一些有用的建模技术。在优化模型中使用二元变量来表示逻辑条件,逻辑条件将商业决策的不同元素联系起来,这在管理实践中是非常常见的。例如,一家公司只能在开放的仓库之间运送货物;需要核磁共振成像的患者只能在拥有核磁共振成像设备的诊所获得服务;对于一个老电厂,人们可以决定关闭它或改造它,但显然不能改造一个关闭的电厂。这样的例子不胜枚举。在这种情况的定量建模中,一个自然的步骤是使用IF语句,如IF(N城市的仓库是开放的,那么我们可以从它发货;否则,在N)内的仓库无法出货。然而,在优化模型中,IF语句会导致所有相关挑战的非线性。幸运的是,几乎所有的逻辑条件都可以使用二元变量进行线性建模。本文描述了一些有用的建模技术。什么是二元变量?二进制变量可以有两个值:1(传统上代表“真”)或0(代表“假”)。1和0的实际含义可以根据具体情况而定:“是/否”、“打开/关闭”、“做MRI/不做MRI”、“好/坏”、“小/大”等等,没有限制。二进制表示是计算的核心,令人惊讶的是,任何数字对象——数字、文本、电子文件、数字图像、录音、视频,以及你在电脑/智能手机/平板电脑上看到、听到或做的任何事情——都完全由0和1组成。优化建模中的逻辑条件没有什么不同. . . .
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术官方微信