How to set cost per duration of a Service

Sorry if I may sound a little unknowledgeable; for all I know there is an easy fix for this.
I’ve only been playing with jsprit for a few weeks, and had a quick question:

If I define a service as such:

        <service id="51" type="services">
            <locationId>51</locationId>
            <coord x="35.66878024" y="-97.00010672"/>
            <capacity-demand>0</capacity-demand>
            <duration>1386</duration>
            <priority>1</priority>
            <timeWindows>
                <timeWindow>
                    <start>0</start>
                    <end>1.7976931348623157E308</end>
                </timeWindow>
            </timeWindows>
        </service>

and a Vehicle type as such:

    <type>
        <id>Bill_type</id>
        <capacity>99999</capacity>
        <costs>
            <fixed>1</fixed>
            <distance>0.3</distance>
            <time>0.005</time>
        </costs>
    </type>

How do I implement a cost(0.005) per duration (1386)

From what I can tell the time cost defined in the vehicle type only considers travel time.

Any help would be greatly appreciated!

cost per service time is set via costs.service

Awesome! I completely overlooked that cost due to the if haha

Last question: is there an easy way I can set speed of vehicles, timeUnit, and the distanceUnit?

Just to convert distance to times so my worker’s stay within my timeSchedule; currently they depart and arrive at jobs at the same time:

+--------------------------------------------------------------------------------------------------------------------------------+
| detailed solution                                                                                                              |
+---------+----------------------+-----------------------+-----------------+-----------------+-----------------+-----------------+
| route   | vehicle              | activity              | job             | arrTime         | endTime         | costs           |
+---------+----------------------+-----------------------+-----------------+-----------------+-----------------+-----------------+
| 1       | Bill                 | start                 | -               | undef           | 0               | 0               |
| 1       | Bill                 | service               | 396             | 0               | 1690            | 9               |
| 1       | Bill                 | service               | 138             | 1690            | 2685            | 14              |
| 1       | Bill                 | service               | 411             | 2685            | 3571            | 18              |
| 1       | Bill                 | service               | 226             | 3571            | 4661            | 24              |

Ahhh, I’m using the Geographic coordinate system for my locations, do I need to specify that I am doing so somewhere?