# combine positive and negative costs

552
3
05-30-2013 06:30 AM
New Contributor
Dear GIS experts,

I have a serious problem doing my network analysis and have no idea anymore how to solve it. I would be really glad if someone had an idea how to solve it!!!

My issue: I want to build a service area layer and I have to combine two costs. When building it, only one can be added as an impedance attribute. I saw that when building an network dataset, you can combine costs via scripting, but my problem is, that I have two positive fields for postive and negativ costs. I would have to sum up positive costs and reduce negative ones. As I read, negative costs are registered as restrictions, so I am searching for an alternative, but found nothing on the internet or in a forum.
So does someone have an idea?

I thought about starting with an initial ammount eg. 100 and reduce it when there are positive costs, eg. -10, or add negative costs again, eg. + 10. This would be the same for me as starting with 0 and add positive costs or reduce negative ones until 100. Is this possible?

Thank you so much,

geonika
Tags (2)
3 Replies
Esri Regular Contributor
It is hard to provide an answer without context on what these costs mean and what they will be used for. E.g., what is a negative cost? What should a solver do with it?
Note that in Network Analyst, costs, really impedance, is minimized when finding a path or to restrict how far a service area will extend to.

Jay Sandhu
New Contributor
True, some context would be helpful 😉

I've got a bike, bicycling on the paths up and down some hills. For bicycling up I've got positive costs like +10 of some unit, while going down the hill I've got negative costs like -10. The problem is, that network analyst thinks that negative costs are restrictions, therefore I devided the costs into two cost-fields called 'positive costs' and 'negative costs', so both fields are actually postive, like both have the value +10. This is what I already have.

Next step I want to do is to tell network analyst, that there is a value of 100 of the same unit at the beginning of travelling, which is the location home. So when the analysis starts, I want, that when the bike goes up a hill, the positive costs will be reduced of that value, while bicycling down the hill the negative costs will be added to that value.
Is there any chance to model this and if yes, how?

By the way, writing costs I mean impedance.