1

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.

closed as off-topic by PolyGeo Apr 29 '17 at 6:45

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This problem cannot or can no longer be reproduced. Changes to the system or to the asker's circumstances may have rendered the question obsolete, or the question does not include a procedure to enable potential answerers to reproduce the same symptoms. Such questions are off-topic as they are unlikely to help future readers, but editing them to include more details can lead to re-opening." – PolyGeo
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 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