Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  How to run schedule examples from command line (opl.bat)?

    Posted 09/11/08 01:26 PM

    Originally posted by: SystemAdmin


    [hexq said:]

    My ILOG development studio is version 3.7.
    The examples in OPLSt37\examples can be run in command line using opl.bat, but when I run the examples under the OPLSt37\examples\schedule using [b]opl.bat -batch ../examples/schedule/..mod[/b], an error "internal error: executing a mod in batch mode" is reported.

    Could anybody help me fix this problem? thanks very much.



    #DecisionOptimization
    #OPLusingCPOptimizer


  • 2.  Re: How to run schedule examples from command line (opl.bat)?

    Posted 09/11/08 03:12 PM

    Originally posted by: SystemAdmin


    [jfk said:]

    hello there,
    for me it works fine... (OPL3.7.1 on Win):
    C:\ILOG\OPLSt371\bin>opl.bat C:\ILOG\OPLSt371\examples\opl\scheduler\bridge.mod C:\ILOG\OPLSt371\examples\opl\scheduler\bridge.dat

    C:\ILOG\OPLSt371\bin>rem Launching OPL Studio in batch mode

    C:\ILOG\OPLSt371\bin>if exist result.txt goto todelete

    C:\ILOG\OPLSt371\bin>del result.txt

    C:\ILOG\OPLSt371\bin>oplst.exe -batch C:\ILOG\OPLSt371\examples\opl\scheduler\bridge.mod C:\ILOG\OPLSt371\examples\opl\scheduler\bridge.dat  1>result.
    txt

    C:\ILOG\OPLSt371\bin>type result.txt
    a[start] = [0 -- 0 --> 0]
    a[a1] = [4 -- 4 --> 8]
    a[a2] = [2 -- 2 --> 4]
    a[a3] = [8 -- 2 --> 10]
    a[a4] = [0 -- 2 --> 2]
    a[a5] = [13 -- 2 --> 15]
    a[a6] = [35 -- 5 --> 40]
    a[p1] = [19 -- 20 --> 39]
    a[p2] = [6 -- 13 --> 19]
    a[ue] = [0 -- 10 --> 10]
    a[s1] = [10 -- 8 --> 18]
    a[s2] = [6 -- 4 --> 10]
    a[s3] = [39 -- 4 --> 43]
    a[s4] = [22 -- 4 --> 26]
    a[s5] = [18 -- 4 --> 22]
    a[s6] = [43 -- 10 --> 53]
    a[b1] = [18 -- 1 --> 19]
    a[b2] = [10 -- 1 --> 11]
    a[b3] = [43 -- 1 --> 44]
    a[b4] = [26 -- 1 --> 27]
    a[b5] = [22 -- 1 --> 23]
    a[b6] = [53 -- 1 --> 54]
    a[ab1] = [19 -- 1 --> 20]
    a[ab2] = [11 -- 1 --> 12]
    a[ab3] = [44 -- 1 --> 45]
    a[ab4] = [27 -- 1 --> 28]
    a[ab5] = [23 -- 1 --> 24]
    a[ab6] = [54 -- 1 --> 55]
    a[m1] = [20 -- 16 --> 36]
    a[m2] = [12 -- 8 --> 20]
    a[m3] = [52 -- 8 --> 60]
    a[m4] = [44 -- 8 --> 52]
    a[m5] = [36 -- 8 --> 44]
    a[m6] = [60 -- 20 --> 80]
    a[l] = [30 -- 2 --> 32]
    a[t1] = [36 -- 12 --> 48]
    a[t2] = [92 -- 12 --> 104]
    a[t3] = [64 -- 12 --> 76]
    a[t4] = [52 -- 12 --> 64]
    a[t5] = [80 -- 12 --> 92]
    a[ua] = [78 -- 10 --> 88]
    a[v1] = [48 -- 15 --> 63]
    a[v2] = [92 -- 10 --> 102]
    a[k1] = [39 -- 0 --> 39]
    a[k2] = [80 -- 0 --> 80]
    a[stop] = [104 -- 0 --> 104]

    tools[excavator] = Unary Resource
      required by a[a6] over [35,40]  in capacity 1
      required by a[a5] over [13,15]  in capacity 1
      required by a[a4] over [0,2]  in capacity 1
      required by a[a3] over [8,10]  in capacity 1
      required by a[a2] over [2,4]  in capacity 1
      required by a[a1] over [4,8]  in capacity 1

    tools[piledriver] = Unary Resource
      required by a[p2] over [6,19]  in capacity 1
      required by a[p1] over [19,39]  in capacity 1

    tools[carpentry] = Unary Resource
      required by a[s6] over [43,53]  in capacity 1
      required by a[s5] over [18,22]  in capacity 1
      required by a[s4] over [22,26]  in capacity 1
      required by a[s3] over [39,43]  in capacity 1
      required by a[s2] over [6,10]  in capacity 1
      required by a[s1] over [10,18]  in capacity 1

    tools[concretemixer] = Unary Resource
      required by a[b6] over [53,54]  in capacity 1
      required by a[b5] over [22,23]  in capacity 1
      required by a[b4] over [26,27]  in capacity 1
      required by a[b3] over [43,44]  in capacity 1
      required by a[b2] over [10,11]  in capacity 1
      required by a[b1] over [18,19]  in capacity 1

    tools[bricklaying] = Unary Resource
      required by a[m6] over [60,80]  in capacity 1
      required by a[m5] over [36,44]  in capacity 1
      required by a[m4] over [44,52]  in capacity 1
      required by a[m3] over [52,60]  in capacity 1
      required by a[m2] over [12,20]  in capacity 1
      required by a[m1] over [20,36]  in capacity 1

    tools[crane] = Unary Resource
      required by a[t5] over [80,92]  in capacity 1
      required by a[t4] over [52,64]  in capacity 1
      required by a[t3] over [64,76]  in capacity 1
      required by a[t2] over [92,104]  in capacity 1
      required by a[t1] over [36,48]  in capacity 1

    tools[caterpillar] = Unary Resource
      required by a[v2] over [92,102]  in capacity 1
      required by a[v1] over [48,63]  in capacity 1





    C:\ILOG\OPLSt371\bin>



    there might be 2 prb's
    1. the path for oplst.exe is not set properly (look at the .bat)
    2. you are trying to run a model .mod without the relevant .dat file or the .dat file is not the correct one belonging to the .mod

    I hope it helps


    p.s.
    you may want to try OPL6.0. it has cool scheduling stuff
    #DecisionOptimization
    #OPLusingCPOptimizer


  • 3.  Re: How to run schedule examples from command line (opl.bat)?

    Posted 09/11/08 09:33 PM

    Originally posted by: SystemAdmin


    [hexq said:]

    I find the reason of my problem.
    I cannot run examples containing any statement provided by [b]scheduler[/b] in command line, for example, [b]Activity[/b]. But I can run them in the graphic interface, and I have valid licenses to use scheduler. Should I define something like classpath?

    Thanks.
    #DecisionOptimization
    #OPLusingCPOptimizer


  • 4.  Re: How to run schedule examples from command line (opl.bat)?

    Posted 09/11/08 09:39 PM

    Originally posted by: SystemAdmin


    [hexq said:]

    In the ILOG st help, "[b]To use OPL Studio 3.7 in batch mode you need the keys for the underlying libraries, as required by your model (CPLEX and/or Solver and/or Scheduler). [/b]", does this cause the problem?
    #DecisionOptimization
    #OPLusingCPOptimizer