Dificulty in ensuring that tasks run continuously

549 views
Skip to first unread message

Pedro Figueiredo

unread,
Dec 21, 2009, 3:48:21 PM12/21/09
to TaskJuggler Users
Hi all,

I'm using TaskJuggler version 2.2.0.

I would like to know if it is possible to force a task to run
uninterrupted, unless a higher priority task "appears".

In fact I often see a given resource working in a certain task which,
somewhere in the middle of that task, he/she jumps to another task
that has the same priority, and later gets back to the initial task.
Since both tasks have the same priority, the desirable/normal
situation is to do the work without jumping around in the tasks.

A example is given below where, although task t3 can be done by either
resources and r2 is free, r1 is picked up in the middle of t1 and
jumps to t3, and then later gets back to t1!

In this example one can fix the "problem" by removing the 'select
order' part (wonder why...), but in my real life plans I see this
happening all the time, in much more complex examples, where there is
no obvious way of fixing the problem.

Is there a way to get around this problem ?

Thanks a lot,
Pedro


-----------------------EXAMPLE
BELOW--------------------------------------------------------------------
project ex_projects "Example Projects" "1.0" 2010-01-01 2010-12-31 {

timeformat "%Y-%m-%d"
currency "EUR"
numberformat "-" "" "" "." 2

scenario plan "Plan" {
projection {strict}
}

}


resource r1 "Resource 1" {
}
resource r2 "Resource 2" {
}

task prj1 "Project 1" {
start 2010-01-01


task t1 "Task 1" {
allocate r1
effort 10d
}

task t2 "Task 2" {
allocate r2
effort 5d
}

task t3 "Task 3" {
depends !t2
allocate r1 {alternative r2 select order persistent}
effort 20d
}

}

taskreport "Tracking Gantt-Plan" {
start 2010-01-01
end 2010-12-31
headline "Tracking Gantt Chart"
columns hierarchindex, name, start, end, effort { title "Work" },
duration,
completed, chart
timeformat "%a %Y-%m-%d"
loadunit days
hideresource 0
scenario plan
sortresources nameup
hideresource ~isleaf()
}

Pedro Figueiredo

unread,
Dec 22, 2009, 8:05:27 AM12/22/09
to TaskJuggler Users
Hi all again,

Just to say the same thing happens in version 2.4.3.

Thanks in advance,
Pedro

Rene Vergara

unread,
Dec 22, 2009, 8:42:34 AM12/22/09
to taskjugg...@googlegroups.com
Hello,

You should try with other 'select' options. 'select order' means the
allocation goes in the order that you list the resources. I almost always go
for 'select minallocated', which closely resembles what happens in real life
with the resource with the most free time getting the assignment. Still, when
there are many parallel tasks, work does get split.

This work splitting problem is more of a schedule design issue, than a TJ
issue. Most of us choose the easy way and let TJ do the work, but in some
cases a few more restrictions are needed in order to produce the expected
result, such as using priorities, fixed allocations, fixed start dates or
explicit dependencies.

Giving a higher priority to the tasks in the critical path would help the
scheduler a lot.

Regards,
Rene

--
RAV

Pedro Figueiredo

unread,
Dec 23, 2009, 8:34:51 AM12/23/09
to TaskJuggler Users
Hello Rene,

Thank you for your prompt message!

The usage of 'select order' was just a way I found of making the
"issue" appear in a simple test case. The problem is that I see this
happening in real plans, even if I never use 'select order'.

Putting it simply, what I would like to know is: is there any way to
guarantee that, once a person starts a certain task, he/she does NOT
DO ANYTHING ELSE that has the same or lower priority, until that task
is finished?

As I mentioned earlier, what I see is that the person starts doing the
task and then, in the middle, jumps to another one that has the same
priority, and finally gets back to the first task. It is more natural
to finish what one is doing before going to the next task.....

As a side note what I liked in TJ was the idea that one defines the
constrains and lets the software find the best solution - this is
great! But right now, to get around this "jumping around problem" I
need to add "fake" constrains that limit the greatness of TJ.

Thanks,
Pedro

PS: Regarding 'select order' -> the manual states "Pick the first
available resource from the list. ", and in my simple testcase the
resource it picks (r1) is not available, while r2 is. So I believe
what is happening is not the behaviour one would expect.

Rene Vergara

unread,
Dec 23, 2009, 9:11:02 AM12/23/09
to taskjugg...@googlegroups.com
Hello Pedro,

