With that said, indeed you may try capacity constraints as a workaround (not tested). Give the 2p-cars high capacity (e.g. 20) and the 1p-cars low capacity (e.g. 1). For each 2p-delivery set the demand to 2 and for the 1p-delivery to 0. This way 2p-deliveries will fit the 2p-car only, while the 1p-deliveries will fit both.
To use capacities in API v2:
Set the number of rounds in the parameters, and the capacities for each round as a string seperated by spaces, e.g. 'parameters'=>'{"rounds":"5","capacities":"20 20 20 1 1"}'
Set demand for each location, e.g. "restrictions":{"demand":"2"}
We thought that it worked but it seems to be a coincidence. After testing with real data and the parameters as described above we get "2 person’ location all over the place, so at the 2 and 1 person locations.
two issues:
that isnt to bad although it would be nice as as much as possible the demands with 0 would be assigned to the capacity 1 routes.
the biggest problem, the demand seems not to work because also addresses with demand ‘2’ are assigned to the route with a capacity of 1.