Fuzzy programming: Difference between revisions

From Cornell University Computational Optimization Open Textbook - Optimization Wiki
Jump to navigation Jump to search
(fixed reference)
Line 13: Line 13:
<math>u_A(x) = \begin{cases} 0,\qquad x\leq b \\ \frac{x-a}{b-a},\quad a\leq x \leq b \\ 1,\qquad x>b \end{cases}</math>                     
<math>u_A(x) = \begin{cases} 0,\qquad x\leq b \\ \frac{x-a}{b-a},\quad a\leq x \leq b \\ 1,\qquad x>b \end{cases}</math>                     


For instance, let's say that we have a set of values that describe temperatures over the course of a week. In Boolean logic, we could create two sets, a cold set and an hot set. We could say that temperatures [0°F, 60°F)  belong to the cold set and temperatures [60°F, 100°F] belong to the hot set. However, it is not very accurate to say that 60°F is cold, but 60.1°F is hot. Instead, we could use Fuzzy Logic to describe temperatures 0°F - 50°F as not hot (u=0). As temperatures increase from 50°F, they are given a higher degree of membership (u>0) to describe that they are "more hot" or warm. Lastly, temperatures above 70°F are definitely hot (u=1) [3].  
For instance, let's say that we have a set of values that describe temperatures over the course of a week. In Boolean logic, we could create two sets, a cold set and an hot set. We could say that temperatures [0°F, 60°F)  belong to the cold set and temperatures [60°F, 100°F] belong to the hot set. However, it is not very accurate to say that 60°F is cold, but 60.1°F is hot. Instead, we could use Fuzzy Logic to describe temperatures 0°F - 50°F as not hot (u=0). As temperatures increase from 50°F, they are given a higher degree of membership (u > 0) to describe that they are "more hot" or warm. Lastly, temperatures above 70°F are definitely hot (u=1) [3].  


== Flexible Mathematical Programming Method ==
== Flexible Mathematical Programming Method ==
Line 43: Line 43:
== Example ==
== Example ==


An example that showcases fuzzy logic can be described by a simple water allocation problem [5]. Suppose we have a scenario where we have 3 firms wishing to receive a certain amount of water from the flow of a river. Each firm has their own benefit from the water allocation and the amount of water allocated to all of the firms can't exceed the amount in the river or the amount of flow Q.  
An example that showcases fuzzy logic can be described by a simple water allocation problem [1]. Suppose we have a scenario where we have 3 firms wishing to receive a certain amount of water from the flow of a river. Each firm has their own benefit from the water allocation and the amount of water allocated to all of the firms can't exceed the amount in the river or the amount of flow Q.  
[[File:Tps94 water allocation.png|thumb|712x712px|Water Allocation Scenario|alt=|center]]
[[File:Tps94 water allocation.png|thumb|712x712px|Water Allocation Scenario|alt=|center]]


Line 62: Line 62:




<math display="inline"> max \ \ TB(X)=(6x_1-(x_1)^2)+(7x_2-(1.5x_2)^2)+(8x_3-(0.5x_3)^2)</math>
<math display="inline"> max \ \ TB(X)=(6x_1-x_1^2)+(7x_2-1.5x_2^2)+(8x_3-0.5x_3^2)</math>


<math display="inline">s.t. \ x_1+x_2+x_3\leq 6</math>.  
<math display="inline">s.t. \ x_1+x_2+x_3\leq 6</math>.  
Line 75: Line 75:


A fuzzy variant of this model would be when each firm's benefits are maximized. The first step for this fuzzy variant would be adding a new factor involving the membership function for each of the firms. The member function can be summed up into the equation below:
A fuzzy variant of this model would be when each firm's benefits are maximized. The first step for this fuzzy variant would be adding a new factor involving the membership function for each of the firms. The member function can be summed up into the equation below:




<math>m(X)= [(6x_1 - x_1^2) +(7x_2- 1.5x_2^2)+ (8x_3- 0.5x_3^2)]/ 49.17</math>
<math>m(X)= [(6x_1 - x_1^2) +(7x_2- 1.5x_2^2)+ (8x_3- 0.5x_3^2)]/ 49.17</math>




