Re: [Planner Dev] Cost computation - some test cases



Xavier Ordoquy wrote:
Here are some cost computation sample. I'll try to make them test cases
when the Python binding will be available.


Here's a sample plan thats matches your test cases - note I've created a Resource 3 so it can have a cost of 25/h.

Lincoln.


=================================================================
Test case 1

Resource R1: cost is 12.5 (100 per day)
Tasks T1: work is one day, R1 assigned 100%

T1:
Duration should be one day
Cost should be 100

=================================================================
Test case 2

Resource R1: cost is 12.5 (100 per day)
Tasks T1: work is one day, R1 assigned 50%

T1:
Duration should be 2 days
Cost should be 100

=================================================================
Test case 3

Resource R1: cost is 12.5 (100 per day)
Tasks T1: work is two day, R1 assigned 200%

T1:
Duration should be 1 days
Cost should be 200

=================================================================
Test case 4

Resource R1: cost is 12.5 (100 per day)
Resource R2: cost is 12.5 (100 per day)
Tasks T1: work is two day, R1 and R2 assigned 100%

T1:
Duration should be 1 days
Cost should be 200

=================================================================
Test case 5

Resource R1: cost is 12.5 (100 per day)
Resource R2: cost is 12.5 (100 per day)
Tasks T1: work is 3 day, R1 assigned 100%, R2 assigned 50%

T1:
Duration should be 2 days
Cost should be 300

=================================================================
Test case 6

Resource R1: cost is 12.5 (100 per day)
Resource R2: cost is 25 (100 per day)
Tasks T1: work is 3 day, R1 assigned 100%, R2 assigned 50%

T1:
Duration should be 2 days
Cost should be 400



_______________________________________________
Planner-dev mailing list
Planner-dev lists imendio com
http://lists.imendio.com/mailman/listinfo/planner-dev


<?xml version="1.0"?>
<project name="Task Cost Test Cases" company="" manager="" phase="" project-start="20040418T000000Z" mrproject-version="2" calendar="1">
  <properties>
    <property name="cost" type="cost" owner="resource" label="Cost" description="standard cost for a resource"/>
  </properties>
  <phases/>
  <calendars>
    <day-types>
      <day-type id="0" name="Working" description="A default working day"/>
      <day-type id="1" name="Nonworking" description="A default non working day"/>
      <day-type id="2" name="Use base" description="Use day from base calendar"/>
    </day-types>
    <calendar id="1" name="Default">
      <default-week mon="0" tue="0" wed="0" thu="0" fri="0" sat="1" sun="1"/>
      <overridden-day-types>
        <overridden-day-type id="0">
          <interval start="0800" end="1200"/>
          <interval start="1300" end="1700"/>
        </overridden-day-type>
      </overridden-day-types>
      <days/>
    </calendar>
  </calendars>
  <tasks>
    <task id="1" name="TEST1" note="" work="28800" start="20040418T000000Z" end="20040419T170000Z" percent-complete="0" priority="0" type="normal" scheduling="fixed-work">
      <task id="2" name="T1-TASK1" note="Duration should be 1.0 Day,&#10;Overall cost should be 100." work="28800" start="20040418T000000Z" end="20040419T170000Z" percent-complete="0" priority="0" type="normal" scheduling="fixed-work"/>
    </task>
    <task id="3" name="TEST2" note="" work="57600" start="20040418T000000Z" end="20040420T170000Z" percent-complete="0" priority="0" type="normal" scheduling="fixed-work">
      <task id="4" name="T2-TASK1" note="Duration should be 2 Days,&#10;Overall cost should be 100." work="28800" start="20040418T000000Z" end="20040420T170000Z" percent-complete="0" priority="0" type="normal" scheduling="fixed-work"/>
    </task>
    <task id="5" name="TEST3" note="" work="28800" start="20040418T000000Z" end="20040419T170000Z" percent-complete="0" priority="0" type="normal" scheduling="fixed-work">
      <task id="6" name="T3-TASK1" note="Duration Should be 1 Days,&#10;Overall cost should be 200." work="57600" start="20040418T000000Z" end="20040419T170000Z" percent-complete="0" priority="0" type="normal" scheduling="fixed-work"/>
    </task>
    <task id="7" name="TEST4" note="" work="28800" start="20040418T000000Z" end="20040419T170000Z" percent-complete="0" priority="0" type="normal" scheduling="fixed-work">
      <task id="8" name="T4-TASK1" note="Duration Should be 1 day,&#10;Overall cost should be 200." work="57600" start="20040418T000000Z" end="20040419T170000Z" percent-complete="0" priority="0" type="normal" scheduling="fixed-work"/>
    </task>
    <task id="9" name="TEST5" note="" work="57600" start="20040418T000000Z" end="20040420T170000Z" percent-complete="0" priority="0" type="normal" scheduling="fixed-work">
      <task id="10" name="T5-TASK1" note="Duration should be 2 days,&#10;Overal cost should be 300." work="86400" start="20040418T000000Z" end="20040420T170000Z" percent-complete="0" priority="0" type="normal" scheduling="fixed-work"/>
    </task>
    <task id="11" name="TEST6" note="" work="57600" start="20040418T000000Z" end="20040420T170000Z" percent-complete="0" priority="0" type="normal" scheduling="fixed-work">
      <task id="12" name="T6-TASK1" note="Duration should be 2 Days,&#10;Overall cost should be 400." work="86400" start="20040418T000000Z" end="20040420T170000Z" percent-complete="0" priority="0" type="normal" scheduling="fixed-work"/>
    </task>
  </tasks>
  <resource-groups/>
  <resources>
    <resource id="1" name="R3-25" short-name="" type="1" units="0" email="" note="" std-rate="25">
      <properties>
        <property name="cost" value=""/>
      </properties>
    </resource>
    <resource id="2" name="R2-12.5" short-name="" type="1" units="0" email="" note="" std-rate="12.5">
      <properties>
        <property name="cost" value=""/>
      </properties>
    </resource>
    <resource id="3" name="R1-12.5" short-name="" type="1" units="0" email="" note="" std-rate="12.5">
      <properties>
        <property name="cost" value=""/>
      </properties>
    </resource>
  </resources>
  <allocations>
    <allocation task-id="12" resource-id="1" units="50"/>
    <allocation task-id="10" resource-id="2" units="50"/>
    <allocation task-id="8" resource-id="2" units="100"/>
    <allocation task-id="12" resource-id="3" units="100"/>
    <allocation task-id="10" resource-id="3" units="100"/>
    <allocation task-id="8" resource-id="3" units="100"/>
    <allocation task-id="6" resource-id="3" units="200"/>
    <allocation task-id="4" resource-id="3" units="50"/>
    <allocation task-id="2" resource-id="3" units="100"/>
  </allocations>
</project>


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