Jump to content




Recent Topics

Recent Status Updates

  • Photo
      18 Aug
    KodeKool

    When faced with a wall of errors and no hope to fix them, remember the following "Programs always do what you tell them to, and seldom what you want them to, but eventually you'll run out of things that can go wrong and it'll just work. and that's the secret to good programming."

    Show comments (2)
View All Updates

Developed by Kemal Taskin
Photo
- - - - -

Scheduling of jobs in the presence of constraints in Java


  • Please log in to reply
55 replies to this topic

#1 AndreaFar

AndreaFar

    CC Regular

  • Member
  • PipPipPip
  • 26 posts

Posted 14 March 2012 - 07:05 AM

I want to design and build a Java SE application to check the correctness of jobs activities and to propose a schedule in the presence of constraints.

A task is performed by running, by more people, some basic jobs with known duration in time units (days, months, etc..). The execution of the jobs could lead to the existence of time constraints: a job, for example, can not start if it is not over another and so on. I want to design and build an application to check the correctness of jobs activities and to propose a schedule of jobs, if any, which is respectful of the constraints. Input must provide the jobs and associated constraints. The expected output is the scheduling of jobs. The specification of an elementary job consists of the pair
<jobs-id, duration>

the beginning (S) or the end (E) of a jobs Id-job1, must take place before ( B) / after (A) of the beginning (S) / end (E) of the Id-job2. If there are no dependencies between some jobs, then jobs can be done before, in parallel.


the question is:
How to create an efficient java scheduler to manage the jobs with these constraints, as described???

Edited by AndreaFar, 24 June 2012 - 04:55 PM.
clarify the question

  • 0

#2 wim DC

wim DC

    Roar

  • Expert Member
  • PipPipPipPipPipPipPipPip
  • 2,560 posts
  • Programming Language:Java, JavaScript, PL/SQL
  • Learning:Java, PHP

Posted 14 March 2012 - 07:14 AM

So where's the question? ;)
  • 0

#3 AndreaFar

AndreaFar

    CC Regular

  • Member
  • PipPipPip
  • 26 posts

Posted 14 March 2012 - 07:31 AM

So where's the question? ;)


I want to design and build a Java SE application to check the correctness of jobs activities and to propose a schedule in the presence of constraints in the same way as described(efficiently if is possible).... see the example with the output. thx :)
  • 0

#4 Norm

Norm

    CC Addict

  • Senior Member
  • PipPipPipPipPip
  • 396 posts
  • Location:Eastern Florida
  • Programming Language:Java, C++, Assembly

Posted 14 March 2012 - 07:38 AM

Do you have any specific java programming questions?
  • 0

#5 AndreaFar

AndreaFar

    CC Regular

  • Member
  • PipPipPip
  • 26 posts

Posted 14 March 2012 - 07:53 AM

Do you have any specific java programming questions?


the question is:
How to create an efficient java scheduler(avoiding the intense backtracking if is possible) to manage the jobs with these constraints, as described???

I hope in a skilled developer that can help me to solve this problem.
  • 0

#6 Norm

Norm

    CC Addict

  • Senior Member
  • PipPipPipPipPip
  • 396 posts
  • Location:Eastern Florida
  • Programming Language:Java, C++, Assembly

Posted 14 March 2012 - 07:57 AM

That is not a very specific question.
Are you going to be writing this program?

If you are looking for a programmer to write the code for you, have you looked at hiring one?
  • 0

#7 AndreaFar

AndreaFar

    CC Regular

  • Member
  • PipPipPip
  • 26 posts

Posted 14 March 2012 - 08:03 AM

That is not a very specific question.
Are you going to be writing this program?

If you are looking for a programmer to write the code for you, have you looked at hiring one?


I don't want a programmer that wrote the program for me, this problem is a little part of a program that I'm developing and I have asked in the forum, to find someone that can help me to find a solution.
Nobody is obligated to help me if doesn't want (or doesn't can).

The question is specific.
  • 0

#8 Norm

Norm

    CC Addict

  • Senior Member
  • PipPipPipPipPip
  • 396 posts
  • Location:Eastern Florida
  • Programming Language:Java, C++, Assembly

Posted 14 March 2012 - 08:05 AM

Sorry, I missed the specific question. Can you ask it again.
  • 0

#9 AndreaFar

AndreaFar

    CC Regular

  • Member
  • PipPipPip
  • 26 posts

Posted 14 March 2012 - 08:59 AM

Sorry, I missed the specific question. Can you ask it again.


copy\paste
the question is:
How to create an efficient java scheduler(avoiding the intense backtracking if is possible) to manage the jobs with these constraints, as described???

the detailed description is in the first post,


A possible solution for this matter, may be based on technical backtracking. The jobs are used as choice points, and temporal instants as choices (in the worst case the total duration of the activity is the sum of the durations of the work, resulting in a fully sequential execution).

Alternatively I should adequately represent the data and then generates a scheduling on the time axis, placing the work under the constraints and moving forward in a job (and all the jobs that depend on it) when a constraint is not satisfied.
But I don't know how exactly I can do this in java.


In other words I looking for a way to avoiding the intense backtracking approach, in the job management described.
  • 0

#10 lethalwire

lethalwire

    while(false){ ... }

  • Senior Member
  • PipPipPipPipPipPip
  • 762 posts
  • Programming Language:Java, PHP
  • Learning:Java, PHP

Posted 14 March 2012 - 12:54 PM

So you need some guidance as to how to tackle this type of problem?

For instance, what types of data structures and algorithms could be helpful in solving this problem?
  • 0

#11 lethalwire

lethalwire

    while(false){ ... }

  • Senior Member
  • PipPipPipPipPipPip
  • 762 posts
  • Programming Language:Java, PHP
  • Learning:Java, PHP

Posted 14 March 2012 - 01:10 PM

Would you say that this diagram fits the test case you've specified:
JobSorting.png
  • 0

#12 AndreaFar

AndreaFar

    CC Regular

  • Member
  • PipPipPip
  • 26 posts

Posted 14 March 2012 - 03:11 PM

Would you say that this diagram fits the test case you've specified:
[ATTACH=CONFIG]4631[/ATTACH]


Thanks for the answer.
Yes, the posted diagrams fit the test case :thumbup1:

Do you have any suggestion that could help me?? :)
  • 0