Skip to content

A Deep Reinforcement Learning-Based Scheme for Solving Multiple Knapsack Problems

Notifications You must be signed in to change notification settings

habibsifat/DRLforMKP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DRLforMKP

A Deep Reinforcement Learning-Based Scheme for Solving Multiple Knapsack Problems

This project shows the official codes that used in A Deep Reinforcement Learning-Based Scheme for Solving Multiple Knapsack Problems

Appl. Sci. 2022, 12(6), 3068; https://doi.org/10.3390/app12063068

image

I used it in spyder IDE, and the scripts are as follow creating item and knapsack instances

runfile('C:/yourdirectory/RI.py', wdir='C:/yourdirectory',args='1000 50 3 10 80') runfile('C:/yourdirectory/LI.py', wdir='C:/yourdirectory',args='1000 50 3 10 10') runfile('C:/yourdirectory/QI.py', wdir='C:/yourdirectory',args='1000 50 1 10 20')

train and test (in here, the train file should be hard coded in a3c mode)

runfile('C:/yourdirectory/train.py', wdir='C:/yourdirectory',args='1000 0.0001 50 1000 5 0.9999999 6 4 0') runfile('C:/yourdirectory/test.py', wdir='C:/yourdirectory',args='1000 0.0001 50 1 5 0.9999999 6 4')

comparison algorithm To run, gurobi, you need a license

runfile('C:/yourdirectory/random_sol_knap.py', wdir='C:/yourdirectory',args='1000 0.001 50 1 1 0.99') runcell(0, 'C:/yourdirectory/gurobi_op_mul.py') runfile('C:/yourdirectory/ffh_mul.py', wdir='C:/yourdirectory',args='1000 0.001 50 1 1 0.99')

I will delete the redundant part ASAP, but the code works well in here.

About

A Deep Reinforcement Learning-Based Scheme for Solving Multiple Knapsack Problems

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages