Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Problem with formulating objective function using java api with cplex 12.3

    Posted 01/17/12 10:46 PM

    Originally posted by: Washout


    Hi all,

    I am writing a train scheduler, and have decision variables representing departure and arrival times for each train at each location. i.e dep[t][s] represents the departure time for train t from location s and arr[t][s] represents the arrival time of train t at location s.

    Time is measured in minutes, and the schedule covers a day so dep and arr have lower and upper bounds of 0 and 1440 respectively. In my objective function I am trying to minimise the total delay of each train by measuring the difference between each departure and arrival time and summing them over all locations the train visits.

    The issue comes with the time boundary at time=1440. If a train t arrives at a location s at time 1430 and departs at time 10 then the delay should be 20. Normally the delay is simply calculated by dep[t][s] - arr[t][s] but in the case where the train is in the station across the time boundary this fails. It seems I need to check if dep[t][s] < arr[t][s] to add the corrrect term to the objective function, but looking at the ifThen method it seems to only apply to constraints, not NumExpr. Does anyone have a clue how I can calculate the correct delay each time?
    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: Problem with formulating objective function using java api with cplex 12.3

    Posted 01/18/12 03:08 AM

    Originally posted by: SystemAdmin


    You need to use a binary variable to indicate the carry-over, like this:

    min dep[t][s] - arr[t][s] + 1440 c[t][s]
    s.t.
        dep[t][s] - arr[t][s] + 1440 c[t][s] >= 0
    binary
        c[t][s]
    end
    


    As far as I can see, you are trying to solve a periodic timetabling problem. Note that there is a lot of literature on this topic out there, for example the work of Christian Liebchen. Check for example this page: http://www.matheon.de/research/show_project.asp?id=101
    Tobias
    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: Problem with formulating objective function using java api with cplex 12.3

    Posted 01/18/12 04:45 PM

    Originally posted by: Washout


    Thanks for your reply - it was very helpful. And also for the link. Yes I am trying to measure the capacity of a long section of single track with about 20 stations or passing loops, given that there are a number of trains already timetabled, how many more paths exist in the track. An interesting problem, difficult to solve when one factors in the constraints.
    #CPLEXOptimizers
    #DecisionOptimization