Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ' Gambas module file
- Public Sub main()
- Dim pm As New ProblemaMochila(20, "mayor_valor")
- Dim pm1 As New ProblemaMochila(20, "menos_peso")
- Dim pm2 As New ProblemaMochila(20, "coeficiente_valor/peso")
- Print "......................................."
- Print "Estrategia: " & "mayor_valor"
- pm.resolverProblema()
- pm.mostrarMochila()
- Print "......................................."
- Print "Estrategia: " & "menos_peso"
- pm1.resolverProblema()
- pm1.mostrarMochila()
- Print "......................................."
- Print "Estrategia: " & "coeficiente_valor/peso"
- pm2.resolverProblema()
- pm2.mostrarMochila()
- Print "......................................."
- Print "Algoritmo Backtracking"
- pm.resolverProblemaBT(0)
- pm.mostrarMochila()
- End
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement