Task end set to other task's end

103 views
Skip to first unread message

pitufo gruñón

unread,
Nov 4, 2010, 7:44:13 PM11/4/10
to TaskJuggler Users
I defined all the tasks in my project.
Now I want to add a "management" task that represents the time spent
managing the project (to compute the cost of the manager's time)
It should start when the project starts, and end when project ends,
but the project end time is fixed (set as attribute of the "project"
keyword).

task manage "Management" {
start ${projectstart}
end ${projectend}
}

doesn't work. I want to make the task end at the same time the last
task ends. I know what's to be the last task. It's testing.
So I'd love to do

task manage "Management" {
start ${projectstart}
end !testing.end
}

But that syntax is not valid. I would add a milestone and make the /
end/ of manage task depend on it, but AFAIK you can only make the /
start/ of a task depend on another task.

Any clues?

Chris Schlaeger

unread,
Nov 5, 2010, 3:43:53 PM11/5/10
to taskjugg...@googlegroups.com
On Fri, Nov 5, 2010 at 12:44 AM, pitufo gruñón <ramir...@gmail.com> wrote:
> I defined all the tasks in my project.
> Now I want to add a "management" task that represents the time spent
> managing the project (to compute the cost of the manager's time)
> It should start when the project starts, and end when project ends,
> but the project end time is fixed (set as attribute of the "project"
> keyword).
>
> task manage "Management" {
>   start ${projectstart}
>   end ${projectend}
> }
>
> doesn't work. I want to make the task end at the same time the last
> task ends. I know what's to be the last task. It's testing.
> So I'd love to do
>
> task manage "Management" {
>   start ${projectstart}
>   end !testing.end
> }

'end' requires a fixed date, so that won't work. With TJ3 you can do

precedes !testing { onend }

With TJ2 you need to add another milestone task that depends on testing.

Just keep in mind that this turns the 'manage' task into an ALAP
tasks. It can only be scheduled when the end of 'testing' has been
determined. Mixing ALAP and ASAP can cause priority inversions.

Chris

pitufo gruñón

unread,
Nov 8, 2010, 4:56:16 PM11/8/10
to TaskJuggler Users
On Nov 5, 4:43 pm, Chris Schlaeger <cschlae...@gmail.com> wrote:
>
> 'end' requires a fixed date, so that won't work. With TJ3 you can do
>
>   precedes !testing { onend }
>
> With TJ2 you need to add another milestone task that depends on testing.
>
> Just keep in mind that this turns the 'manage' task into an ALAP
> tasks. It can only be scheduled when the end of 'testing' has been
> determined. Mixing ALAP and ASAP can cause priority inversions.
>
> Chris

Thanks Chris for the response. I didn't know the { onend } attribute.

I tried the TJ2 approach with the milestone and the TJ responds with
'Task proj.manage has a too weak end dependencies to be scheduled
properly.'
The Task.proj has a start attribute, and a precedes against the
milestone.

Using the solution you suggest for TJ3, I get a loop I cannot
understand.
The loop reads:
./tasks.tji:3: Warning in scenario optim: Loop detected at start of
task proj
./tasks.tji:9: Info in scenario optim: Loop ctnd. at start of task
proj.manage
./tasks.tji:9: Info in scenario optim: Loop ctnd. at end of task
proj.manage
./tasks.tji:117: Info in scenario optim: Loop ctnd. at end of task
proj.testing
./tasks.tji:117: Info in scenario optim: Loop ctnd. at start of task
proj.testing
./tasks.tji:63: Info in scenario optim: Loop ctnd. at end of task
proj.iphone
./tasks.tji:66: Info in scenario optim: Loop ctnd. at end of task
proj.iphone.basenode
./tasks.tji:66: Info in scenario optim: Loop ctnd. at start of task
proj.iphone.basenode
./tasks.tji:63: Info in scenario optim: Loop ctnd. at start of task
proj.iphone
./tasks.tji:3: Error in scenario optim: Aborting

My tasks.tji file is:
# Tasks
#-------
task proj "Dynamic Media Structure" {
complete 0
chargeset cost
${AllocateDevs}

task manage "Management" {
purge allocate
allocate rad
start ${projectstart}
#end ${projectend}
precedes !testing { onend }
}

task proto "Protocol" {
note "Define protocol between iPhone and server"
effort 4d
pessim:effort 6d
}

task server 'Backend' {
purge allocate
${AllocateAtMost1}

task service 'Service' {
note 'Service to load configuration files into JSON given "path" to
node'
depends !!proto
effort 1d
pessim:effort 2d
}

task cats "Categories" {
depends !!proto
note "In case of categories, make loader include data of children"
effort 2d
pessim:effort 3d
}

task urls "Paths to URLs" {
depends !!proto
note "Convert relative paths to absolute URLs for assets"
effort 1d
pessim:effort 2d
}

task bandatt "Band-specific attributes" {
note "Merge attributes specific to nodes with band-specific ones"
depends !!proto
effort 1d
pessim:effort 2d
}

task initload "Initial data load" {
note "Configuration of the initial (current) structure"
depends !!proto
effort 2d
pessim:effort 3d
}
}

task iphone 'iPhone' {
${AllocateAtMost1}

task basenode "Basic node" {
note "Parse and construct content for the basic node"
effort 2d
pessim:effort 3d
}

task factory 'Specific nodes factory' {
note "Create a factory to build all type-specific nodes"
effort 2d
pessim:effort 3d
}

task specific 'Type-specific' {
${AllocateAtMost1}
depends !basenode, !factory

task news 'News' {
effort 1d
pessim:effort 2d
}
task tweets 'Tweets' {
effort 1d
pessim:effort 2d
}
task setlists 'Set Lists' {
effort 1d
pessim:effort 2d
}
task video 'Video' {
effort 1d
pessim:effort 2d
}
task audio 'Audio' {
effort 1d
pessim:effort 2d
}
task tracks 'Tracks/Recordings' {
effort 1d
pessim:effort 2d
}
task bandinfo 'Band Info' {
effort 1d
pessim:effort 2d
}
task flickr 'Flickr RSS' {
effort 1d
pessim:effort 2d
}
}
}

task testing "Testing" {
purge allocate
allocate cami
depends !iphone, !server
effort 4d
pessim:effort 6d
}
task tested "Tested" {
milestone
depends !testing
}
}

# Deliverables
#--------------
task deliv "Milestones" {
task final "Final" {
depends !!proj.testing
}

Chris Schlaeger

unread,
Nov 14, 2010, 9:05:54 AM11/14/10
to taskjugg...@googlegroups.com
On Mon, Nov 8, 2010 at 10:56 PM, pitufo gruñón <ramir...@gmail.com> wrote:
> I tried the TJ2 approach with the milestone and the TJ responds with
> 'Task proj.manage has a too weak end dependencies to be scheduled
> properly.'
> The Task.proj has a start attribute, and a precedes against the
> milestone.

Probably you've used the wrong scheduling direction. My guess is,
you've used 'precedes' after 'start' and did not provide a
'scheduling'. But without an example project, that's just guessing.

> Using the solution you suggest for TJ3, I get a loop I cannot
> understand.
> The loop reads:
> ./tasks.tji:3: Warning in scenario optim: Loop detected at start of
> task proj

That's a closed loop of dependencies. Again, without a complete
example project, it's hard to tell what's the cause of it. Your
excerpts look, probably the problem is in the parts you did not post.

Chris

Reply all
Reply to author
Forward
0 new messages