SlideShare ist ein Scribd-Unternehmen logo
1 von 13
Downloaden Sie, um offline zu lesen
Pesquisa Operacional – Programação Linear no R-project



     O método simplex é utilizado na resolução de problemas de
  transporte onde se deseja minimizar o custo de transporte, aplicamos
  a técnica na minimização do custo de um problema de transporte com
Graziela oito destinos. O método foi desenvolvido no2012
 oito origens e
                M. Alves - PO - UFS software
  estatístico R- Project, onde é possível aplicar o método simplex,
  carregando inicialmente o pacote library(boot).
Pesquisa Operacional – Programação Linear no R-project

     O problema de transporte é um tipo especial de
   problema de programação linear que trata do envio de
   produtos da origem para o destino. O problema de
Graziela M. Alves - PO e- também 2012
  designação designa atividades, UFS é um
   problema   onde    aplica-se   programação   linear,   no
   presente trabalho a origem são trabalhadores e o
   destino a carga horária de trabalho.
Pesquisa Operacional – Programação Linear no R-project



     No    R-   Project,   carregamos    o   pacote
   library(boot), escrevemos a função objetivo,
Graziela M. as restrições e -em seguida
  escrevemos Alves - PO UFS 2012
   usamos o algoritmo que realiza o cálculo de
   minimização de custos através do SIMPLEX.
Pesquisa Operacional – Programação Linear no R-project

 PROBLEMA DE TRANSPORTE

    Uma empresa é contratada pelo MDS, para distribuir
 laranjas em municípios do alto sertão sergipano. Os
Graziela M. Alves - laranja.-Deseja-se 2012
 municípios de origem produzem PO UFS saber
 a melhor forma de planejar a distribuição de laranja para
 os municípios do alto sertão, de modo que o custo seja
 mínimo. Cada caminhão tipo baú tem capacidade máxima
 de 41.000 Kg de laranja e a demanda de cada município é
 de 40.000 Kg de laranja.
Tabela c/ custos do transporte




