Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  IloVehicleArray

    Posted 08/22/08 11:46 PM

    Originally posted by: SystemAdmin


    [anahana said:]

    I am trying to add vehicles to an IloVehicleArray, I used the ".add" method to add vehicles to the array, but after compilation the program halts and I'm forced to close the DOS Prompt window

    can you please guide me on how to add vehicles to an IloVehicleArray?

    Thanks
    #CPOptimizer
    #DecisionOptimization


  • 2.  Re: IloVehicleArray

    Posted 08/26/08 06:20 PM

    Originally posted by: SystemAdmin


    [Gwyneth said:]

    Without more description of how you have created the array and if you are trying to "append" or "fill", I can't give much of an answer.

    In case it helps, I found the following code sample in the documentation:
    IloVehicleArray techs(_env, nbOfTech);
      IloInt i = 0;
      IloCsvReader::LineIterator  it(csvTechSkillsReader);
      while(it.ok()){
        IloCsvLine line = *it;
        char * techName = line.getStringByHeader("name");
        IloVehicle technician = IloVehicle::Find(_env, techName);
        techs[i] = technician;
        i++;
        ++it;
      }



    ILOG Dispatcher User's Manual > Transportation Industry Solutions > Pickup and Delivery by Multiple Vehicles from Multiple Depots > Complete Program

    uses IloVehicleArray::add

    #CPOptimizer
    #DecisionOptimization


  • 3.  Re: IloVehicleArray

    Posted 08/27/08 01:26 PM

    Originally posted by: SystemAdmin


    [anahana said:]

    Thanks for the reply. I know about the sample code in the documentation (there are two code samples actually) and I tried it, but with the same problem; the DOS Prompt Window halts. It should be simple, I only need to fill in an array, but I don't know why it halts on exectution. Any thoughts?
    #CPOptimizer
    #DecisionOptimization


  • 4.  Re: IloVehicleArray

    Posted 09/15/08 08:34 PM

    Originally posted by: SystemAdmin


    [Gwyneth said:]

    No.  If you are still unable to debug the problem, then you ahould probably contact support and provide a minimal, compilable code sample.
    #CPOptimizer
    #DecisionOptimization


  • 5.  Re: IloVehicleArray

    Posted 09/15/08 08:38 PM

    Originally posted by: SystemAdmin


    [anahana said:]

    Thank you.
    #CPOptimizer
    #DecisionOptimization


  • 6.  Re: IloVehicleArray

    Posted 09/19/08 07:49 PM

    Originally posted by: SystemAdmin


    [ahocquet said:]

    Hi,

    How did you create your IloVehicleArray before adding vehicles to it?
    You should create it this way :

    IloVehicleArray vehicles(env);

    Then, adding vehicles to it using vehicles.add(vehicle) should work properly.
    Tell me if this is what you did.
    Thanks.

    #CPOptimizer
    #DecisionOptimization


  • 7.  Re: IloVehicleArray

    Posted 09/20/08 02:32 AM

    Originally posted by: SystemAdmin


    [anahana said:]

    Yes, the array was created before adding vehicles to it. I used both the "add" method and the standard C++ array filling method, but both ended up halting the programme. I worked around the problem though without the need to use the IloVehicleArray

    Thanks
    #CPOptimizer
    #DecisionOptimization