github.com/hzck/speedroute@v0.0.0-20201115191102-403b7d0e443f/algorithm/tests/rewards/minus_rewards_quantity.json (about) 1 { 2 "name": "Minus rewards quantity", 3 "description": "A minus reward reduces the amount blocking a later shorter path.", 4 "testing": "Minus rewards taking into account and reducing total quantity.", 5 "visual": "START->1, 1->2, 1->END, 2->END", 6 "rewards": [ 7 { 8 "id": "A" 9 } 10 ], 11 "nodes": [ 12 { 13 "id": "START", 14 "rewards": [ 15 { 16 "rewardId": "A", 17 "quantity": 3 18 } 19 ] 20 }, 21 { 22 "id": "END" 23 }, 24 { 25 "id": "1", 26 "rewards": [ 27 { 28 "rewardId": "A", 29 "quantity": -2 30 } 31 ] 32 }, 33 { 34 "id": "2" 35 } 36 ], 37 "edges": [ 38 { 39 "from": "START", 40 "to": "1" 41 }, 42 { 43 "from": "1", 44 "to": "2", 45 "weights": [ 46 { 47 "requirements": [ 48 { 49 "rewardId": "A", 50 "quantity": 1 51 } 52 ] 53 } 54 ] 55 }, 56 { 57 "from": "1", 58 "to": "END", 59 "weights": [ 60 { 61 "requirements": [ 62 { 63 "rewardId": "A", 64 "quantity": 3 65 } 66 ] 67 } 68 ] 69 }, 70 { 71 "from": "2", 72 "to": "END" 73 } 74 ], 75 "startId": "START", 76 "endId": "END" 77 }