Menu

limit number of variables for FileExchange.bnet2primes?

Anonymous
2016-02-25
2016-03-01
  • Anonymous

    Anonymous - 2016-02-25

    Hi Hannes,

    I am recently using PyBoolNet again, and I forgot, what is the maximal
    number of variables for
    "bnet2primes" function?

    P.S. The process I am repeating is:
    1. from PyBoolNet import FileExchange as FEX
    from PyBoolNet import QuineMcCluskey as QMC
    2. primes = FEX.bnet2primes("filename.bnet")
    3. mindnf = QMC.primes2mindnf(primes)

    In the FEX.bnet2primes, I tried a file .bnet with more than 500
    minterms, and they have 21 variables, which is more than the limit, for
    there throw out an Exception:

    {"sss":[
    BNetToPrime encountered an exception and aborted.
    Exception message: "std::bad_alloc"

    Call to "BNet2Prime" resulted in return code 1
    Command:
    python2.7/site-packages/PyBoolNet/Dependencies/BNetToPrime/BNetToPrime
    Minterms508_21variables.bnet
    Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
    File
    "python2.7/site-packages/PyBoolNet/FileExchange.py",
    line 83, in bnet2primes
    _bnet2primes_error(proc, out, err, cmd)
    File
    "python2.7/site-packages/PyBoolNet/FileExchange.py",
    line 32, in _bnet2primes_error
    raise Exception
    Exception</module></stdin>

     

    Last edit: Hannes Klarner 2016-02-25
    • Hannes Klarner

      Hannes Klarner - 2016-02-25

      can you send me the bnet file? I am not sure what the limit is, but you are right: std::bad_alloc sounds like running out of memory and 21 might be too many variables.

       
  • Anonymous

    Anonymous - 2016-03-01

    Thank you, Hannes.

    I had a test with only 30 minterms differing from 13 variables to 20 variables.
    PyBoolNet works quite very fast for 13 ~ 18, and slower when dealing with 19 and 20 variables. (See the screen shot below.)

    So I have to say, the number of minterms has a limit depending on the memory of the computer. I tried over 500, it was too much for my computer.

    Wishes,
    L.

     

Anonymous
Anonymous

Add attachments
Cancel