Another good practice that can help the scheduler is to use start and finish
milestones.
So in your example, make t1 and t2 depend on the start milestone, and make a
finish milestone that depends of t1 and t3. That will help calculating slacks,
and path criticalness. Without the milestones, pretty much any computer
scheduler will see two independent paths (maybe with the exception of those
highly priced ones that assume what you're trying to do, and often assume
wrong), and the results will vary.

On a more complex network of tasks, you should make an effort to create paths
from the start milestone to the finish milestone, not leaving any non-critical
path hanging out there. I know that sometimes this is not so practical, and I
have used TJ's powerful scheduler to sort out a bunch of independent tasks by
allocating dynamically from a pool of resources. TJ does this well, but have
you noticed that it doesn't highlight a critical path? It's because there is
no task network, as there are no dependencies.

A solution I use is to put in the dependencies for each resource after TJ
sorts out the independent tasks. For example, I have 4 independent tasks t1,
t2, t3, t4 and 2 resources r1, r2.

task t1 "Task 1" {
effort 1d
allocate r1 { alternatives r2 select minallocated persistent}
}

task t2 "Task 2" {
effort 1d
allocate r1 { alternatives r2 select minallocated persistent}
}

task t3 "Task 3" {
effort 1d
allocate r1 { alternatives r2 select minallocated persistent}
}

task t4 "Task 4" {
effort 1d
allocate r1 { alternatives r2 select minallocated persistent}
}

This will make task t1 and t2 start at the same time, t3 to follow t1 and t4
to follow t2. Now, I would make t3 depend on t1 and t4 depend on t2, since TJ
has already given that as a solution to the resource constraint. You could
also remove the dynamic allocation and put a fixed one to the resource that TJ
calculates can perform the work during that period. I wouldn't do that on a
complex project if you want to track it with bookings, though. But adding the
dependencies does reduce the ambiguity, and instead of having to sort between
4 tasks, TJ only has to deal with the first two.

You could use this approach in what Project Managers call "Rolling wave
Planning", which is to set the detail plan for the short term, while the long
term work is only planned in general. So you add the dependencies and fix the
allocations for the next week, while leaving the rest of the month still a bit
undefined, until you have more information about resource availability, real
effort needed, etc.

Hope this helps.

Rene

--
RAV

Chris Schlaeger

unread,
Dec 23, 2009, 1:10:12 PM12/23/09
to taskjugg...@googlegroups.com
On Wed, Dec 23, 2009 at 2:34 PM, Pedro Figueiredo
<pedro_fi...@live.com> wrote:
> Putting it simply, what I would like to know is: is there any way to
> guarantee that, once a person starts a certain task, he/she does NOT
> DO ANYTHING ELSE that has the same or lower priority, until that task
> is finished?

A resource will not stop working on a task unless

* it's preempted by a higher priority task
* the resource becomes unavailable (vacation, time-off)
* the task is interrupted by a break (shift)

If you see a different behavior that may be a bug. TJ 2.2.0 is _very_
old. Please try a newer version before reporting a bug.

Thanks,
Chris

Pedro Figueiredo

unread,
Dec 23, 2009, 1:43:10 PM12/23/09
to TaskJuggler Users
Hi Chris,

> A resource will not stop working on a task unless
>
> * it's preempted by a higher priority task
> * the resource becomes unavailable (vacation, time-off)
> * the task is interrupted by a break (shift)

That is my understanding of how it should work.
The behaviour in version 2.4.3 is the same, as I said above. I may, of
course, be doing something wrong...

Regards,
Pedro

Chris Schlaeger

unread,
Dec 24, 2009, 4:17:00 AM12/24/09
to taskjugg...@googlegroups.com
On Wed, Dec 23, 2009 at 7:43 PM, Pedro Figueiredo
<pedro_fi...@live.com> wrote:
> That is my understanding of how it should work.
> The behaviour in version 2.4.3 is the same, as I said above. I may, of
> course, be doing something wrong...

The only way to find out is to attach a small but complete project
file that demonstrates the problem.

Chris

ki11er_bob

unread,
Jan 8, 2010, 9:57:54 AM1/8/10
to TaskJuggler Users
Hi'

This thread seems interesting to me, so I try adding an example below.
I describe its intention itemized as follows.

* Two idential resources R1 and R2 exist.

* A task TASK exist with three subtasks T1 and T2 and T3.

* An independent task T4 also exists.

