# Difference between revisions of "Fuzzy programming"

(→Flexible programming) |
(→Method: Flexible Programming) |
||

(27 intermediate revisions by one user not shown) | |||

Line 3: | Line 3: | ||

=Introduction= | =Introduction= | ||

− | Fuzzy programming is one of many optimization models that deal with optimization under uncertainty. This model can be applied when situations are not clearly defined and thus have uncertainty. For example, categorizing people into young, middle aged and old is not completely clear, so overlap of these categories may exist as can be seen in the image below. | + | Fuzzy programming is one of many optimization models that deal with optimization under uncertainty. This model can be applied when situations are not clearly defined and thus have uncertainty, or an exact value is not critical to the problem. For example, categorizing people into young, middle aged and old is not completely clear, so overlap of these categories may exist as can be seen in the image below. |

[[File:Agegraph.gif|thumb|right|Young, middle-aged, and old are not strictly defined categories, and may result in overlap.]] | [[File:Agegraph.gif|thumb|right|Young, middle-aged, and old are not strictly defined categories, and may result in overlap.]] | ||

− | |||

=Logical Reasoning= | =Logical Reasoning= | ||

− | Unlike binary models, where an event is either black or white, fuzzy programming allows for a grey spectrum between the two extremes. As a result, it increases the possible applications since most situations are not bipolar, but consist of a scale of values. A linear function | + | Unlike binary models, where an event is either black or white, fuzzy programming allows for a grey spectrum between the two extremes. As a result, it increases the possible applications since most situations are not bipolar, but consist of a scale of values. A linear function is often used to describe the membership function (u), which describes the 'grey spectrum' where constraint violation is permitted [1] |

<math> | <math> | ||

Line 19: | Line 18: | ||

\end{cases}</math> | \end{cases}</math> | ||

− | = | + | Continuing with the age analogy - if young ranges from ages 0 to 30, we can define 0 to 18 as being definitely young, so u = 1. However, as we increase the age from there young is not explicitly defined, and can be given lower u values, as these ages are defined as "less young". |

− | There are several types of fuzzy programming that can deal with different situations. Flexible programming | + | |

− | + | =Method: Flexible Programming= | |

− | This type of programming can be applied when there is uncertainty in the coefficient values, and a certain amount of deviation is acceptable. Starting from a typical LP model defined as: | + | There are several types of fuzzy programming that can deal with different situations. Flexible programming will be described here. This type of programming can be applied when there is uncertainty in the coefficient values, and a certain amount of deviation is acceptable. Starting from a typical LP model defined as: |

<math> | <math> | ||

Line 32: | Line 31: | ||

</math> | </math> | ||

− | + | We use ~ to identify the fuzzy (or flexible) parameters. By making the inequalities fuzzy, the user of the program can set an approximate goal to minimize/maximize an objective function rather than a completely realistic value. Furthermore, this fuzzy relation can be interpreted as "essentially smaller than or equal" instead of "smaller than or equal" | |

− | We use ~ to identify the fuzzy (or flexible) parameters. | + | |

<math> | <math> | ||

\begin{align} | \begin{align} | ||

\tilde{max} c^t x \\ | \tilde{max} c^t x \\ | ||

− | s.t. \; Ax \tilde{\le} b \\ | + | s.t. \; & Ax \tilde{\le} b \\ |

& x \ge 0 | & x \ge 0 | ||

\end{align} | \end{align} | ||

</math> | </math> | ||

− | + | If the user has a certain objective value they would like to reach, this can be combined and further simplified to: | |

− | <math>x s.t. \; Ax \tilde{\le} b</math> | + | <math> |

+ | \begin{align} | ||

+ | Find \; x \\ | ||

+ | s.t. \; & c^t x \tilde{\ge} z \\ | ||

+ | & Ax \tilde{\le} b\\ | ||

+ | & x \tilde{\ge} 0 | ||

+ | \end{align} | ||

+ | </math> | ||

+ | |||

+ | The two constraints can be combined and the problem is further simplified to: | ||

+ | |||

+ | <math> | ||

+ | \begin{align} | ||

+ | Find \; x \\ | ||

+ | s.t. \; & \hat{A}x \; \tilde{\le} \hat{b} \\ | ||

+ | \end{align} | ||

+ | </math> | ||

+ | |||