Line 87: Line 89:


Thus the overall optimization problem changes to a maximum/minimum dilemma where we are maximizing <math>M_G(X)</math> and minimizing <math>M_C(X)</math>:
Thus the overall optimization problem changes to a maximum/minimum dilemma where we are maximizing <math>M_G(X)</math> and minimizing <math>M_C(X)</math>:




Line 93: Line 96:


<math>m_C(X)=[7-(x_1+x_2+x_3)]/2</math>
<math>m_C(X)=[7-(x_1+x_2+x_3)]/2</math>




This results in <math>x_1=0.91, x_2=0.94, x_3=3.81, m(X)=0.67</math>, and the total benefit being <math>TB(X)=33.1</math>.
This results in <math>x_1=0.91, x_2=0.94, x_3=3.81, m(X)=0.67</math>, and the total benefit being <math>TB(X)=33.1</math>.


This result accounts from some uncertainty in our assumptions which is a common issue in a lot of real world problems which is why fuzzy logic is used in a lot of real word applications and controllers.
This result accounts from some uncertainty in our assumptions which is a common issue in a lot of real world problems which is why fuzzy programming is used in a lot of real word applications and controllers for various systems.


== Conclusion ==
== Conclusion ==
Line 110: Line 114:


[4] http://www.worldacademicunion.com/journal/jus/jusVol01No2paper03.pdf
[4] http://www.worldacademicunion.com/journal/jus/jusVol01No2paper03.pdf
[5]https://ecommons.cornell.edu/bitstream/handle/1813/2804/05_chapter05.pdf?sequence=16&isAllowed=y

Revision as of 00:16, 26 November 2020

Authors: Kyle Clark, Matt Schweider, Tommy Sheehan, Jarred Melancon (SYSEN 6800, Fall 2020)

Steward: Wei-Han Chen, Fengqi You

Introduction

Fuzzy Programming is an optimization model that deals with performing optimization in the presence of uncertainty. This optimization technique is used when determining the exactness of a system's performance criteria/parameters and decision variables is not possible. Specifically, the truth values associated with the system can be completely false (0), completely true (1), or some value between the two extremes. This aims to capture the concept of partial truth. One approach to account for uncertainty in a system is to model the uncertainty using probability distributions, also know as statistical analysis. However, sometimes uncertainty is sometimes described using qualitative adjectives, or 'Fuzzy' statements, such as young or old and hot or cold, because exact boundaries do not necessarily exist [1].

Fuzzy Programming is built on the concept of Fuzzy Logic. The motivation for Fuzzy Logic, or more precisely Fuzzy Set Theory, is to accurately model and represent real world data which is often 'Fuzzy' due to uncertainty. This uncertainty can be introduced into a system by a number of factors such as imprecision in measurement tools or due to the use of vague language [2].

Fuzzy Logic

While Boolean Logic is used to describe situations as completely true or completely false, Fuzzy Logic allows for a mathematical representation of partial truth or partial falsehood. Rather than having strict criteria for defining what is part of the set and what is not (e.g. hot or cold, young or old), we allow data to have a degree of membership (u) to each set. A membership function defines how each input value is mapped to a degree of membership (u) between the two extremes, 0 and 1. Membership functions can be several different types of functions. However, they are often Piece-Wise Linear Functions [3]. Below is an example of an L-Function.

For instance, let's say that we have a set of values that describe temperatures over the course of a week. In Boolean logic, we could create two sets, a cold set and an hot set. We could say that temperatures [0°F, 60°F) belong to the cold set and temperatures [60°F, 100°F] belong to the hot set. However, it is not very accurate to say that 60°F is cold, but 60.1°F is hot. Instead, we could use Fuzzy Logic to describe temperatures 0°F - 50°F as not hot (u=0). As temperatures increase from 50°F, they are given a higher degree of membership (u > 0) to describe that they are "more hot" or warm. Lastly, temperatures above 70°F are definitely hot (u=1) [3].

