Document
Transcription
Document
ISE 336 ART OF MATHEMATICAL MODELLING INTRODUCTION TO MATHEMATICAL MODELING AND IBM ILOG CPLEX OPTIMIZATION STUDIO 2014-2015 SPRING TERM Dr. M. Arslan Örnek LECTURE #4 THIS WEEK... Linearizing Logical Forms with Binary Variables • • • • • Using of Discrete Variables Indicator (Binary) Variables Introduction to the Theory of Logical Variables Logical forms represented by Binary Variables Linearization of compund propositions 2 INTEGER VARIABLES Indivisible (Discrete) Quantities Variables with whole numbers such as aeroplanes, cars, houses or people. Logical Variables Usually Binary (0-1) Variables but... β=0; no depot should be built, β=1; a depot of type A should be built, β=2; a depot of type B should be built, 3 LOGICAL CONDITIONS 4 THE FIXED CHARGE PROBLEM Is it a linear function ? If no, how can you make it linear ? 5 THE FIXED CHARGE PROBLEM 6 BINARY VARIABLES THEOREM 7 THE FIXED CHARGE PROBLEM 8 INTRODUCTION TO THE THEORY OF LOGICAL VARIABLES Simple Proposition : Logical variable which can take on only the values “true” or “false” Compound Proposition : Modification of a simple proposition by the word “not” or connected propositions which are connected with logical connectives such as “and”, “or”, “if-then”, and “if and only if”. 9 PROPOSITIONAL CONNECTIVES AND CONSTRAINTS 10 PROOF FOR COMPOUND PROPOSITIONS How could we prove this is equality ? 11 CONNECTIVE TRUTH TABLES # of rows : 2# of propositions # of adjacent truths : 2k proposition number # of propositions 12 TRUTH TABLE FOR EXCLUSIVE DISJUNCTION ? 13 BOOLEAN ALGEBRA PROPERTIES De Morgan’s Laws 14 LOGICAL FORMS REPRESENTED BY BINARY VARIABLES Show the following compound propositions with binary variables 15 LOGICAL FORMS REPRESENTED BY BINARY VARIABLES k n k 1 i s i 1 s k 1 k n i k 0 s 1 0 i 1 s k 1 k i 1 i k s k 1 s k 1 n n s 1 k s k i 1 i 1 16 LOGICAL FORMS REPRESENTED BY BINARY VARIABLES 17 EXAMPLE-1 Linearize the following implication: If a company decides to produce a certain item, then at least 10 units of it need to be produced; it is assumed that the production capacity is 25 units. 18 ANSWER-1 x : The number of units being produced, x ≥ 0 Logical Proposition : x 0 10 x 25 1 if x 0 0 if x 0 If the company decides to produce If the company decides not to produce x 25 x 10 x 25 x 10 1 Do we need ? Why ? x 0 x 0 x 0 0 19 EXAMPLE-2 Linearize the following implication: If item A and/or item B are produced, then at least one of the items C,D, or E have to be produced. 20 ANSWER-2 21 ANSWER-2 Can you linearize the same compound proposition without using an extra binary variable ? Is it necessary to linearize the compound proposition with an additional binary variable ? C D E A C D E B 22 EXAMPLE-3 Linearize the expression: The binary variables 1 , 2 , 3 satisfy 1 2 3 3 1 1 1 2 1 or 3 1 1 2 2 If the first and the second binary varibles are equal to 1, the third binary variable has to be equal to 1 If the third variable is equal to 1, both the first and the second variables have to be equal to 1 1 2 3 1 or 1 2 2 3 3 1 , 3 2 23 EXAMPLE-4 Linearize the expression : The inequality a x iI i i b holds if the condition X holds. X M 1 if X holds 0 otherwise 1 ai xi b iI a x iI i i b M 1 24 EXAMPLE-5 A depot can be sited at any one of the positions A,B,C,D, or E. Only one depot can be built. 25