Dear Mizux, please see my issues in green color.
1). how to program the model to allow each truck fully loaded before leaving the depot (if there is enough goods for FTL).
First don't force `start cumul to zero` upon creation of the load dimension i.e. set it to False.
you mean "routing.AddDimensionWithVehicleCapacity()"?
you could also add a constraint to force the CumulVar of the routing.Start(vehicle_index) to be equal to the vehicle capacity
I could not find the method called "routing.Start(vehicle_index)" in routing.h. could you please privide a simple code example? Also, if we force the "CumulVar" to be eual to vehicle capacity, does it mean every vehicle must be full before leaving the depot. However, there are only a limited volume of goods for deliery. There constraint seems to be conflicted with the reality.
2) how to configure the model to search for the right type and number of trucks and accordingly the routes.
you can add a vehicle Fixed Cost and use a arc cost evaluator per vehicle type to better model the actual cost, then using the LNS to improve the solution to minimize your cost model.
you mean select the GuidedLocalSearch option to compute the solution?
3). how to enbale arbitary end after trucks visiting the last node. Truck will not be forced to return to the depot.
simply make arc cost from any points to the "end" depot being zero in your arc cost evaluator matrix or callback.
The problem is I have no idea how to tell model the end node for each truck. Do I make a dummy "depot" as the end node and make it 0 distance to any other real nodes?
Also, how to make deduction of vehicle loads delivered after visiting each customer nodes, is this opposite to the pickup model?