Flexible Mathematical Programming Method

An optimization technique used to implement Fuzzy Programming is Flexible Mathematical Programming. This kind of problem takes on the form of

where the "~" conveys the concept that the objective statement and constraints have some freedom in how they are satisfied. This approach is useful when strict satisfaction of the constraints creates an empty feasible set. Relaxing the constraints with the "~" allows for maneuverability within the potential solutions.

An easier way to represent the constraints is through the use of membership functions which are fuzzy sets of .

where represents the set of constraints which have a certain threshold that can be violated. The above membership functions are used to determine the degree of membership or how violated a certain constraint is. If , then the constraint is not violation. If , then the constraint is violated. The in between case of allows for partial violation of a constraint. The values of can be carefully selected to create constraints that allow for the desired amount of flexibility.

The above membership functions can be combined into a single piecewise function like the function shown within the Fuzzy Logic section of this page.

The optimal solution then becomes the value of x that provides the highest degree of membership while satisfying all constraints expressed by the above fuzzy sets or [4].

Applications

Fuzzy Programming can be applied in a number of fields including media selection in advertising, automated braking in cars, water resource management, and control systems in HVAC systems [4].

Example

An example that showcases fuzzy logic can be described by a simple water allocation problem [1]. Suppose we have a scenario where we have 3 firms wishing to receive a certain amount of water from the flow of a river. Each firm has their own benefit from the water allocation and the amount of water allocated to all of the firms can't exceed the amount in the river or the amount of flow Q.

Water Allocation Scenario

Our goal in this problem is to maximize the water allocation to three separate firms from a single source, being a river. Therefore we get this optimization problem:



As we mentioned before, the total allocation of water for these three firms cannot exceed the total amount of water available, which will be represented by the variable Q. This deducted from that total will be the amount of water that has to remain in the river, R which gives us our value: . Using this will give us an idea of the water that can be allocated to the firms. For our case, we will assume that the value . Thus our new optimization function becomes:


.


With that constraint, the optimal solution will be giving a value of .

The problem depicted above was an example of a crisp problem where we knew the exact value for the limit of water to allocate. However, in the real world, we don't always have exact values; therefore, we can apply fuzzy logic to make the problem more realistic.

A fuzzy variant of this model would be when each firm's benefits are maximized. The first step for this fuzzy variant would be adding a new factor involving the membership function for each of the firms. The member function can be summed up into the equation below:



This has a similar constraint to the linear version in regards to the total water, . The optimal solution of this function is thus the same as the linear variant and the degree of satisfaction is . However, things begin to change when the total amount of units of water becomes more or less 6 units instead of just a crisp 6. The nomenclature "more or less 6 " is where we start to apply the fuzzy logic implying that the value will be around 6. Therefore we can classify the possibilities into membership functions around the values (5, 6, 7) adjusting the membership value between 0 and 1.

Adjusting the membership with these values yields the membership function:

Thus the overall optimization problem changes to a maximum/minimum dilemma where we are maximizing and minimizing :



This results in , and the total benefit being .

This result accounts from some uncertainty in our assumptions which is a common issue in a lot of real world problems which is why fuzzy programming is used in a lot of real word applications and controllers for various systems.

Conclusion

The optimization technique of Fuzzy Programming is useful when qualitative adjectives are the only available descriptors for a system's performance criteria/parameters and decision variables.

References

[1] https://ecommons.cornell.edu/bitstream/handle/1813/2804/05_chapter05.pdf?sequence=16&isAllowed=y

[2] https://books.google.com/books?id=IkajJC9iGxMC&pg=PA73#v=onepage&q&f=false

[3] https://www.mathworks.com/help/fuzzy/foundations-of-fuzzy-logic.html#:~:text=northern%20hemisphere%20climates).-,Membership%20Functions,name%20for%20a%20simple%20concept

[4] http://www.worldacademicunion.com/journal/jus/jusVol01No2paper03.pdf