Search Results - CodeGuru Forums
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: navy1991

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    22
    Views
    8,517

    Re: Please find the bug in the c++ code

    The correct solution still eludes me. Every thing seems to work correct . I tried debugging line by line too. The method tries to search the correct combination by backtracking method. So even after...
  2. Replies
    22
    Views
    8,517

    Re: Please find the bug in the c++ code

    At GCDEF,

    you are absolutely correct. I will try to use the debugger to interrupt execution and follow execution and to do all the fun stuff.

    Regards.
  3. Replies
    22
    Views
    8,517

    Re: Please find the bug in the c++ code

    The specific problem is this:

    This is the BASIC code of CheckPoss function:


    FUNCTION CheckPoss (u)
    tot = tot + 1
    f = 0
    SELECT CASE u
    CASE 2
  4. Replies
    22
    Views
    8,517

    Re: Please find the bug in the c++ code

    Hi OReubens,

    I did like you told.I got a code like this:
    throw -- terminate on thrown exception REPLACEABLE
    #define _HAS_EXCEPTIONS 0
    #include <cstdio>
    #include <cstdlib>...
  5. Replies
    22
    Views
    8,517

    Re: Please find the bug in the c++ code

    When I debugged it after removing comments , I got like this in the command window:

    DEBUG2: m = 3 i = 0
    {f} = 2 {u} 2
    DEBUG2: m = 2 i = 0

    The bug is exactly here at the end of...
  6. Replies
    22
    Views
    8,517

    Re: Please find the bug in the c++ code

    Hello Victor,

    This is the reply that i get on my console window:

    188 possibilities checked.
    2147 million possibilities discarded.
    0 solutions found.
    Press any key to continue . . .

    I...
  7. Replies
    22
    Views
    8,517

    Re: Please find the bug in the c++ code

    Hello Paul,
    I will follow your advice from now on.

    Regards,
    Naveen.
  8. Replies
    22
    Views
    8,517

    Re: Please find the bug in the c++ code

    Hello victor,

    please check the code below:


    #include <iostream>
    #include <math.h>
    #include <string>
    #include <cstdlib>
  9. Replies
    22
    Views
    8,517

    Re: Please find the bug in the c++ code

    Hi Paul,
    My plan was to follow the logic as explained for the BASIC program. With this in mind, I started writing my code. In BASIC programming, the array starts from 1, but in C++ it starts...
  10. Replies
    22
    Views
    8,517

    Re: Please find the bug in the c++ code

    Hello Victor and Paul,

    Here you go: This is the formatted code , which I am trying:


    #include <iostream>
    #include <math.h>
    #include <string>
    #include <cstdlib>
  11. Replies
    22
    Views
    8,517

    Re: Please find the bug in the c++ code

    Hello Paul,
    I figured out that in the CheckPoss function, case 8 is not being checked .I tried to find the value of 'f' by inserting the comments , which u can see. But, I am still not...
  12. Replies
    22
    Views
    8,517

    Please find the bug in the c++ code

    #include <iostream>
    #include <math.h>
    #include <string>
    #include <cstdlib>

    using namespace std;
    long tot, tsol;

    int P[8][6];
    int A[8][1];
  13. Re: help with implementation of Linear programming solver.

    Hello 2Kaud,
    It works perfectly fine. In fact, I solved my problem and got the result. (around 0.02) . At my place, I am trying to build / include a FBA solver in c++ platform (which...
  14. Re: help with implementation of Linear programming solver.

    Finally, I have found one. It is called clp : http://www.coin-or.org/download/source/Clp/

    It seems to be very detailed . I will try to implement with this one. If I encounter any problem, I will...
  15. Re: help with implementation of Linear programming solver.

    Sorry. This was the link which had the LPsolver : http://sourceforge.net/projects/lpsolve/files/lpsolve/5.5.2.0/

    It has an implementation in many languages except c++.I was trying to use this one...
  16. Re: help with implementation of Linear programming solver.

    Yes, I will ask him. In the mean time, I downloaded another LP solver : http://docs.oracle.com/javase/1.5.0/docs/guide/jni/spec/invocation.html .

    It has a source code in Java platform. I want to...
  17. Re: help with implementation of Linear programming solver.

    31799 please have a look at this attachment too. It is better to parse as it has whitespace in between. I retrieved it from one of the file formats posted in that website.


    Regards,
    Naveen.
  18. Re: help with implementation of Linear programming solver.

    Hi 2kaud,
    I did not write the code in Matlab. It was written by Jonathan. I am working in a diiferent place but on the same topic : FBA (flux balance analysis) for whole cell...
  19. Re: help with implementation of Linear programming solver.

    Hi 2Kaud,
    I want to parse it like the representation shown in this header file:



    /*!
    \internal

    Representation of a LP constraint like:
  20. Re: help with implementation of Linear programming solver.

    Hello Paul,
    I do not have Matlab software suite. It is not open source too. I have 2 ideas:

    1. To build a parser by splitting it(the string or line) and by assigning the values...
  21. Re: help with implementation of Linear programming solver.

    Hello Paul,

    The file was created using this Matlab Code it seems : https://github.com/CovertLab/WholeCell/blob/master/src/%2Bedu/%2Bstanford/%2Bcovert/%2Bcell/%2Bsim/%2Butil/FbaLPWriter.m
    ...
  22. Re: help with implementation of Linear programming solver.

    Hi Paul and 2kaud,


    I have learnt about formal Grammar rules in Theory of Computation or Formal Languages. I guess we have a prebuilt lexer and parser to do this at my place. But,...
  23. Re: help with implementation of Linear programming solver.

    I will also keep trying
  24. Re: help with implementation of Linear programming solver.

    Hi Paul,


    Ok, if you have a close look at the file , we can easily delete the comments and have a structure like I posted in the first post:


    Maximize:

    obj: 3e-06 A - 3e-06 B + 2.7e-01 F
  25. Re: help with implementation of Linear programming solver.

    If it is not possible with c++ , then I will try to use python for text processing. But ultimately, I need to parse this file into c++ because the linear programming solver is coded in c++.
Results 1 to 25 of 36
Page 1 of 2 1 2


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center