Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  BASIC QUESTION: implementing an algorithm that calls CPLEX externally

    Posted 05/12/11 06:08 PM

    Originally posted by: cabobHelp


    Hi friends, I apologize if this is so basic.

    For my research, I am implementing an algorithm to solve the Winner Determination Problem called CABOB. CABOB is a branch and bound anytime algorithm which gives an optimal result to the problem largely by pruning the search tree. The way it prunes the tree is by establishing upper and lower bounds on nodes, and it finds these bounds by solving simple Linear Programming problems. The paper which introduced this algorithm uses CPLEX, so I am wanting to use CPLEX as well
    I have downloaded the trial of CPLEX, and I understand how to code the problem, constraints, etc. in the IDE, but I am limited to only that knowledge. I need to code CABOB in eclipse, and then utilize CPLEX to solve these LP problems multiple times throughout runtime.
    How do I do this? How do I simply call CPLEX from an external source? I hear of cplex.jar, is this how to do it? I am so lost as to how to start
    Again, I apologize that this is so basic, I am new to this sort of thing. Thanks!
    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: BASIC QUESTION: implementing an algorithm that calls CPLEX externally

    Posted 05/12/11 06:26 PM

    Originally posted by: cabobHelp


    uh oh I think I've posted this in the wrong section... I apologize :(
    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: BASIC QUESTION: implementing an algorithm that calls CPLEX externally

    Posted 05/12/11 11:52 PM

    Originally posted by: cabobHelp


    just in case anyone ever reads this thread with the same question, I think I am on track to an answer now.

    Using eclipse, first I imported cplex.jar

    Now I am using this tutorial which shows how to use CPLEX in java by using an API

    http://www.lkn.ei.tum.de/arbeiten/faq/man/ILOG/CPLEX/cplex75/doc/javaguide/html/CPLEX_Java_Ch1_Start2.html

    Hope this helps
    #CPLEXOptimizers
    #DecisionOptimization


  • 4.  Re: BASIC QUESTION: implementing an algorithm that calls CPLEX externally

    Posted 05/13/11 04:22 AM

    Originally posted by: SystemAdmin


    A more recent variant of this small tutorial can be found in the official CPLEX documentation here.
    #CPLEXOptimizers
    #DecisionOptimization


  • 5.  Re: BASIC QUESTION: implementing an algorithm that calls CPLEX externally

    Posted 05/13/11 03:27 PM

    Originally posted by: cabobHelp


    I just wanted to say, thank you very much for this information :D It helps a lot
    #CPLEXOptimizers
    #DecisionOptimization


  • 6.  Re: BASIC QUESTION: implementing an algorithm that calls CPLEX externally

    Posted 05/13/11 04:22 PM

    Originally posted by: cabobHelp


    one other question, every time I try and run it asks me do I want to run with ant or ant build? No matter what I click on, it just doesn't do anything. It never runs. Do you know what I should do in this situation?

    Thanks, I am new to this kind of stuff!
    #CPLEXOptimizers
    #DecisionOptimization


  • 7.  Re: BASIC QUESTION: implementing an algorithm that calls CPLEX externally

    Posted 05/13/11 04:47 PM

    Originally posted by: SystemAdmin


    Sounds like a problem with the configuration of the project in Eclipse. If you select the project in the Package Explorer and click Run > Run As > Java Application, does that work? Have you tried creating a run configuration (Run > Run Configurations, add a new configuration)?

    Paul

    Mathematicians are like Frenchmen: whenever you say something to them, they translate it into their own language, and at once it is something entirely different. (Goethe)
    #CPLEXOptimizers
    #DecisionOptimization


  • 8.  Re: BASIC QUESTION: implementing an algorithm that calls CPLEX externally

    Posted 05/16/11 02:53 AM

    Originally posted by: SystemAdmin


    I think Paul is correct. Most probably you have setup your project in a wrong way.
    Maybe the explanations in the CPLEX manual here can help you to setup it correctly.
    #CPLEXOptimizers
    #DecisionOptimization


  • 9.  Re: BASIC QUESTION: implementing an algorithm that calls CPLEX externally

    Posted 05/13/11 12:24 AM

    Originally posted by: SystemAdmin


    The first thing you should is to look at the Java examples that are provided with CPLEX. After installing CPLEX there should be an 'examples' directory with a lot of examples that show how to use CPLEX to solve problems in Java.
    In order to setup using CPLEX in Java there is an appropriate chapter in the CPLEX manual here.
    #CPLEXOptimizers
    #DecisionOptimization