Package solver.variables

Examples of solver.variables.Task


    Random rd = new Random(0);
    for(int i=0;i<n;i++){
      duration[i] = VF.fixed(rd.nextInt(20)+1,solver);
      height[i] = VF.fixed(rd.nextInt(5)+1,solver);
      end[i] = VF.offset(start[i],duration[i].getValue());
      task[i] = new Task(start[i],duration[i],end[i]);
    }
    solver.post(ICF.cumulative(task,height,capa,true));
    solver.post(ICF.maximum(makespan,end));
  }
View Full Code Here


    final IntVar[] h = VF.enumeratedArray("h",n,0,hmax,solver);
    final IntVar capa = VF.enumerated("capa", 0, capamax, solver);
    final IntVar last = VF.enumerated("last", 0, n * dmax, solver);
    Task[] t = new Task[n];
    for(int i=0;i<n;i++){
      t[i] = new Task(s[i],d[i],e[i]);
      solver.post(ICF.arithm(e[i],"<=",last));
    }
    Constraint c = ICF.cumulative(t,h,capa,graph);
    solver.post(c);
    solver.set(ISF.random_bound(solver.retrieveIntVars(), seed));
View Full Code Here

TOP

Related Classes of solver.variables.Task

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.