Graziela M. Alves - PO - UFS 2012
Solução no R
> #Implementando no R o problema de transporte de 5 origens e 5 destinos
> library (boot) #Pacote com o comando SIMPLEX no R
> z=c(60,40,70,50,30,30,30,60,70,50,50,60,80,70,40,40,50,60,70,60,30,40,70,60,50)
> #Abaixo as restrições, considerando que o sistema é equilibrado
> res1=c(1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
> res2=c(0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
> res3=c(0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0)
> res4=c(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,0,0,0,0,0)
> res5=c(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1)
> simplex(a=z,A3=rbind(res1,res2,res3,res4,res5),b3=c(40000),maxi=FALSE)
#as restrições são iguais, já que o sistema é equilibrado, sendo assim não repete-se 40000, 5 vezes.
> library(boot)
> z=c(60,40,70,50,30,30,30,60,70,50,50,60,80,70,40,40,50,60,70,60,30,40,70,60,50)
> length(z)

Graziela M. Alves - PO - UFS 2012
[1] 25
> res1=c(1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
> res2=c(0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
> res3=c(0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0)
> res4=c(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,0,0,0,0,0)
> res5=c(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1)
> simplex(a=z,A3=rbind(res1,res2,res3,res4,res5),b3=c(40000),maxi=FALSE)


Linear Programming Results


Call : simplex(a = z, A3 = rbind(res1, res2, res3, res4, res5), b3 = c(40000),
  maxi = FALSE)


Minimization Problem with Objective Function Coefficients
 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16 x17 x18 x19 x20 x21 x22 x23 x24 x25
Pesquisa Operacional – Programação Linear no R-project

   60 40 70 50 30 30 30 60 70 50 50 60 80 70 40 40 50 60 70 60 30 40 70 60 50




   Optimal solution has the following values




Graziela M. Alves - PO - UFS 2012
        x1
   x24 x25
              x2   x3   x4   x5   x6   x7   x8       x9 x10 x11 x12 x13 x14 x15 x16 x17 x18 x19 x20 x21 x22 x23




          0    0   0    0 40000 40000       0    0     0   0   0   0   0   0 40000 40000   0   0   0   0 40000   0   0   0
   0

   The optimal value of the objective function is 6800000.
Pesquisa Operacional – Programação Linear no R-project

    PROBLEMA DE DESIGNAÇÃO

      Uma empresa em convesão coletiva de trabalho decidiu
    pagar seus trabalhadores por horas de trabalho, foi pactuado
    que as horas-extras também seguiriam a tabela de hora de
Graziela M. por oito categorias em acordo coletivo de
  trabalho, decidida
                     Alves - PO - UFS 2012
    trabalho.   Porém   notando   aumento    dos   gastos   com
    pagamento de funcionários a empresa deseja determinar uma
    carga horária fixa para cada trabalhador, de modo a minimizar
    os gastos com pagamento de salário de funcionários.
Pesquisa Operacional – Programação Linear no R-project




Graziela M. Alves - PO - UFS 2012
Problema de designação com 8 origens e 8 destinos. Resolução no R

      > library(boot)

      >
z=c(40,42,44,46,40,41,38,46,46,41,40,42,45,43,45,43,43,45,42,41,30,44,38,30,44,30,41,45,38,42,44,40,42,40,45,38,46,38,39,41,41,46,4
6,44,43,40,46,45,45,43,48,39,44,42,30,39,30,44,41,46,46,30,44,42)

      >res1=c(1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)

      > res2=c(0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)

      > res3=c(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)

      > res4=c(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)

Graziela M. Alves - PO - UFS 2012
      > res5=c(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)

      > res6=c(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)

      > res7=c(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0)

      > res8=c(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1)

      > simplex(a=z,A3=rbind(res1,res2,res3,res4,res5,res6,res7,res8),b3=c(1,1,1,1,1,1,1,1),maxi=FALSE)
Linear Programming Results




      Call : simplex(a = z, A3 = rbind(res1, res2, res3, res4, res5, res6,

        res7, res8), b3 = c(1, 1, 1, 1, 1, 1, 1, 1), maxi = FALSE)

Graziela M. Alves - PO - UFS 2012
      Minimization Problem with Objective Function Coefficients

       x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16 x17 x18 x19 x20 x21 x22 x23 x24 x25 x26 x27
  x28 x29 x30 x31 x32 x33 x34 x35 x36 x37 x38 x39 x40 x41

       40 42 44 46 40 41 38 46 46 41 40 42 45 43 45 43 43 45 42 41 30 44 38 30 44 30 41 45 38
  42 44 40 42 40 45 38 46 38 39 41 41

      x42 x43 x44 x45 x46 x47 x48 x49 x50 x51 x52 x53 x54 x55 x56 x57 x58 x59 x60 x61 x62 x63 x64

       46 46 44 43 40 46 45 45 43 48 39 44 42 30 39 30 44 41 46 46 30 44 42
Optimal solution has the following values

       x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16 x17 x18 x19 x20 x21 x22
  x23 x24 x25 x26 x27 x28 x29 x30 x31 x32 x33 x34 x35 x36 x37 x38 x39 x40 x41

       0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0

Graziela M. Alves - PO - UFS 2012
  0 0 0 0 0 0 0 1 0 0 0 0 0

      x42 x43 x44 x45 x46 x47 x48 x49 x50 x51 x52 x53 x54 x55 x56 x57 x58 x59 x60 x61 x62
  x63 x64

       0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0

      The optimal value of the objective function is 276.
Pesquisa Operacional – Programação Linear no R-project

   REFERÊNCIAS BIBLIOGRÁFICAS

      [1] Ajuda do software R, acesso em 31 de outubro de 2012 às 20 horas

      < http://127.0.0.1:25218/library/boot/html/simplex.html >

Graziela M. Alves - PO - UFS 2012
      [2] AGOSTI, Cristiano. Apostila de Pesquisa Operacional. Universidade do
   Oeste de Santa Catarina. Xânxere Santa Catarina, agosto de 2003.

      [3] Aplicação de Programação Linear no Software Estatístico R-gui.
   Acesso em 25 de outubro de 2012 às 21 horas. < http://goo.gl/e13z6 >

      [4] PRADO, Santos Darci. PERT/ CPM volume 4. INDG Tecnologia e
   Serviços LTDA, Nova Lima – MG 2004.

Weitere ähnliche Inhalte

Ähnlich wie Pesquisa Operacional no R

Five Minute Speech: Activities Developed in Computational Geometry Discipline
Five Minute Speech: Activities Developed in Computational Geometry DisciplineFive Minute Speech: Activities Developed in Computational Geometry Discipline
Five Minute Speech: Activities Developed in Computational Geometry DisciplineMichel Alves
 
Deterministic Oversubscription Action Planning with General Utility Functions...
Deterministic Oversubscription Action Planning with General Utility Functions...Deterministic Oversubscription Action Planning with General Utility Functions...
Deterministic Oversubscription Action Planning with General Utility Functions...Daniel Muller
 
Project Operation Management
Project Operation Management Project Operation Management
Project Operation Management MureedAbbas
 
Mb0048 operations research
Mb0048 operations researchMb0048 operations research
Mb0048 operations researchsmumbahelp
 
Online_News_Popularity_Machine_Learning
Online_News_Popularity_Machine_LearningOnline_News_Popularity_Machine_Learning
Online_News_Popularity_Machine_LearningDibyajyoti Bose
 
Network Design in Gurobi - final.pptx
Network Design in Gurobi - final.pptxNetwork Design in Gurobi - final.pptx
Network Design in Gurobi - final.pptxDebarpanHaldar1
 
Vcs slides on or 2014
Vcs slides on or 2014Vcs slides on or 2014
Vcs slides on or 2014Shakti Ranjan
 
SVD and the Netflix Dataset
SVD and the Netflix DatasetSVD and the Netflix Dataset
SVD and the Netflix DatasetBen Mabey
 
A Study on Linear Programming Problem
A Study on Linear Programming ProblemA Study on Linear Programming Problem
A Study on Linear Programming Problemijtsrd
 
Minimal Introduction to C++ - Part I
Minimal Introduction to C++ - Part IMinimal Introduction to C++ - Part I
Minimal Introduction to C++ - Part IMichel Alves
 
A Double Lexicase Selection Operator for Bloat Control in Evolutionary Featur...
A Double Lexicase Selection Operator for Bloat Control in Evolutionary Featur...A Double Lexicase Selection Operator for Bloat Control in Evolutionary Featur...
A Double Lexicase Selection Operator for Bloat Control in Evolutionary Featur...Hengzhe Zhang
 
Innovations in CPLEX performance and solver capabilities
Innovations in CPLEX performance and solver capabilitiesInnovations in CPLEX performance and solver capabilities
Innovations in CPLEX performance and solver capabilitiesIBM Decision Optimization
 
Business Optimizer Introduction
Business Optimizer IntroductionBusiness Optimizer Introduction
Business Optimizer IntroductionDonato Marrazzo
 
Transfer Learning for Improving Model Predictions in Highly Configurable Soft...
Transfer Learning for Improving Model Predictions in Highly Configurable Soft...Transfer Learning for Improving Model Predictions in Highly Configurable Soft...
Transfer Learning for Improving Model Predictions in Highly Configurable Soft...Pooyan Jamshidi
 
Using Open Source Tools for Machine Learning
Using Open Source Tools for Machine LearningUsing Open Source Tools for Machine Learning
Using Open Source Tools for Machine LearningAll Things Open
 
Simple rules for building robust machine learning models
Simple rules for building robust machine learning modelsSimple rules for building robust machine learning models
Simple rules for building robust machine learning modelsKyriakos Chatzidimitriou
 

Ähnlich wie Pesquisa Operacional no R (20)

Ms(lpgraphicalsoln.)[1]
Ms(lpgraphicalsoln.)[1]Ms(lpgraphicalsoln.)[1]
Ms(lpgraphicalsoln.)[1]
 
Five Minute Speech: Activities Developed in Computational Geometry Discipline
Five Minute Speech: Activities Developed in Computational Geometry DisciplineFive Minute Speech: Activities Developed in Computational Geometry Discipline
Five Minute Speech: Activities Developed in Computational Geometry Discipline
 
Deterministic Oversubscription Action Planning with General Utility Functions...
Deterministic Oversubscription Action Planning with General Utility Functions...Deterministic Oversubscription Action Planning with General Utility Functions...
Deterministic Oversubscription Action Planning with General Utility Functions...
 
Project Operation Management
Project Operation Management Project Operation Management
Project Operation Management
 
Mb0048 operations research
Mb0048 operations researchMb0048 operations research
Mb0048 operations research
 
Online_News_Popularity_Machine_Learning
Online_News_Popularity_Machine_LearningOnline_News_Popularity_Machine_Learning
Online_News_Popularity_Machine_Learning
 
KMAP PAPER (1)
KMAP PAPER (1)KMAP PAPER (1)
KMAP PAPER (1)
 
Network Design in Gurobi - final.pptx
Network Design in Gurobi - final.pptxNetwork Design in Gurobi - final.pptx
Network Design in Gurobi - final.pptx
 
Vignesh Balasubramanian's Resume
Vignesh Balasubramanian's Resume Vignesh Balasubramanian's Resume
Vignesh Balasubramanian's Resume
 
Vcs slides on or 2014
Vcs slides on or 2014Vcs slides on or 2014
Vcs slides on or 2014
 
SVD and the Netflix Dataset
SVD and the Netflix DatasetSVD and the Netflix Dataset
SVD and the Netflix Dataset
 
A Study on Linear Programming Problem
A Study on Linear Programming ProblemA Study on Linear Programming Problem
A Study on Linear Programming Problem
 
Minimal Introduction to C++ - Part I
Minimal Introduction to C++ - Part IMinimal Introduction to C++ - Part I
Minimal Introduction to C++ - Part I
 
A Double Lexicase Selection Operator for Bloat Control in Evolutionary Featur...
A Double Lexicase Selection Operator for Bloat Control in Evolutionary Featur...A Double Lexicase Selection Operator for Bloat Control in Evolutionary Featur...
A Double Lexicase Selection Operator for Bloat Control in Evolutionary Featur...
 
Quantitative Techniques
Quantitative TechniquesQuantitative Techniques
Quantitative Techniques
 
Innovations in CPLEX performance and solver capabilities
Innovations in CPLEX performance and solver capabilitiesInnovations in CPLEX performance and solver capabilities
Innovations in CPLEX performance and solver capabilities
 
Business Optimizer Introduction
Business Optimizer IntroductionBusiness Optimizer Introduction
Business Optimizer Introduction
 
Transfer Learning for Improving Model Predictions in Highly Configurable Soft...
Transfer Learning for Improving Model Predictions in Highly Configurable Soft...Transfer Learning for Improving Model Predictions in Highly Configurable Soft...
Transfer Learning for Improving Model Predictions in Highly Configurable Soft...
 
Using Open Source Tools for Machine Learning
Using Open Source Tools for Machine LearningUsing Open Source Tools for Machine Learning
Using Open Source Tools for Machine Learning
 
Simple rules for building robust machine learning models
Simple rules for building robust machine learning modelsSimple rules for building robust machine learning models
Simple rules for building robust machine learning models
 

Mehr von Graziela Alves

Mehr von Graziela Alves (8)

Esgotos- Resumo
Esgotos- ResumoEsgotos- Resumo
Esgotos- Resumo
 
Teste de Normalidade, teste T e teste F no R
Teste de Normalidade, teste T e teste F no RTeste de Normalidade, teste T e teste F no R
Teste de Normalidade, teste T e teste F no R
 
Licitação
LicitaçãoLicitação
Licitação
 
Regime disciplinar do Servidor Público
Regime disciplinar do Servidor PúblicoRegime disciplinar do Servidor Público
Regime disciplinar do Servidor Público
 
Alisantes de cabelos com formol
Alisantes de cabelos com formol  Alisantes de cabelos com formol
Alisantes de cabelos com formol
 
Libras
LibrasLibras
Libras
 
Rio + 20
Rio + 20Rio + 20
Rio + 20
 
Bolsa verde
Bolsa verdeBolsa verde
Bolsa verde
 

Kürzlich hochgeladen

Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docxPoojaSen20
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsKarinaGenton
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfUmakantAnnand
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Micromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersMicromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersChitralekhaTherkar
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 

Kürzlich hochgeladen (20)

Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docx
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its Characteristics
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.Compdf
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Micromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersMicromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of Powders
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 

Pesquisa Operacional no R

  • 1. Pesquisa Operacional – Programação Linear no R-project O método simplex é utilizado na resolução de problemas de transporte onde se deseja minimizar o custo de transporte, aplicamos a técnica na minimização do custo de um problema de transporte com Graziela oito destinos. O método foi desenvolvido no2012 oito origens e M. Alves - PO - UFS software estatístico R- Project, onde é possível aplicar o método simplex, carregando inicialmente o pacote library(boot).
  • 2. Pesquisa Operacional – Programação Linear no R-project O problema de transporte é um tipo especial de problema de programação linear que trata do envio de produtos da origem para o destino. O problema de Graziela M. Alves - PO e- também 2012 designação designa atividades, UFS é um problema onde aplica-se programação linear, no presente trabalho a origem são trabalhadores e o destino a carga horária de trabalho.
  • 3. Pesquisa Operacional – Programação Linear no R-project No R- Project, carregamos o pacote library(boot), escrevemos a função objetivo, Graziela M. as restrições e -em seguida escrevemos Alves - PO UFS 2012 usamos o algoritmo que realiza o cálculo de minimização de custos através do SIMPLEX.
  • 4. Pesquisa Operacional – Programação Linear no R-project PROBLEMA DE TRANSPORTE Uma empresa é contratada pelo MDS, para distribuir laranjas em municípios do alto sertão sergipano. Os Graziela M. Alves - laranja.-Deseja-se 2012 municípios de origem produzem PO UFS saber a melhor forma de planejar a distribuição de laranja para os municípios do alto sertão, de modo que o custo seja mínimo. Cada caminhão tipo baú tem capacidade máxima de 41.000 Kg de laranja e a demanda de cada município é de 40.000 Kg de laranja.
  • 5. Tabela c/ custos do transporte Graziela M. Alves - PO - UFS 2012
  • 6. Solução no R > #Implementando no R o problema de transporte de 5 origens e 5 destinos > library (boot) #Pacote com o comando SIMPLEX no R > z=c(60,40,70,50,30,30,30,60,70,50,50,60,80,70,40,40,50,60,70,60,30,40,70,60,50) > #Abaixo as restrições, considerando que o sistema é equilibrado > res1=c(1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0) > res2=c(0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0) > res3=c(0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0) > res4=c(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,0,0,0,0,0) > res5=c(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1) > simplex(a=z,A3=rbind(res1,res2,res3,res4,res5),b3=c(40000),maxi=FALSE) #as restrições são iguais, já que o sistema é equilibrado, sendo assim não repete-se 40000, 5 vezes. > library(boot) > z=c(60,40,70,50,30,30,30,60,70,50,50,60,80,70,40,40,50,60,70,60,30,40,70,60,50) > length(z) Graziela M. Alves - PO - UFS 2012 [1] 25 > res1=c(1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0) > res2=c(0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0) > res3=c(0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0) > res4=c(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,0,0,0,0,0) > res5=c(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1) > simplex(a=z,A3=rbind(res1,res2,res3,res4,res5),b3=c(40000),maxi=FALSE) Linear Programming Results Call : simplex(a = z, A3 = rbind(res1, res2, res3, res4, res5), b3 = c(40000), maxi = FALSE) Minimization Problem with Objective Function Coefficients x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16 x17 x18 x19 x20 x21 x22 x23 x24 x25
  • 7. Pesquisa Operacional – Programação Linear no R-project 60 40 70 50 30 30 30 60 70 50 50 60 80 70 40 40 50 60 70 60 30 40 70 60 50 Optimal solution has the following values Graziela M. Alves - PO - UFS 2012 x1 x24 x25 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16 x17 x18 x19 x20 x21 x22 x23 0 0 0 0 40000 40000 0 0 0 0 0 0 0 0 40000 40000 0 0 0 0 40000 0 0 0 0 The optimal value of the objective function is 6800000.
  • 8. Pesquisa Operacional – Programação Linear no R-project PROBLEMA DE DESIGNAÇÃO Uma empresa em convesão coletiva de trabalho decidiu pagar seus trabalhadores por horas de trabalho, foi pactuado que as horas-extras também seguiriam a tabela de hora de Graziela M. por oito categorias em acordo coletivo de trabalho, decidida Alves - PO - UFS 2012 trabalho. Porém notando aumento dos gastos com pagamento de funcionários a empresa deseja determinar uma carga horária fixa para cada trabalhador, de modo a minimizar os gastos com pagamento de salário de funcionários.
  • 9. Pesquisa Operacional – Programação Linear no R-project Graziela M. Alves - PO - UFS 2012
  • 10. Problema de designação com 8 origens e 8 destinos. Resolução no R > library(boot) > z=c(40,42,44,46,40,41,38,46,46,41,40,42,45,43,45,43,43,45,42,41,30,44,38,30,44,30,41,45,38,42,44,40,42,40,45,38,46,38,39,41,41,46,4 6,44,43,40,46,45,45,43,48,39,44,42,30,39,30,44,41,46,46,30,44,42) >res1=c(1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0) > res2=c(0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0) > res3=c(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0) > res4=c(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0) Graziela M. Alves - PO - UFS 2012 > res5=c(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0) > res6=c(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0) > res7=c(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0) > res8=c(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1) > simplex(a=z,A3=rbind(res1,res2,res3,res4,res5,res6,res7,res8),b3=c(1,1,1,1,1,1,1,1),maxi=FALSE)
  • 11. Linear Programming Results Call : simplex(a = z, A3 = rbind(res1, res2, res3, res4, res5, res6, res7, res8), b3 = c(1, 1, 1, 1, 1, 1, 1, 1), maxi = FALSE) Graziela M. Alves - PO - UFS 2012 Minimization Problem with Objective Function Coefficients x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16 x17 x18 x19 x20 x21 x22 x23 x24 x25 x26 x27 x28 x29 x30 x31 x32 x33 x34 x35 x36 x37 x38 x39 x40 x41 40 42 44 46 40 41 38 46 46 41 40 42 45 43 45 43 43 45 42 41 30 44 38 30 44 30 41 45 38 42 44 40 42 40 45 38 46 38 39 41 41 x42 x43 x44 x45 x46 x47 x48 x49 x50 x51 x52 x53 x54 x55 x56 x57 x58 x59 x60 x61 x62 x63 x64 46 46 44 43 40 46 45 45 43 48 39 44 42 30 39 30 44 41 46 46 30 44 42
  • 12. Optimal solution has the following values x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16 x17 x18 x19 x20 x21 x22 x23 x24 x25 x26 x27 x28 x29 x30 x31 x32 x33 x34 x35 x36 x37 x38 x39 x40 x41 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 Graziela M. Alves - PO - UFS 2012 0 0 0 0 0 0 0 1 0 0 0 0 0 x42 x43 x44 x45 x46 x47 x48 x49 x50 x51 x52 x53 x54 x55 x56 x57 x58 x59 x60 x61 x62 x63 x64 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 The optimal value of the objective function is 276.
  • 13. Pesquisa Operacional – Programação Linear no R-project REFERÊNCIAS BIBLIOGRÁFICAS [1] Ajuda do software R, acesso em 31 de outubro de 2012 às 20 horas < http://127.0.0.1:25218/library/boot/html/simplex.html > Graziela M. Alves - PO - UFS 2012 [2] AGOSTI, Cristiano. Apostila de Pesquisa Operacional. Universidade do Oeste de Santa Catarina. Xânxere Santa Catarina, agosto de 2003. [3] Aplicação de Programação Linear no Software Estatístico R-gui. Acesso em 25 de outubro de 2012 às 21 horas. < http://goo.gl/e13z6 > [4] PRADO, Santos Darci. PERT/ CPM volume 4. INDG Tecnologia e Serviços LTDA, Nova Lima – MG 2004.