The intention is as follows.

TASK shall allocate R1 and R2 throughout its lifetime. Subtasks T1 and
T3 inherits that allocation. Subtask T2 purges the inheritation and
allocates only one of R1 or R2.

Task T4 shall allocate only one of R1 or R2. It is the intention, that
T4 can only do that, after TASK is done, since TASK allocates both R1
and R2.

Still I observe, that T4 starts before TASK is done. That is, one of
R1 or R2 are used by T4 before TASK is done. Furthermore, when T3 can
start, the resource, that T4 is using, is moved to T3, even though no
priority statements are in the project.

Best regards.

Thomas.

##### ---> CODE BELOW THIS LINE <--- #####

project ProductionPlan "Production Plan" "1.0" 2010-01-01-00:00:00 -
2010-01-02-00:00:00 {
timingresolution 1min
workinghours mon - sun 00:00 - 24:00
now 2010-01-01-00:00:00
}

resource RESOURCES "RESOURCES" {
resource R1 "R1"
resource R2 "R2"
}

macro my_alloc [
allocate R1 { persistent mandatory alternative R2 }
]

task TASK "TASK" {
${my_alloc}
${my_alloc}
task T1 "T1" {
start 2010-01-01-01:15:00
effort 180min
}
task T2 "T2" {
depends !T1
effort 150min
purge allocations
${my_alloc}
}

task T3 "T3" {
depends !T2
effort 300min
}
}

task T4 "T4" {
start 2010-01-01-03:15:00
effort 150min
${my_alloc}
}

taskreport "Gantt Chart" {
headline "Gantt Chart"
columns hierarchindex, name, start, end, duration, chart
timeformat "%H:%M"
start 2010-01-01-00:00:00
end 2010-01-02-00:00:00
loadunit minutes
hideresource 1
}

resourcereport "Resource Graph" {
headline "Resource Graph"
columns name, utilization, chart
start 2010-01-01-00:00:00
end 2010-01-02-00:00:00
hidetask 1
}

Josef

unread,
Jan 12, 2010, 5:08:17 PM1/12/10
to TaskJuggler Users
I actually have the opposite problem: when two or more tasks overlap
in time, I want to be able to distribute a resource over these tasks,
e.g. the same resource should work every day or every week on several
parallel tasks. I know, this can be done with shifts or by using
limits, but shifts and limits only can limit the amount of daily work
on a task, which then applies also when these task are not in parallel
any more.

Take the simple case, when two tasks overlap partially in time, with
fixed start and end times. Then I would like to assign a resource to
both tasks. Where the tasks overlap the resource should work 5 hours
per work on one task and 3 hours per work on the other. Where the
tasks do not overlap, the same resource should work 8 hours per day on
the remaining task.

As far as I understand, this cannot be done currently: Taskjuggler
will always give one of the two tasks priority over the other. If I
limit the amount of work on any task, it will not end up with 8 hours
per day, even if it is the only task left.

This schenario is not really very useful when using Taskjuggler for a
single project, but is quite necessary when planning several
independent projects with the same resources. The task times may be
constrained by external reasons, or have been fixed outside the
control of the project manager, but still the same resources may have
to work on these partially overlapping tasks, to varying degree, but
should also work on 100% all the time.

So, instead of ensuring that a resource works always on the same task,
before switching to the next, I would like to see a way to control the
distribution of times over parallel tasks gradually.

- Josef

Jack01

unread,
Jan 13, 2010, 6:01:14 AM1/13/10
to TaskJuggler Users
First I would like to say, that I am very happy to use Taskjuggler
2.4.3. It is a really nice tool.
My problem is that the work of parallel tasks is interrupted and the
resource doesn't finish the work it is doing now. It jumps to other
tasks.
If I use the priority attribute for the task it should do now and
first finish. It still jumps to other tasks with lower priority.
e.g. T1 has a priority 800 it switches the resource to T2 with a
priority of 550.
If I lower the priority of T2 to <500 it doesn't allocate the resource
to T2. But >=500 it allocates the resource.

It seems having something to do with the start date of T2. If a start
date (overlapping with T1) is used TJ seems to try to really start the
task still if now resource is available.

- Jack01

Chris Schlaeger

