Hello <br><br>I compile and running pgrouting darp branch on my ubuntu linux. I download Openvrp demos too.<br><br>I have some problems integrating openvrp and darp functions.<br><br> I have problems with some params: depot_id, depot_position_id and penalty query for darp function. I don´t understand depot_position_id .<br>
<br>Can send me some samples to integrate openvrp and darp branch?<br><br>darp function signature:<br><pre><div><span>CREATE</span> <span>OR</span> <span>REPLACE</span> <span>FUNCTION</span> <span>darp</span><span>(</span><span>orders_sql</span> <span>text</span><span>,</span> <span>vehicles_sql</span> <span>text</span><span>,</span> <span>distance_sql</span> <span>text</span><span>,</span> <span>depot_id</span> <span>integer</span><span>,</span> <span>depot_point_id</span> <span>integer</span><span>,</span> <span>penalties_sql</span> <span>text</span><span>)</span></div>
<div> <span>RETURNS</span> <span>SETOF</span> <span>itinerary</span></div><div> <span>AS</span> <span>'$libdir/librouting_darp'</span></div>
<div> <span>LANGUAGE</span> <span>'C'</span> <span>IMMUTABLE</span> <span>STRICT</span><span>;<br><br></span>openvrp call to darp function on darp.php file:<br>
function calculate()<br> {<br> $data = array(<br> 'depot_id' => $this->input->post('depot_id')<div class="im">,<br> 'nearest' => $this->input->post('nearest'),<br>
'method' => $this->input->post('method')<br> );<br><br> $sql = "SELECT b.*, <a href="http://a.id/" target="_blank">a.id</a>, a.order_id, vehicle_id,pick_up, to_char(at, 'YYYY-MM-DD HH24:MI:SS'::text) AS at<br>
FROM darp(<br> 'SELECT * FROM darp_orders WHERE depot_id IN (0,".$data['depot_id'].")',<br> 'SELECT * FROM darp_vehicles WHERE depot_id = ".$data['depot_id']."',<br>
'".$distance = $this->_getdistances($data)."',<br>
) a LEFT JOIN (SELECT * FROM
darp_report WHERE depot_id IN (0,".$data['depot_id'].")) AS b ON
(a.order_id = <a href="http://b.id/" target="_blank">b.id</a>);";<br>
$query = $this->db->query($sql);<br> $this->output->set_output($this->_encode($query));<br> }<br><br><br>
</div><br>Thank's in advance<br></div></pre><br>