+ | u_o is the membership function for the initial objective while u_i is the membership function for the constraints. These membership functions describe how closely the fuzzy inequalities are satisfied, we can describe the optimal decision to be: | ||

+ | |||

+ | <math> | ||

+ | \max \min {u_i(x)} = \max u_o(x) | ||

+ | </math> | ||

+ | |||

+ | An optimal solution to this problem can be found by solving | ||

+ | |||

+ | <math> | ||

+ | max \; min \; 1- \frac{\hat{A}_i x - b_i}{\Delta b_i} | ||

+ | </math> | ||

+ | |||

+ | A new variable λ is used to construct an LP that can be solved easily. All membership functions must be greater than or equal to λ | ||

+ | <br> | ||

+ | <math> | ||

+ | \begin{array}{lcl} | ||

+ | \max \lambda \\ | ||

+ | s.t. \sum_{k=1}^n c_ix_i \ge z_l + \lambda(z_u - z_l)\\ | ||

+ | \sum_{k=1}^n A_{ij}x_i \le b_j + (1-\lambda)\delta b_i\\ | ||

+ | x \ge 0\\ | ||

+ | 0 \le \lambda \le 1 | ||

+ | \end{array} | ||

+ | </math> | ||

+ | <br> | ||

− | == | + | Where <math> z_l \text{ is lower bound of flexible objective and} z_u \text{is upper bound of flexible objective.} \bar{A} \; \text{and} \; \bar{b} \; \text{are} \; \bar{a}_{ij} = \hat{a}_{ij}/ \Delta b_i \; \text{and} \; \bar{b}_i = 1 + (\hat(b_i) / \Delta b_i) </math> |

− | + | <br> | |

+ | And n= m+1, total number of constraints including objective function. Furthermore, crisp constraints remain the same and can be included as additional constraints in this maximization problem [1,2] | ||

=Applications= | =Applications= | ||

+ | Fuzzy programming has several applications, but it is most widely used for air conditioning systems. Since a room cannot go on and off if the specified temperature is not met by 0.1 degrees, there is a range of temperature that is accepted. If the temperature goes below the fuzzy range, the A/C will turn off, whereas if the temperature goes above the fuzzy range, the A/C will turn back on [4]. | ||

+ | Fuzzy programming can be applied to anything where the user does not have a strict preference, and the parameters are somewhat flexible, whether it is the number of hours of labor, amount of raw material obtained, price of product sold, how far someone wants to live from work, or the amount of money someone would be willing to spend on a five-star hotel. | ||

− | = | + | =Example= |

+ | This simple example for Water Resources Management [3] shows how triangular fuzzy programs can be applied to real life situations. NO1 and NO2 provide water to other nodes, while A1 and A2 are water consumers. The goal of this problem is to calculate the amount of water that should be supplied to A1 and A2 in order to maximize profit while still meeting the given constraints [3]. | ||

− | + | [[File:Water.png]] | |

+ | This is the linear problem: | ||

+ | <math> | ||

+ | \max x_1 + 1.5x_2 \;\; \text{Revenue from consumers: A1 (1/L), A2 (1.5/L)} | ||

+ | </math> | ||

+ | <math> | ||

+ | \begin{array}{lcl} | ||

+ | x_1 &\le& 66 \;\; \text{1 amount of water into N1} \\ | ||

+ | x_2 &\le& 59 \;\; \text{2 amount of water into N2} \\ | ||

+ | x_1 &\le& 49 \;\; \text{3 maximum demand from A1} \\ | ||

+ | x_2 &\le& 35 \;\; \text{4 maximum demand from A2} \\ | ||

+ | 66+59 - 0.7x_1 - x_2 &\ge& 47 \;\; \text{5 at least 47L into N4, 30 percent of A1 enters N3} \\ | ||

+ | 59-x_2 &\ge& 8 \;\; \text{6 at least 8L into N3} \\ | ||

+ | x_1,x_2 &\ge& 0 | ||

+ | \end{array} | ||

+ | </math> | ||

+ | |||

+ | The solution to the linear program is: x1 = 49, x2 = 35 and z= 101.5. | ||

+ | |||

+ | In the fuzzy problem, the maximum demand from water consumers and the minimum amount of water into N3 and N4 are no longer crisp numbers, but have ranges of values that they may possess. | ||

+ | <math> | ||

+ | p_1 = \begin{pmatrix} | ||

+ | 49 \\ | ||

+ | 52 \\ | ||

+ | 55 | ||

