Re: [Planner Dev] Task Contraints



On Tue, 2004-03-30 at 20:24 +1000, Corey Schuhen wrote:
> I have looked at using planner for a project of mine and it looks pretty good, 
> such that it would almost do the job... almost. Good work guys. What I really 
> need is the other dependancy types to work. From what I can tell the "lag" 
> option does not work either. 

The lag option does work ... roughly. :-)

The units seem to behave strangely. Lag units (that you enter in the
dialog box) are in hours -- although this is not clear when you are
assiging them. It appears that the MrpRelation GObject stores the lag in
seconds (based on what is in src/planner-task-dialog.c around line 942).

As far as implementing the other relation types (start-to-finish,
finish-to-finish, etc), you should start poking around
libplanner/mrp-relation.[ch]. Also look at the relation types in
libplanner/mrp-types.h -- search for MRP_RELATION_FS and its friends and
then look for the four or five main places where it is used.

> Consequently, I would not mind having a "hack". I have not programmed with 
> Gnome or GTK before, well actually I did write a small GTK app about 4 years 
> ago but I have well and truly forgotten all about that. I tried to have a 
> poke around and did not get very far. 
> 
> I have read the "getting-started-hacking.xml" document. B.t.w. how do I 
> convert this into a more redable format? or view it? I expected that "make" 
> would generate a html or pdf from the xml.

I have attached two files that will help you get started. I'll try to
fix this up a bit better and send a patch to Richard, but for now
(assuming you have the DocBook stylesheets installed -- something like
the docbook-xsl package on many distributions) run

        xsltproc -o foo.html params.xsl getting-started-hacking.xml

and drop the style.css file in the same location as foo.html. Then
loading foo.html into a browser will give you a mostly readable version
of the document as an HTML file.

> I was hoping that somebody could give me some pointers and a rough overview on 
> how the code fits togeather. Maybe even tell me which modules/classes do the 
> work that I will need to change.
> 
> One thing that I did want to specifically know is, where in code does the 
> "scheduling" get done. If I create a dependancy, where is the code that 
> decides where in time this dependant task should get shifted to.

Start with the function mrp_project_reschedule in
libplanner/mrp-project.c and some of the other functions around there.
Also libplanner/mrp-task-manager.c will be useful to read through --
that includes the implementation of the task object that is at the
centre of all these calculations.

Hopefully this can help you get started and then some of the other guys
on this list can help you out further.

Cheers,
Malcolm
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; version='1.0'>
   <xsl:import 
    href="http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl"/>

   <xsl:param name="toc.section.depth" select="3"/>
   <xsl:param name="make.valid.html" select="1"/>
   <xsl:param name="section.autolabel" select="1"/>
   <xsl:param name="section.label.includes.component.label" select="1"/>
   <xsl:param name="html.stylesheet" select="'style.css'"/>
   <xsl:param name="variablelist.as.table" select="1"/>
</xsl:stylesheet>
body {
  font-family: Verdana, sans-serif;
}

table {
  border-collapse: collapse;
  border: 1px solid #aaaaff;
}

th {
  background-color: #eeeeff;
}

td {
  border-bottom: 1px solid #aaf;
  padding: 3px;
}

div.toc, div.sect1 {
  background-color: white;
  padding: 0 1em 0;
}

div.toc {
  border-width: 1px;
  border-style: solid;
  border-color: #aaaaff;
}

div.abstract {
  border-width: 1px;
  border-style: solid;
  border-color: #aaaaff;
  margin-bottom: 1em;
  padding: 0 1em;
}

div.appendix div.sect1 {
  border-style: none;
}

.navheader td, .navfooter td {
  background-color: #eeeeff;
}

/* There are a bunch of horizontal rules that are useful in an unstyled
 * setting, but just clash with the borders that our style renders. */
.titlepage hr, .navheader hr, .navfooter hr {
  display: none;
}

.programlisting {
  background-color: #eef;
  padding: 1em;
  border: 1px solid #aaf;
}

.example td {
  padding: 0;
}

p {
  text-align: justify;
}

/* Full justification for bibliography entries often leads to awkward
 * inter-word spacing, since the words are typically longer than average and
 * less prone to easy layout. So we don't fight nature on this one. */
.bibliography p {
  text-align: left;
}

a {
  color: #3333ff;
  text-decoration: none;
}

a:hover {
  color: #000077;
  text-decoration: underline;
}

.toc a {
  color: #0000ff;
}

.toc a:hover {
  color: #000055;
}

/* FIXME: Probably need to set "color" here as well, since IE is broken. */
div.footnotes hr {
  background-color: #aaaaff;
  width: 70%;
  height: 1px;
  border: 0;
}

.footnotes {
  font-size: smaller;
}

.legalnotice p {
  margin-left: 1em;
  margin-right: 1em;
}

/* The Norm Walsh stylesheets allow the legal notice to go on a separate page,
 * but they don't add any real styling to it -- it appears just the same as if
 * it were inline on the title page. So we force some style onto it in the
 * following elements. */
p.legalnotice-title {
  text-align: center;
  font-size: x-large;
  background-color: #eeeeff;
  border: 1px solid #aaaaff;
  padding: 0.5em;
  margin-left: 0;
  margin-right: 0;
}

.legalnotice blockquote.blockquote {
  border: 1px solid black;
}

/* This makes the copyright line itself stand out from the rest of the license
 * text (except on IE, which is known to suck). */
.legalnotice blockquote.blockquote > p:first-child {
  background-color: #eeeeff;
  margin: 0;
  padding: 1em 1em 0.5em 1em;
}


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]