pauc icon indicating copy to clipboard operation
pauc copied to clipboard

Leveraging codebase in python

Open pclucas14 opened this issue 7 years ago • 6 comments

Hi,

first off, thanks a lot for your code! By far the fasted auction algorithm I found on the web. I'm currently working in python, where I create the Cost Matrix that is fed into the program. Right now I'm simply writing it to file and calling the code, however the disc operation seems to be a major slowdown. Is there any way you could add minimal python support ? I know this is a lot to ask, but it would be Greatly appreciated!

Many thanks, Lucas

pclucas14 avatar Aug 17 '17 18:08 pclucas14

Hi, thanks for the interest. It could be wrapped in Cython. Unfortunately I don't have time to do it now. If you are not in a hurry, I can add it in the future (at least 1 month later).

xin-jin avatar Aug 20 '17 21:08 xin-jin

Hi,

thanks for getting back to me. I was finally able to hack a solution using cython, as you suggested. Since I am working with floats, I changed to price from int to floats. The problem I am facing is how to pick epsilon : since my data distribution is always changing, I must find a way to adapt the epsilon parameter. If I take it too small, the code runs forever and it its too big, bidder_i always gets item_i. Do you have any suggestions or insights for the epsilon parameter ?

Thank you, Lucas

pclucas14 avatar Aug 22 '17 16:08 pclucas14

@pclucas14 I'm not familiar with cpython. I would appreciate it very much if you could share your code. Thank you very much.

xf4fresh avatar Aug 30 '17 07:08 xf4fresh

@xf4fresh

Sure I can share my code. However, I had to change a lot of import commands and did a few "hacky things" for it to work. If thats ok with you let me know

pclucas14 avatar Aug 30 '17 19:08 pclucas14

@pclucas14 Thanks for your reply. If you don't have time, you can show me the whole thing. It would be better If you can share part of the code about "hacky things". Or you can show me the key points that I can do by myself. I've looked up some information about "How do I wrap a C++ class with Cython". But it may take some time when I figure it out.

xf4fresh avatar Aug 31 '17 02:08 xf4fresh

@pclucas14

I have implemented the wrapper for python. I don't need your code anymore. Thanks.

xf4fresh avatar Sep 01 '17 03:09 xf4fresh