[TJ3] task end depends on start of other task

373 views
Skip to first unread message

Jack Holborn

unread,
Aug 6, 2011, 11:52:00 PM8/6/11
to TaskJuggler Users
I'm trying to find a way to squeeze one task in between two others,
where the middle task can only start when the first task has finished,
and must end when the third task begins.

I've found the following messages here on the board, but can't really
get my head around it:
1: http://groups.google.com/group/taskjuggler-users/browse_thread/thread/a5aad44e31a688cc/e3e5443a1c3fa549?lnk=gst&q=onend#e3e5443a1c3fa549
2: http://groups.google.com/group/taskjuggler-users/browse_thread/thread/592f356ebd299d8b/46c88c7461e0376f?lnk=gst&q=onend#46c88c7461e0376f

What I've tried so far (and it's just a rudimentary schedule) is (the
relevant section is under "task training"):

=============================================
# Header
project soupo "South Pole 2013-14" 2011-07-18 - 2014-04-01 {
timezone "Australia/Brisbane"
currency "AUD"
timeformat "%d/%m/%Y"
numberformat "-" "" "," "." 2
currencyformat "-" "" "," "." 2
}

# Recourses
resource jack "Jack" {
email "@gmail.com"
}

# Tasks
task start "Project Start" {
start ${projectstart}
}
task prelim "Preliminary Research" {
start ${projectstart}
end 2011-12-31
allocate jack
}
task ptrain "Preliminary Training" {
start ${projectstart}
end 2011-12-31
allocate jack
}
task pivot "Go or No-Go" {
start 2011-12-31
}
task train "Training" {
scheduling alap
precedes !arriv { onstart }
depends !pivot
}
task health "Health Checks" {
start 2012-02-01
duration 10w
allocate jack
}
task fund "Funding" {
start 2012-01-01
duration 1y
allocate jack
}
task fpivot "Final Go or No-Go" {
depends !fund
}
task money "All Costs Covered" {
depends !fund
}
task purch "Purchases" {
depends !money, !fpivot
end 2013-10-31
allocate jack
}
task book "Bookings" {
depends !money, !fpivot
end 2013-10-31
allocate jack
}
task freight "Freight Equipment" {
depends !money, !fpivot
end 2013-10-31
allocate jack
}
task flight "Flights" {
depends !money, !fpivot
end 2013-10-31
allocate jack
}
task arriv "Latest Arrival at Union Glacier" {
start 2013-11-01
}
task trek "Treck to South Pole" {
depends !arriv
allocate jack
}
task pole "Latest Arrival at South Pole" {
start 2013-12-15
}
task return "Latest Return to Union Glacier" {
start 2014-01-15
}
task home "Flight Home" {
depends !return
allocate jack
}

# Reports
textreport frame "" {
textreport index "Overview" {
formats html
center '<[report id="overview"]>'
}
}
taskreport overview "" {
columns hierarchindex,
name, start, duration, end, chart
}

=================================

In this example, I don't want to start the serious training, until I
have a decision to actually go ahead with the project, and it must end
once I actually start my trip I'm training for (but that start date is
fixed!).
Right now I'm getting the following error when I run tj3:
pole.tjp:33: Error in scenario plan: Task train has a too weak end
dependencies to be scheduled properly.

Question is: is it just me, messing up the syntax, or is it one of
those hammock tasks, mentioned by Chris Schlaeger in link [1] (see
above)?
In case it's me, I'd be very grateful for a correction, if it's
taskjuggler3 I'm happy to wait until this functionality is
implemented, and will type in end dates manually.

Thanks very much for this absolutely fabulous program, and thanks in
advance for any help offered.
Cheers
Jack

feng

unread,
Aug 7, 2011, 1:15:15 PM8/7/11
to TaskJuggler Users
Hi Jack,

At a quick glance, there are multiple tasks that wouldn't be
scheldulable, in particular: task start, task pivot. They have a start
date, but no length or end date, so the scheduler won't know how long
these tasks should last.

Now back to the 'task train', first of all, specify a "depends !pivot
{onend}" to anchor the start date at the end of pivot. Then fixed the
"task pivot" so that pivot has a end date. Now the start and end of
'task train' are completely depending on pivot and arriv. The
scheduler may complain that condition specified can not be met, but
that's a different issue, usually caused by resource conflict or other
dependencies. In your case, I think this should work.

Best,
Feng

On Aug 6, 11:52 pm, Jack Holborn <holbor...@gmail.com> wrote:
> I'm trying to find a way to squeeze one task in between two others,
> where the middle task can only start when the first task has finished,
> and must end when the third task begins.
>
> I've found the following messages here on the board, but can't really
> get my head around it:
> 1:http://groups.google.com/group/taskjuggler-users/browse_thread/thread...
> 2:http://groups.google.com/group/taskjuggler-users/browse_thread/thread...

Jack Holborn

unread,
Aug 8, 2011, 12:07:49 AM8/8/11
to TaskJuggler Users
Thanks for your help and effort, feng.
First of all, I don't think that there is anything wrong with omitting
an end date for a task as that just makes them a "milestone" event
(which is exactly what they are in my example). The whole shebang
works prefectly fine when I take out the end dependency in task train
and replace it with a 'normal' end date, i.e.:

task train "Training" {
depends !pivot
end 2013-10-31
}

So I'm pretty confident that the rest of my file is correct.

However, I would still quite like some help and/or clarification on
the possibility of end dependencies. Thanks very much.

Chris Schlaeger

unread,
Aug 30, 2011, 3:46:05 PM8/30/11
to taskjugg...@googlegroups.com
It's kind of a hammock task, but with a special twist. You are using a
'onstart' dependency for the start date of 'train'. But due to the
'alap' scheduling, you are scheduling towards that end. An 'onstart'
dependency can only be resolved from the other tasks start to this
tasks start. This means, that the scheduler must be able to determine
the start date of the other task first and then it must set this tasks
start date. The 'onstart' and 'onend' dependencies are essentially
weaker than normal dependencies. The scheduler must be able to
prioritize dependencies to resolve certain situations.

Chris

Reply all
Reply to author
Forward
0 new messages