• Home
  • Chat IA
  • Guru IA
  • Tutores
  • Central de ajuda
Home
Chat IA
Guru IA
Tutores

·

Ciência da Computação ·

Linguagens de Programação

Envie sua pergunta para a IA e receba a resposta na hora

Recomendado para você

Aula Testes de Performance - Load Stress Soak Spike Tests e JMeter

1

Aula Testes de Performance - Load Stress Soak Spike Tests e JMeter

Linguagens de Programação

UAM

Aula 08: Introdução à Programação Orientada a Objetos

41

Aula 08: Introdução à Programação Orientada a Objetos

Linguagens de Programação

UAM

Tratamento de Exceções em Programação: Aula 21

27

Tratamento de Exceções em Programação: Aula 21

Linguagens de Programação

UAM

Especificação do Formato de Dados e Instruções para Implementação de Solução em Python - Problema de Alocação de Facilidades

4

Especificação do Formato de Dados e Instruções para Implementação de Solução em Python - Problema de Alocação de Facilidades

Linguagens de Programação

UAM

Aula 23: Interface Gráfica e Conexão com Banco de Dados

23

Aula 23: Interface Gráfica e Conexão com Banco de Dados

Linguagens de Programação

UAM

Testes de Performance em Software: Tipos e Objetivos

44

Testes de Performance em Software: Tipos e Objetivos

Linguagens de Programação

UAM

Coloracao de Grafos - Algoritmo para Otimizacao Discreta

3

Coloracao de Grafos - Algoritmo para Otimizacao Discreta

Linguagens de Programação

UAM

Aula 03: Variáveis e Estruturas de Seleção em Programação

44

Aula 03: Variáveis e Estruturas de Seleção em Programação

Linguagens de Programação

UAM

Texto de pré-visualização

3 Data Format Specification The input consists of N M 1 lines The first line contains two numbers N followed by M The first line is followed by N lines where each line encodes the facilitys setup cost sf capacity capf and the location xf yf The remaining M lines capture the customer information where each line encodes the customers demand dc and location xc yc Input Format N M s0 cap0 x0 y0 s1 cap1 x1 y1 sN1 capN1 xN1 yN1 dN xN yN dN1 xN1 yN1 dNM1 xNM1 yNM1 The output has two lines The first line contains two values obj and opt obj is the cost of the customer to facility assignment ie the objective value as a real number opt should be 1 if your algorithm proved optimality and 0 otherwise The next line is a list of M values in N this is the mapping of customers to facilities Output Format obj opt c0 c1 c2 cM1 2 Examples Input Example 3 4 100 100 10650 10650 100 100 10620 10620 100 500 00 00 50 13970 13970 50 13980 13980 75 13990 13990 75 5860 5860 Output Example 2550013 0 1 1 0 2 This output represents the assignment of customers to facilities a0 2 a1 0 1 a2 3 That is customers 0 and 1 are assigned to facility 1 customer 2 is assigned to facility 0 and customers 3 is assigned to facility 2 4 Instructions Edit solverpy and modify the solve itinput data function to solve the optimization problem described above The function argument input data contains the problem data in the format described above The return value of solve it is a solution to the problem in the output format described above Your solve it implementation can be tested with the command python solverpy datainputFileName You should limit the solve it method to terminate within 5 hours otherwise the submission will not be eligible for full credit You may choose to implement your solver directly in python or modify the solve it function to call an external application Resources You will find several facility location problem instances in the data directory provided with the handout Handin Run submitpy with the command python submitpy Follow the instructions to apply your solve it method on the various assignment parts You can submit multiple times and your grade will be the best of all submissions However it may take several minutes before your assignment is graded please be patient You can track the status of your submission on the feedback section of the assignment website Grading Infeasible solutions ie those that do not conform to the output format or violate problem constraints will receive 0 points Feasible solutions will receive at least 3 points Feasible solutions passing a low quality bar will receive at least 7 points and solutions meeting a high quality bar will receive all 10 points The grading feedback indicates how much your solution must improve to receive a higher grade 3 Collaboration Rules In all assignments we encourage collaboration and the exchange of ideas on the discussion forums However please refrain from the following 1 Posting code or pseudocode related to the assignments 2 Using code which is not your own 3 Posting or sharing problem solutions Discussion of solution quality ie objective value and algorithm performance ie run time is allowed and the assignment leader board is designed to encourage such discussions Warnings 1 It is recommended you do not modify the data directory Modifying the files in the data directory risks making your assignment submissions incorrect 2 You cannot rename the solverpy file or the solve it method 3 Be careful when using global variables in your implementation The solve it method will be run repeatedly and it is your job to clear the global data between runs 4 solverpy must remain in the same directory as submitpy 5 Technical Requirements You will need to have python 279 or 35 at least installed on your system installation instruc tions httpwwwpythonorgdownloads 4

Envie sua pergunta para a IA e receba a resposta na hora

