I have done this model calculating least cost path
I'm using "Test input" as set of points with ID as start and also end points. When least cost path is calculated(Cost path tool), it can't use the destination point as start point. Example of correct combination of Start(S)- Destination point(D): S1-D2;S1-D3; S1-D4; S2-D1; S2-D3; S2-D4; S3-D1 etc. I don't know how to write script for Calculate value (I don't know python). It should work like this:
- IF input_point ID (for destination, in submodel) = input_point ID (in main model)
- then use input_point ID+1
- else use input_point ID.