Return to search

Dataoptimering via linjär programmering : Tillämpning av linjär programmering för kostoptimering

Linjär Programmering (LP) är ett effektivt optimeringsverktyg som har en central del vid minimering eller maximering. LP kan även användas småskaligt för individuella problem som att välja vad vi borde äta. Detta förutsätter att LP är effektivt nog för att kunna lösa kostbaserade problemformuleringar och därmed är målet att undersöka dess potential till att lösa den typen av problem. Den här studien utforskar detta genom att optimera ett blandningsproblem där data som används i projektet är nutritionsdata hämtat från en livsmedelsdatabas. En inledande studie gjordes för att skapa en vision över vilka komponenter som är mest önskvärda i projektet. Därefter skapades kravspecifikationer som konkretiserade nödvändig funktionalitet. De viktigaste komponenterna som identifierades för projektet var dels hur man ställer upp ett korrekt LP-problem med nödvändiga bivillkor, och den andra faktorn var hur man använder en dynamisk storlek av bivillkor. Två lösningar valdes för att tillsätta samtliga bivillkor: Iteration och Rekursion. Att använda iterering beslutades vid nära slutet av projektet då rekursionen visade sig vara oeffektiv för uppgiften. Tidmätningar genomfördes för att undersöka vilken metod som var effektivast och itereringen var en klar vinnare över rekursionen. Detta beror på att anropsstacken blir snabbt överbelastad i Python vid rekursion och därmed är itereringen en bättre lösning för projektet. Resultatet visar att det finns potential inom LP till att lösa kostbaserade problemformuleringar. / Linear Programming (LP) is an effective optimization tool that has a central part in minimizing or maximizing. LP can also be used on a small scale for individual problems such as choosing what we should eat. This presupposes that LP is effective enough to be able to solve diet-based problem formulations and thus the goal is to investigate its potential to solve that type of problem. This study explores this by optimizing a mixing problem where the data used in the project is nutritional data retrieved from a food database. An initial study was done to create a vision of which components are most desirable in the project. Subsequently, requirements specifications were created that concretized the necessary functionality. The most important components identified for the project were partly how to set up a correct LP problem with necessary side conditions, and the second factor was how to use a dynamic size of side conditions. Two solutions were chosen to add all the side conditions: Iteration and Recursion. The use of iteration was decided at near the end of the project as the recursion proved to be inefficient for the task. Time measurements were performed to examine which method was most effective and the iteration was a clear winner over the recursion. This is because the call stack quickly becomes overloaded in Python during recursion and thus the iteration is a better solution for the project. The results show that there is potential within LP to solve diet-based problem formulations.

Identiferoai:union.ndltd.org:UPSALLA1/oai:DiVA.org:miun-39727
Date January 2020
CreatorsNorén, Björn
PublisherMittuniversitetet, Institutionen för informationssystem och –teknologi
Source SetsDiVA Archive at Upsalla University
LanguageSwedish
Detected LanguageEnglish
TypeStudent thesis, info:eu-repo/semantics/bachelorThesis, text
Formatapplication/pdf
Rightsinfo:eu-repo/semantics/openAccess

Page generated in 0.0025 seconds