+ | \end{pmatrix} | ||

+ | </math> | ||

+ | |||

+ | <math> | ||

+ | p_2 = \begin{pmatrix} | ||

+ | 35 \\ | ||

+ | 37 \\ | ||

+ | 39 | ||

+ | \end{pmatrix} | ||

+ | </math> | ||

+ | |||

+ | <math> | ||

+ | QN_1 = \begin{pmatrix} | ||

+ | 45 \\ | ||

+ | 47 \\ | ||

+ | 49 | ||

+ | \end{pmatrix} | ||

+ | </math> | ||

+ | |||

+ | <math> | ||

+ | QN_1 = \begin{pmatrix} | ||

+ | 5 \\ | ||

+ | 8 \\ | ||

+ | 11 | ||

+ | \end{pmatrix} | ||

+ | </math> | ||

+ | |||

+ | We proceed to set up our membership functions: | ||

+ | <math> | ||

+ | u_p1(x1) = | ||

+ | \begin{cases} | ||

+ | 1 & {x_1 \le 49} \\ | ||

+ | 1- \frac{x_1-49}{55-49} & 49 < x_1 \le 55 \\ | ||

+ | 0 & x1 \ge 55 | ||

+ | \end{cases}</math> | ||

+ | |||

+ | <math> | ||

+ | u_p2(x1) = | ||

+ | \begin{cases} | ||

+ | 1 & {x_1 \le 35} \\ | ||

+ | 1- \frac{x_1-35}{39-35} & 35 < x_1 \le 39 \\ | ||

+ | 0 & x1 \ge 39 | ||

+ | \end{cases}</math> | ||

+ | |||

+ | Equation 5 from the LP becomes | ||

+ | <math> | ||

+ | \begin{array}{lcl} | ||

+ | 66+59 - 0.7x_1 - x_2 &\ge& (45,49) \;\; \text{5 at least 47L into N4, 30 percent of A1 enters N3} \\ | ||

+ | 0.7x_1 + x_2 &\in& (75,105) | ||

+ | \end{array} | ||

+ | </math> | ||

+ | and Eqn 6 becomes | ||

+ | <math> | ||

+ | x_2 \in (59-11,59-5) | ||

+ | </math> | ||

+ | Finally, the objective function becomes | ||

+ | <math> | ||

+ | x_1 + 1.5x_2 \in (75,105) | ||

+ | </math> | ||

+ | |||

+ | Following the method described for flexible programming, we set up a new LP | ||

+ | |||

+ | <math> | ||

+ | \max \lambda | ||

+ | </math> | ||

+ | <br> | ||

+ | <math> | ||

+ | \begin{array}{lcl} | ||

+ | x_1 + 1.5x_2 \ge 75 + 30\lambda\\ | ||

+ | x_1 &\le& 66 \;\; \text{does not change from LP} \\ | ||

+ | x_2 &\le& 59 \;\; \text{does not change from LP} \\ | ||

+ | x_1 &\le& 49 + (1-\lambda)6 \\ | ||

+ | x_2 &\le& 35 + (1-\lambda)4 \\ | ||

+ | 0.7x_1 + x_2 &\le &76 + (1-\lambda)5\\ | ||

+ | x_2 &\le& 48 + (1-\lambda)6\\ | ||

+ | x_1,x_2 &\ge& 0\\ | ||

+ | 0 \le \lambda \le | ||

+ | \end{array} | ||

+ | </math> | ||

+ | |||

+ | The new, fuzzy, solution is x1= 49.5, x2=35.34, z = 102.5, and λ = 0.912 | ||

+ | |||

+ | =Conclusion= | ||

+ | Although relatively new and constantly developing, fuzzy programming, at least on the linear level, is quite easy to implement. It can be very useful in predicting something, or dealing with numbers that possess uncertainty. | ||

=References= | =References= | ||

+ | [1] http://www.researchgate.net/profile/Nikolaos_Sahinidis/publication/222687527_Optimization_under_uncertainty_state-of-the-art_and_opportunities/links/5463babb0cf2c0c6aec4f7a8.pdf | ||

+ | [2] http://www.worldacademicunion.com/journal/jus/jusVol01No2paper03.pdf | ||

+ | [3] http://www.ewra.net/ew/pdf/EW_2004_7-8_03.pdf | ||

+ | [4] http://aptnk.in/profile/papers/Fuzzy-Logic-Control-of-Air-Conditioners.pdf |

