Examples of Task


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

Examples of tasks.Task

            fail();
        } catch (Exception e) {
            // expected
        }
       
        Task task = ReflectionUtils.newInstance(Task.class, DummyTask.class.getName());
        assertTrue("unexpected Task implementation", task instanceof DummyTask);
    }
View Full Code Here

Examples of threads.Task

//        System.out.println(func);

    }

    static void nonThread() {
        Task task = new Task();
        task.count = 100;
        for (int index = 0; index < task.count; index++) {
            Function log = new Log(1 + random() * 9);
            task.func = log;
            task.leftBorder = random() * 100;
 
View Full Code Here

Examples of us.codecraft.webmagic.Task

    }

    @Test
    public void testCycleTriedTimes() {
        HttpClientDownloader httpClientDownloader = new HttpClientDownloader();
        Task task = Site.me().setDomain("localhost").setCycleRetryTimes(5).toTask();
        Request request = new Request("http://localhost/404");
        Page page = httpClientDownloader.download(request, task);
        assertThat(page.getTargetRequests().size() > 0);
        assertThat((Integer) page.getTargetRequests().get(0).getExtra(Request.CYCLE_TRIED_TIMES)).isEqualTo(1);
        page = httpClientDownloader.download(page.getTargetRequests().get(0), task);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.