unread,
Jan 14, 2010, 5:32:23 AM1/14/10
to taskjugg...@googlegroups.com
On Tue, Jan 12, 2010 at 11:08 PM, Josef <joe...@gmx.net> wrote:
> Take the simple case, when two tasks overlap partially in time, with
> fixed start and end times. Then I would like to assign a resource to
> both tasks. Where the tasks overlap the resource should work 5 hours
> per work on one task and 3 hours per work on the other. Where the
> tasks do not overlap, the same resource should work 8 hours per day on
> the remaining task.

You need to decide which task is the more important task. Give it a
higher priority and limit assignments with shifts or limits. Whenever
this task is not active the resource will work on the fallback task.

Chris

Josef Dalcolmo

unread,
Jan 14, 2010, 9:05:42 AM1/14/10
to taskjugg...@googlegroups.com
Dear Chris,

Thanks for the answer - I realize what I can do with priorities and
shifts or dailymax. However this does not solve my problem completely,
since the higher priority task needs to have a limit (limits or shift)
on the hours and therefore the single resource will never work full time
on the higher priority task, even when the lower priority task has
already finished.

This is even counter-intuitive, because the LOWER priority task (which
has no limit set) does get the resource full time, at times when the
higher priority task is not active.

Things get even uglier when one must assign the same resource to more
than two overlapping tasks.

At this time, the only solution is to break down the work of the
different projects competing for the same resource into small tasks for
this resource alone. Then Taskjuggler can move these tasks around until
they do not overlap. This is not always convenient, because one needs to
add a LOT more detail to the tasks specification. I realize I might be
using TJ in a way it was not designed to work, nevertheless I have here
a feature request: I would like to assign the same resource full time to
several tasks, but allow this to turn into a weighted distribution of
hours where the tasks do overlap, for example with an attribute to the
assignment:

task T1 "Do this" {
period 2010-01-01 - 2011-01-01
allocate R1 {limits {dailymin 4h}}
}
task T2 "Do that" {
period 2010-03-01 - 2011-03-01
allocate R1 {limits {dailymin 2h}}
}
task T3 "Something else" {
period 2010-06-01 - 2011-06-01
allocate R1 {limits {dailymin 2h}}
}

The resource R1 should then work in the period 2010-06-01 - 2011-01-01
on all three tasks, but in the period 2010-03-01 - 2011-06-01 only 66%
on T1, 33% on T2, and in the period 2010-01-01 - 2010-03-01 100% on T1,
in the period 2011-03-01 - 2011-06-01 100% on T3 etc.

- Josef


Perhaps this way of

--
Dr. Josef Dalcolmo
von Hoerner & Sulger GmbH, Schlossplatz 8, D-68723 Schwetzingen, Germany
Registergericht: Mannheim HRB 42 1420 -- USt.-IdNr.: DE 144 277 466
Gesch�ftsf�hrung: Dr. Hanna von Hoerner, Dr. Hartmut Henkel, Dr. Josef
Dalcolmo
Webpage: http://www.vh-s.de

Chris Schlaeger

unread,
Jan 15, 2010, 2:52:06 AM1/15/10
to taskjugg...@googlegroups.com
Josef,

I don't think TJ was made for what you are looking for. It's a
scheduling tool. You need to tell it what the tasks are, who may be a
good candidate to work on it and other constrains. And then it will
figure out the schedule and assigns resources. If you already have
made up your mind when many tasks start and end and who should be
working when on which tasks then you either have to tell TJ _all_
those details or it will not produce the desired result.

Regarding your feature request, we cannot support this. The scheduler
does not schedule all tasks in parallel. It does not care how much a
resource has been allocated to other tasks. If it considers a resource
assignement for a task for a time slot it only looks at whether the
resource is available or not. If it is, it gets assigned.

Chris

Josef Dalcolmo

unread,
Jan 17, 2010, 4:43:19 PM1/17/10
to taskjugg...@googlegroups.com
Dear Chris,

> Regarding your feature request, we cannot support this. The scheduler
> does not schedule all tasks in parallel. It does not care how much a
> resource has been allocated to other tasks. If it considers a resource
> assignement for a task for a time slot it only looks at whether the
> resource is available or not. If it is, it gets assigned.

This is not completely true: if there is another task with higher
priority, that one will get the resource up to the limit set. The
problem is, that we cannot balance the resource between tasks: it is all
or nothing up to the limits set. My request may be in conflict with the
way the scheduler works - I have yet to gain more experience with it (so
far I worked mostly with MS Project / OpenProj). In any way, Taskjuggler
is great.

- Josef

Reply all
Reply to author
Forward
0 new messages