{"_id":"59bb001761b4fa001ae2eda1","project":"546559525871e90800f503c0","initVersion":{"_id":"59bafaef61b4fa001ae2ed63","version":"1.7.0"},"user":{"_id":"5465590bf42a472000b0c6b7","username":"","name":"Marc Kuo"},"__v":7,"createdAt":"2017-09-14T22:17:59.886Z","changelog":[{"_id":"59bb001761b4fa001ae2eda3","update":"Support for `load` and `capacity` as an object","type":"added"},{"_id":"59bb001761b4fa001ae2eda2","update":"","type":"added"}],"body":"[block:callout]\n{\n  \"type\": \"success\",\n  \"title\": \"Multiple Loads and Capacites\",\n  \"body\": \"You may also specify multiple load parameters if you provide an object. This is useful if you define your load across multiple dimensions, for example weight and volume:\\n\\n```\\n\\\"load\\\": { \\n  \\\"weight\\\": 10,\\n  \\\"volume\\\": 200\\n}\\n```\\n\\nThe entire load has to fit in the remaining vehicle capacity for it to be assigned. Now you can distinguish heavy goods that are small from large goods that are light :)\\n\\nAnother way to use multiple loads is to specify product-level details:\\n\\n```\\n\\\"load\\\": {\\n  \\\"large_item\\\": 1,\\n  \\\"small_item\\\": 5,\\n  \\\"other_stuff\\\": 2\\n}\\n```\\n\\nNote that if you specify multiple loads, these loads need to correspond with the `capacity` parameter in the vehicle object. If not, they will be unserved with the message `\\\"The loads cannot fit in any vehicle.\\\"`\"\n}\n[/block]","slug":"v170-multiple-capacities","title":"v1.7.0 - Multiple Capacities"}

v1.7.0 - Multiple Capacities


[block:callout] { "type": "success", "title": "Multiple Loads and Capacites", "body": "You may also specify multiple load parameters if you provide an object. This is useful if you define your load across multiple dimensions, for example weight and volume:\n\n```\n\"load\": { \n \"weight\": 10,\n \"volume\": 200\n}\n```\n\nThe entire load has to fit in the remaining vehicle capacity for it to be assigned. Now you can distinguish heavy goods that are small from large goods that are light :)\n\nAnother way to use multiple loads is to specify product-level details:\n\n```\n\"load\": {\n \"large_item\": 1,\n \"small_item\": 5,\n \"other_stuff\": 2\n}\n```\n\nNote that if you specify multiple loads, these loads need to correspond with the `capacity` parameter in the vehicle object. If not, they will be unserved with the message `\"The loads cannot fit in any vehicle.\"`" } [/block]
added
Support for `load` and `capacity` as an object