I am wondering if it is possible in ArcGIS 10.3 to customize the location-allocation network analyst or use other tools to find the location of a facility which minimize the costs and not the distances?

In other words, instead of minimizing the sum of the weighted transport distances from candidate facilities to the demands to find the best location(s), I would like to:

  1. associate a cost to each demand (different between the demands)
  2. associate a cost to the facilities (different between the facilities)
  3. associate a cost which is a function of the distance between them
  4. find the location which give me the minimum of the sum of the cost.