R-gui

Disponível somente no TrabalhosFeitos
  • Páginas : 10 (2314 palavras )
  • Download(s) : 0
  • Publicado : 5 de novembro de 2012
Ler documento completo
Amostra do texto
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 trabalho, decidida por oito categorias em acordo coletivo de 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 minimizaros gastos com pagamento de salário de funcionários.
Abaixo segue o quadro de designação das atividades de cada trabalhador, considerando oito meses de trabalho, no quadro é apresentada a quantidade de horas trabalhadas durante os meses de janeiro a julho de 2012.
Trabalhador | Tarefa | Destinos | h/trabalho | hs/jan | hs/fev | hs/mar | hs/abr | hs/mai | hs/jun | hs/jul |
operador | coletaramostras do produto final | laboratório | 9 | 40 | 42 | 44 | 46 | 40 | 41 | 38 |
técnico em química | analisar o produto final no laboratório | gerencia do laboratório | 10 | 46 | 41 | 40 | 42 | 45 | 43 | 45 |
químico | elaborar relatório das análises | gerência de controle de qualidade | 12 | 43 | 45 | 42 | 41 | 30 | 44 | 38 |
eng. de produção | supervisionar a produção | área operacional dafábrica | 14 | 44 | 30 | 41 | 45 | 38 | 42 | 44 |
diretor comercial | vender o produto | departamento de vendas | 12 | 42 | 40 | 45 | 38 | 46 | 38 | 39 |
acessor de comunicação | atendimento aos clientes | acessoria de comunicação | 10 | 41 | 46 | 46 | 44 | 43 | 40 | 46 |
gerente do RH | Folha de pagamento | Recursos humanos | 9 | 45 | 43 | 48 | 39 | 44 | 42 | 30 |
contador | contabilizaro lucro da empresa | departamento de finanças | 8 | 30 | 44 | 41 | 46 | 46 | 30 | 44 |

Para o R:
z=c(9,40,42,44,46,40,41,38,10,46,41,40,42,45,43,45,12,43,45,42,41,30,44,38,14,44,30,41,45,38,42,44,12,42,40,45,38,46,38,39,10,41,46,46,44,43,40,46,9,45,43,48,39,44,42,30,8,30,44,41,46,46,30,44)
>res1=c(1,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] 64
>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)
> length(res8)
[1] 64
> 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)

Minimization Problem with Objective Function Coefficients
x1 x2x3 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
9 40 42 44 46 40 41 38 10 46 41 40 42 45 43 45 12 43 45 42 41 30 44 38 14 44 30 41 45 38 42 44 12 42 40 45 38 46 38 39 10
x42 x43 x44 x45 x46 x47 x48 x49 x50 x51 x52 x53 x54 x55 x56 x57 x58 x59...
tracking img