[eclipse-users] Java exception is being thrown when invoking an eclipse program scheduling over 300 tasks

From: William Heath <wgheath_at_...6...>
Date: Mon, 10 Dec 2007 18:04:52 -0800
Hi All,

I am having a problem dealing with what appears to be a memory
limitation with either java or eclipse.  I am attaching two files:

TestExample3.java  (This file creates tasks and 1 resource then
invokes the schedule_tasks predicate in sched_test3.pl)
sched_test3.pl  (This file schedules the tasks onto resources)

line 59 of TestExample3.java controls how many tasks are sent to the
sched_test3.pl eclipse program.  This works for 300 tasks and lower.

   for(int i = 0; i<400; i++) {

    Object [] taskObjects = new Object[7];

    taskObjects[0] = (Object)(new Atom("Task 1")); //task name (atom)
    taskObjects[1] = (Object)(new Integer(0));     //index (integer)
    taskObjects[2] = null;                         //start (integer variable)
    taskObjects[3] = null;                         //earliest_start (integer)
    taskObjects[4] = (Object)(new Integer(2));    //duration (integer)
    taskObjects[5] = null;                         //need (dependent tasks)
    taskObjects[6] = (Object)(new Integer(0));     //use (resource id to use)

    CompoundTerm task1 =  new CompoundTermImpl("unscheduled_task", taskObjects);
    unscheduledTaskList.add(task1);
    }

When I took it up to 400 it fails with a just an Exception null.  You
can execute these programs with something like this:

echo $CLASSPATH
/home/wgheath/work/eclipseclp/lib/eclipse.jar:/home/wgheath/work/openprojcvs/openproj_build/functionaltest.jar:/home/wgheath/work/openprojcvs/openproj_contrib/lib/junit.jar

then:

java -Xmx1024m test.functional.TestExample3  (I tried increasing the
jvm memory but that did not help)

I am creating a finite capacity job shop scheduler for the opensource
project called Adempiere.  Any help in understanding how to get more
tasks to be scheduled etc... would be greatly appreciated.

-Tim

P.S.

I am quite impressed with eclipse-clp so far!  Also any advice on how
to speed up my program and/or prolog enhancment comments would be
greatly appreciated as I am new to prolog.



Received on Tue Dec 11 2007 - 02:05:03 CET

This archive was generated by hypermail 2.3.0 : Wed Sep 25 2024 - 15:13:20 CEST