## Latest revision as of 22:34, 7 June 2015

Author: Irina Baek

Steward: Dajun Yue and Fenqi You

## Contents |

# Introduction

Fuzzy programming is one of many optimization models that deal with optimization under uncertainty. This model can be applied when situations are not clearly defined and thus have uncertainty, or an exact value is not critical to the problem. For example, categorizing people into young, middle aged and old is not completely clear, so overlap of these categories may exist as can be seen in the image below.

# Logical Reasoning

Unlike binary models, where an event is either black or white, fuzzy programming allows for a grey spectrum between the two extremes. As a result, it increases the possible applications since most situations are not bipolar, but consist of a scale of values. A linear function is often used to describe the membership function (u), which describes the 'grey spectrum' where constraint violation is permitted [1]

Continuing with the age analogy - if young ranges from ages 0 to 30, we can define 0 to 18 as being definitely young, so u = 1. However, as we increase the age from there young is not explicitly defined, and can be given lower u values, as these ages are defined as "less young".

# Method: Flexible Programming

There are several types of fuzzy programming that can deal with different situations. Flexible programming will be described here. This type of programming can be applied when there is uncertainty in the coefficient values, and a certain amount of deviation is acceptable. Starting from a typical LP model defined as:

We use ~ to identify the fuzzy (or flexible) parameters. By making the inequalities fuzzy, the user of the program can set an approximate goal to minimize/maximize an objective function rather than a completely realistic value. Furthermore, this fuzzy relation can be interpreted as "essentially smaller than or equal" instead of "smaller than or equal"

If the user has a certain objective value they would like to reach, this can be combined and further simplified to:

The two constraints can be combined and the problem is further simplified to:

u_o is the membership function for the initial objective while u_i is the membership function for the constraints. These membership functions describe how closely the fuzzy inequalities are satisfied, we can describe the optimal decision to be:

An optimal solution to this problem can be found by solving

A new variable λ is used to construct an LP that can be solved easily. All membership functions must be greater than or equal to λ

Where

And n= m+1, total number of constraints including objective function. Furthermore, crisp constraints remain the same and can be included as additional constraints in this maximization problem [1,2]

# Applications

Fuzzy programming has several applications, but it is most widely used for air conditioning systems. Since a room cannot go on and off if the specified temperature is not met by 0.1 degrees, there is a range of temperature that is accepted. If the temperature goes below the fuzzy range, the A/C will turn off, whereas if the temperature goes above the fuzzy range, the A/C will turn back on [4]. Fuzzy programming can be applied to anything where the user does not have a strict preference, and the parameters are somewhat flexible, whether it is the number of hours of labor, amount of raw material obtained, price of product sold, how far someone wants to live from work, or the amount of money someone would be willing to spend on a five-star hotel.

# Example

This simple example for Water Resources Management [3] shows how triangular fuzzy programs can be applied to real life situations. NO1 and NO2 provide water to other nodes, while A1 and A2 are water consumers. The goal of this problem is to calculate the amount of water that should be supplied to A1 and A2 in order to maximize profit while still meeting the given constraints [3].

This is the linear problem:

The solution to the linear program is: x1 = 49, x2 = 35 and z= 101.5.

In the fuzzy problem, the maximum demand from water consumers and the minimum amount of water into N3 and N4 are no longer crisp numbers, but have ranges of values that they may possess.

We proceed to set up our membership functions:

Equation 5 from the LP becomes and Eqn 6 becomes Finally, the objective function becomes

Following the method described for flexible programming, we set up a new LP

The new, fuzzy, solution is x1= 49.5, x2=35.34, z = 102.5, and λ = 0.912

# Conclusion

Although relatively new and constantly developing, fuzzy programming, at least on the linear level, is quite easy to implement. It can be very useful in predicting something, or dealing with numbers that possess uncertainty.

# References

[1] http://www.researchgate.net/profile/Nikolaos_Sahinidis/publication/222687527_Optimization_under_uncertainty_state-of-the-art_and_opportunities/links/5463babb0cf2c0c6aec4f7a8.pdf [2] http://www.worldacademicunion.com/journal/jus/jusVol01No2paper03.pdf [3] http://www.ewra.net/ew/pdf/EW_2004_7-8_03.pdf [4] http://aptnk.in/profile/papers/Fuzzy-Logic-Control-of-Air-Conditioners.pdf