Decision Optimization

Decision Optimization

Delivers prescriptive analytics capabilities and decision intelligence to improve decision-making.


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
Expand all | Collapse all

CPXfeasopt

  • 1.  CPXfeasopt

    Posted 02/20/12 04:32 AM

    Originally posted by: amindehghanian


    Hi everyone!

    I have a LP with 3600 constraints and 3600 variables. Actually, it is a linear system of equations.
    Is there any advantage for using CPXfeasopt rather than CPXlpopt?

    I expected CPLEX would have solved this LP in a sec while it seems it can't handle it! Any idea would be greatly appreciated!
    Thanks,
    Amin
    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: CPXfeasopt

    Posted 02/20/12 04:38 AM

    Originally posted by: T_O


    Are you sure that your constraints are not contradictory and not redundant?

    Could you post your model?
    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: CPXfeasopt

    Posted 02/20/12 11:02 AM

    Originally posted by: amindehghanian


    Thanks for your answer!

    I wanted to write problem in order to post it here, but CPXwriteprob did not work either.

    Everything works fine for smaller size.

    Actually, I am using CPXcopylp to define my LP in just one step. So, those matval, matind elements are of the size 3600*3600. Could it be the source of problem?

    If you think this is the source of problem, I need to add my constraint one by one to my LP, right?
    Thanks,
    #CPLEXOptimizers
    #DecisionOptimization


  • 4.  Re: CPXfeasopt

    Posted 02/20/12 11:44 AM

    Originally posted by: T_O


    Is your matrix dense or sparse?
    #CPLEXOptimizers
    #DecisionOptimization


  • 5.  Re: CPXfeasopt

    Posted 02/20/12 12:52 PM

    Originally posted by: amindehghanian


    My matrix is very dense with very small numbers!
    Thanks,
    #CPLEXOptimizers
    #DecisionOptimization


  • 6.  Re: CPXfeasopt

    Posted 02/20/12 05:38 PM

    Originally posted by: T_O


    This might be the problem, although I am not sure which problem sizes can be handled with LU-decomposition when the matrices are dense. What is the range of your matrix elements?

    > amindehghanian wrote:
    > I wanted to write problem in order to post it here, but CPXwriteprob did not work either.

    What happened?
    #CPLEXOptimizers
    #DecisionOptimization


  • 7.  Re: CPXfeasopt

    Posted 02/20/12 07:54 PM

    Originally posted by: amindehghanian


    Most elements have sizes close to 1E-5 though there are elements as large as 1E-10.
    Furthermore, none of my elements exceed (-1,1).

    I try to post the lp file. As I already told , I couldn't write it by using CPXwriteprob!

    Thanks,
    #CPLEXOptimizers
    #DecisionOptimization


  • 8.  Re: CPXfeasopt

    Posted 02/21/12 12:58 AM

    Originally posted by: amindehghanian


    I already expected CPLEX would have solved this in a few seconds though it takes 450 sec!

    Actually, I could not load the file here since it is too big (in the format SAV it is 180 MB).

    Furthermore, I need to solve similar subproblems repeatedly in my branch and cut tree. Is there any advantage if I use linear system packages, like LAPACK, to solve it?

    Thanks,
    Amin
    #CPLEXOptimizers
    #DecisionOptimization


  • 9.  Re: CPXfeasopt

    Posted 02/21/12 03:11 AM

    Originally posted by: SystemAdmin


    Amin,

    what exactly were the problems you observed with CPXwriteprob()? Did it run out of memory or was your disk full?
    Exporting the SAV file is the right thing to do. How big is the SAV file if you compress it using zip, gzip or bzip2? Is the compressed file small enough to attach it here?
    If all your elements are close to 1e-5 and only a few are 1e-10, does it help to scale all the rows by 1e5?
    #CPLEXOptimizers
    #DecisionOptimization


  • 10.  Re: CPXfeasopt

    Posted 02/21/12 03:22 AM

    Originally posted by: amindehghanian


    Thanks Daniel for your answer.

    Actually, CPXwriteprob is fine, and I just needed to be more patient. The size of compressed file is 101 MB, and I couldn't attach it here. My concern is about solution time now since I need to solve these sub-problems repeatedly!

    Scaling might work, and I need to try it! Is there any syntax such that I can scale my problem easily?

    Thanks,
    Amin
    #CPLEXOptimizers
    #DecisionOptimization


  • 11.  Re: CPXfeasopt

    Posted 02/21/12 03:16 AM

    Originally posted by: T_O


    > amindehghanian wrote:
    > I already expected CPLEX would have solved this in a few seconds though it takes 450 sec!
    >
    > Actually, I could not load the file here since it is too big (in the format SAV it is 180 MB).

    This should be ok. 3600*3600 doubles already need 3600*3600*8 bytes (~100MB).
    > amindehghanian wrote:
    > Furthermore, I need to solve similar subproblems repeatedly in my branch and cut tree. Is there any advantage if I use linear system packages, like LAPACK, to solve it?

    How similar are these problems? There are update procedures for LU decompositions when adding rows and colums. I dont't know whether these are implemented in CPLEX, but I do not expect this.

    Maybe you should also try using iterative solvers?
    #CPLEXOptimizers
    #DecisionOptimization


  • 12.  Re: CPXfeasopt

    Posted 02/21/12 03:29 AM

    Originally posted by: amindehghanian


    Thanks!

    My sub-problems are very similar. Just a few rows has been changed in comparison to last iteration.

    Could you kindly describe the idea of iterative solvers in further details?
    As I already mentioned, I am implementing a branch and cut in CPLEX. Can I use the iterative solver to solver my subproblem While my main MILP is handled in CPLEX?

    Amin
    #CPLEXOptimizers
    #DecisionOptimization


  • 13.  Re: CPXfeasopt

    Posted 02/21/12 03:52 AM

    Originally posted by: T_O


    In fact, I really don't know whether there will be any speedup using iterative methods. Some details on iterative methods can be found here: http://en.wikipedia.org/wiki/Iterative_method#Linear_systems

    You could try to export your matrix in matlab format and see how long matlab takes to solve the system.
    If you just change a few rows in each iteration, I would expect that it is faster to do the LU-decomposition once and then try to develop your own update procedure. I don't know whether this is implemented in CPLEX.
    #CPLEXOptimizers
    #DecisionOptimization