{"_id":"56a974842bb3910d000ee93a","user":"56a83a6070a9440d00ef5ef8","__v":17,"category":{"_id":"56a96de8f834950d0037b35a","__v":2,"pages":["56a96dfd8791090d00113bac","56a974842bb3910d000ee93a"],"version":"56a83b989ec7660d002e07c1","project":"56a83b979ec7660d002e07be","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-01-28T01:24:56.870Z","from_sync":false,"order":2,"slug":"configuration","title":"Configuration"},"project":"56a83b979ec7660d002e07be","parentDoc":null,"version":{"_id":"56a83b989ec7660d002e07c1","project":"56a83b979ec7660d002e07be","__v":9,"createdAt":"2016-01-27T03:38:00.333Z","releaseDate":"2016-01-27T03:38:00.333Z","categories":["56a83b989ec7660d002e07c2","56a83c282036420d002d21e1","56a96de8f834950d0037b35a","56a9706013a69a0d00a778c3","56a970ec2d8fd90d0036eec7","56a971a62bb3910d000ee934","56a973372d8fd90d0036eece","56a978dc2bb3910d000ee93f","571d5ae118b3c10e003e55cd"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"Beta","version_clean":"1.0.0","version":"1.0"},"githubsync":"","updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-01-28T01:53:08.725Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"settings":"","results":{"codes":[]},"auth":"required","params":[],"url":""},"isReference":false,"order":0,"body":"<div class=\"corner-ribbon top-left sticky blue\"><a style=\"color: white;\" href=\"https://pathfinder.readme.io/blog/pathfinder-now-in-public-beta\">Public Beta!</a></div>\n\nPathfinder computes routes based on capacities and [objective functions](doc:objective-function-dsl). This document describes how to configure capacities and parameters for objective functions and the motivation behind them.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Capacities\"\n}\n[/block]\nAll real world logistics application are constrained by limitations, be it the size of vehicles, city ordinances or other business logic. Pathfinder models these limitations in a simple way, a vector of quantities that cannot be exceeded per transport at any point during a route. Every commodity has a corresponding vector that is added to the transports vector for the route segment during which the transport is transporting the commodity.\n\nOn the Pathfinder dashboard you need to specify string keys for the capacities your app will use. At runtime in your application, you will pass the SDK a Map / JSON object of metadata. Pathfinder expects your capacities to be set in the top level of that object. If the values are not specified in the metadata object, Pathfinder will assume a value of Integer.MAX_VALUE for transports and 0 for commodities.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Parameters\"\n}\n[/block]\nBy default, Pathfinder attempts to find minimal distance routes, as that is a typical use case of a logistics application. However, it may be the case that your application is more concerned with maximizing or minimizing a value different than distance. For this, Pathfinder exposes an [Objective Function DSL](doc:objective-function-dsl).\n\nThe objective function DSL is allowed to access parameters set in the metadata passed to the SDK at runtime, however the parameters must be specified on the Dashboard ahead of time. Just as for capacities, the parameters that are specified are looked for in the top level of the metadata JSON object consumed by the SDK. If the values are not specified, Pathfinder will assume a value of 0 for both transports and commodities.","excerpt":"","slug":"capacities-and-parameters","type":"basic","title":"Capacities and Parameters"}

Capacities and Parameters


<div class="corner-ribbon top-left sticky blue"><a style="color: white;" href="https://pathfinder.readme.io/blog/pathfinder-now-in-public-beta">Public Beta!</a></div> Pathfinder computes routes based on capacities and [objective functions](doc:objective-function-dsl). This document describes how to configure capacities and parameters for objective functions and the motivation behind them. [block:api-header] { "type": "basic", "title": "Capacities" } [/block] All real world logistics application are constrained by limitations, be it the size of vehicles, city ordinances or other business logic. Pathfinder models these limitations in a simple way, a vector of quantities that cannot be exceeded per transport at any point during a route. Every commodity has a corresponding vector that is added to the transports vector for the route segment during which the transport is transporting the commodity. On the Pathfinder dashboard you need to specify string keys for the capacities your app will use. At runtime in your application, you will pass the SDK a Map / JSON object of metadata. Pathfinder expects your capacities to be set in the top level of that object. If the values are not specified in the metadata object, Pathfinder will assume a value of Integer.MAX_VALUE for transports and 0 for commodities. [block:api-header] { "type": "basic", "title": "Parameters" } [/block] By default, Pathfinder attempts to find minimal distance routes, as that is a typical use case of a logistics application. However, it may be the case that your application is more concerned with maximizing or minimizing a value different than distance. For this, Pathfinder exposes an [Objective Function DSL](doc:objective-function-dsl). The objective function DSL is allowed to access parameters set in the metadata passed to the SDK at runtime, however the parameters must be specified on the Dashboard ahead of time. Just as for capacities, the parameters that are specified are looked for in the top level of the metadata JSON object consumed by the SDK. If the values are not specified, Pathfinder will assume a value of 0 for both transports and commodities.