Recomendado para você

Aula Testes de Performance - Load Stress Soak Spike Tests e JMeter

1

Aula Testes de Performance - Load Stress Soak Spike Tests e JMeter

Linguagens de Programação

UAM

Aula 08: Introdução à Programação Orientada a Objetos

41

Aula 08: Introdução à Programação Orientada a Objetos

Linguagens de Programação

UAM

Tratamento de Exceções em Programação: Aula 21

27

Tratamento de Exceções em Programação: Aula 21

Linguagens de Programação

UAM

Especificação do Formato de Dados e Instruções para Implementação de Solução em Python - Problema de Alocação de Facilidades

4

Especificação do Formato de Dados e Instruções para Implementação de Solução em Python - Problema de Alocação de Facilidades

Linguagens de Programação

UAM

Aula 23: Interface Gráfica e Conexão com Banco de Dados

23

Aula 23: Interface Gráfica e Conexão com Banco de Dados

Linguagens de Programação

UAM

Testes de Performance em Software: Tipos e Objetivos

44

Testes de Performance em Software: Tipos e Objetivos

Linguagens de Programação

UAM

Coloracao de Grafos - Algoritmo para Otimizacao Discreta

3

Coloracao de Grafos - Algoritmo para Otimizacao Discreta

Linguagens de Programação

UAM

Aula 03: Variáveis e Estruturas de Seleção em Programação

44

Aula 03: Variáveis e Estruturas de Seleção em Programação

Linguagens de Programação

UAM

Texto de pré-visualização

3 Data Format Specification The input consists of N M 1 lines The first line contains two numbers N followed by M The first line is followed by N lines where each line encodes the facilitys setup cost sf capacity capf and the location xf yf The remaining M lines capture the customer information where each line encodes the customers demand dc and location xc yc Input Format N M s0 cap0 x0 y0 s1 cap1 x1 y1 sN1 capN1 xN1 yN1 dN xN yN dN1 xN1 yN1 dNM1 xNM1 yNM1 The output has two lines The first line contains two values obj and opt obj is the cost of the customer to facility assignment ie the objective value as a real number opt should be 1 if your algorithm proved optimality and 0 otherwise The next line is a list of M values in N this is the mapping of customers to facilities Output Format obj opt c0 c1 c2 cM1 2 Examples Input Example 3 4 100 100 10650 10650 100 100 10620 10620 100 500 00 00 50 13970 13970 50 13980 13980 75 13990 13990 75 5860 5860 Output Example 2550013 0 1 1 0 2 This output represents the assignment of customers to facilities a0 2 a1 0 1 a2 3 That is customers 0 and 1 are assigned to facility 1 customer 2 is assigned to facility 0 and customers 3 is assigned to facility 2 4 Instructions Edit solverpy and modify the solve itinput data function to solve the optimization problem described above The function argument input data contains the problem data in the format described above The return value of solve it is a solution to the problem in the output format described above Your solve it implementation can be tested with the command python solverpy datainputFileName You should limit the solve it method to terminate within 5 hours otherwise the submission will not be eligible for full credit You may choose to implement your solver directly in python or modify the solve it function to call an external application Resources You will find several facility location problem instances in the data directory provided with the handout Handin Run submitpy with the command python submitpy Follow the instructions to apply your solve it method on the various assignment parts You can submit multiple times and your grade will be the best of all submissions However it may take several minutes before your assignment is graded please be patient You can track the status of your submission on the feedback section of the assignment website Grading Infeasible solutions ie those that do not conform to the output format or violate problem constraints will receive 0 points Feasible solutions will receive at least 3 points Feasible solutions passing a low quality bar will receive at least 7 points and solutions meeting a high quality bar will receive all 10 points The grading feedback indicates how much your solution must improve to receive a higher grade 3 Collaboration Rules In all assignments we encourage collaboration and the exchange of ideas on the discussion forums However please refrain from the following 1 Posting code or pseudocode related to the assignments 2 Using code which is not your own 3 Posting or sharing problem solutions Discussion of solution quality ie objective value and algorithm performance ie run time is allowed and the assignment leader board is designed to encourage such discussions Warnings 1 It is recommended you do not modify the data directory Modifying the files in the data directory risks making your assignment submissions incorrect 2 You cannot rename the solverpy file or the solve it method 3 Be careful when using global variables in your implementation The solve it method will be run repeatedly and it is your job to clear the global data between runs 4 solverpy must remain in the same directory as submitpy 5 Technical Requirements You will need to have python 279 or 35 at least installed on your system installation instruc tions httpwwwpythonorgdownloads 4

Sua Nova Sala de Aula

Sua Nova Sala de Aula

Empresa

Central de ajuda Contato Blog

Legal

Termos de uso Política de privacidade Política de cookies Código de honra

Baixe o app

4,8
(35.000 avaliações)
© 2025 Meu Guru®