I have done this model calculating least cost path

enter image description here

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.
  • Just an idea, try duplicating your test dataset into two datasets, origins and destinations and giving them different Id ranges? – Hornbydd Apr 15 '17 at 8:48
  • I tried another aproach- first: make a copy and run it as original points=start,copied file=destination and second to do it with one sample of data. It´s working, but there´s a useless calculation when one point is used as start and also as destination. I just wanted to remove this aesthetic "fail". – Juraj Sida Apr 16 '17 at 18:51
  • It sounds like your question is either no longer reproducible or it has changed. In any event, if you still have a question, please edit it to revise it with what you have most recently tried and where you are stuck. – PolyGeo Apr 29 '17 at 6:45