Be the first to rate this file! 197 downloads (last 30 days) File Size: 125.05 KB File ID: #20436

Multi-Knapsack solver

by Sebastien Paris

 

25 Jun 2008 (Updated 08 Jun 2009)

Code covered by BSD License  

Multi-Knapsack solver by two stochastic optimizer : CEM & BK algorithms

Download Now | Watch this File

File Information
Description

Multi-Knapsack solver by two stochastic optimizer : i) by Cross-Entropy Method and by Botev-Kroese Method

NB. You may need to recompile mex-files. Please open run "mexme_knapsack" to compile on your own plateform.

MATLAB release MATLAB 7.5 (R2007b)
Other requirements A C compiler.
Zip File Content  
Other Files
binornd.c,
binornd.dll,
ce_knapsack.m,
cemcmc_knapsack.m,
cost_knapsack.c,
cost_knapsack.dll,
cost_knapsack.m,
gibbsampler_knapsack.c,
gibbsampler_knapsack.dll,
hp1.mat,
hp2.mat,
license.txt,
mexme_knapsack.m,
pb1.mat,
pb2.mat,
pb4.mat,
pb5.mat,
pb6.mat,
pb7.mat,
read_knapsack.m,
sento1.mat,
sento2.mat,
test_ce_knapsack.m,
test_cemcmc_knapsack.m,
weing1.mat,
weing2.mat,
weing3.mat,
weing4.mat,
weing5.mat,
weing6.mat,
weing7.mat,
weing8.mat,
weish01.mat,
weish02.mat,
weish03.mat,
weish04.mat,
weish05.mat,
weish06.mat,
weish07.mat,
weish08.mat,
weish09.mat,
weish10.mat,
weish11.mat,
weish12.mat,
weish13.mat,
weish14.mat,
weish15.mat,
weish16.mat,
weish17.mat,
weish18.mat,
weish19.mat,
weish20.mat,
weish21.mat,
weish22.mat,
weish23.mat,
weish24.mat,
weish25.mat,
weish26.mat,
weish27.mat,
weish28.mat,
weish29.mat,
weish30.mat
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (7)
25 Jul 2008 liudaohai liudaohai

1. mex -f mexopts_intel10amd.bat -output gibbsampler_knapsack.dll gibbsampler_knapsack.c
 
  D:\MATLAB\BIN\WIN32\MEX.PL: Error: Could not find specified options file
    'mexopts_intel10amd.bat'.
 
??? Error using ==> mex
Unable to complete successfully
2. mex -g -output gibbsampler_knapsack.dll gibbsampler_knapsack.c
Error GIBBSAMPLER_KNAPSACK.C 478 undefined reference to _min
 
  D:\MATLAB\BIN\WIN32\MEX.PL: Error: Link of 'gibbsampler_knapsack.dll.dll' failed.
 
??? Error using ==> mex
Unable to complete successfully

25 Jul 2008 Sebastien PARIS

You probably use the LCC compiler.
Please add

#define min(a , b) ((a) <= (b) ? (a) : (b))

on the top of the *.c file.

25 Jul 2008 liudaohai liudaohai

Thank you very much!!!

18 Jun 2009 dhuan Du

Is this knapsack solver able to deal with coninuous cost value?

Thanks

19 Jun 2009 Sebastien Paris

Yes it should

07 Jul 2009 Garrett

I'm looking for a 0/1 knapsack solver that can deal with multiple constraints. Can this program do that?

25 Jul 2009 Sebastien Paris

Yes it should

Please login to add a comment or rating.
Updates
19 Aug 2008

-Fixed database (W matrix were not in the correct form)
-Add injection procedure in BK algorithm

10 Sep 2008

-Improve CE parse inputs algorithm

08 Jun 2009

-Should compile on non-C99 compiler
-Add mexme_knapsack function

Tag Activity for this File
Tag Applied By Date/Time
optimization Sebastien Paris 22 Oct 2008 10:07:21
multiknapsack Sebastien Paris 22 Oct 2008 10:07:21
crossentropy Sebastien Paris 22 Oct 2008 10:07:21
stochastic optimization Sebastien Paris 22 Oct 2008 10:07:21
mcmc Sebastien Paris 22 Oct 2008 10:07:21
optimization Giammy 03 May 2009 12:48:59
stochastic optimization Giammy 03 May 2009 12:49:02
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com