Difference between AVOID and FORBID

Deals with generic topics such as logging, framework and so on. If you are not sure where to place your topic just put it here.
Post Reply
User avatar
Bernd Welter
Site Admin
Posts: 2572
Joined: Mon Apr 14, 2014 10:28 am
Contact:

Difference between AVOID and FORBID

Post by Bernd Welter »

Hello together,

today I discussed the difference between AVOID segments and FORBID segments with a customer. His application will show a checkbox labeled as "AVOID FERRIES" and he wants to know how to match the checkbox state to parameter values.
Well, a close look at the API offers at least the following matchings (C# syntax):
  • string AVOID_FERRIES = (checkbox.checked) ? ("BAN"):("0");
    with this approach the checkbox will definetly cause detours and the black/white "a ferry won't ever appear in the result" whenever the the box is checked. Worst case: if start and destination are located on two different islands and the only connection is a ferry, the checked box will cause an error because the given task is not possible to be solved.
  • string AVOID_FERRIES = (checkbox.checked) ? "2500" : "0";
    With this approach routings will usually return ferry-free results but under some special conditions (see the 2islands from above or the next bridge crossing the river is very far away) a ferry may appear in the result. This parametrizing pattern is not strictly black/white and is therefore more flexible.
In the end the customer has to enable himself for the understanding of the scenarios. And then he has to decide what he wants.

Best regards Bernd
Post Reply