Giter Club home page Giter Club logo

mapc2017-pucrs's People

Contributors

rafaelcaue avatar tabajarakrausburg avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mapc2017-pucrs's Issues

Improve task allocation

Try to reduce work load when possible.
This can be done by the initiator, we do not need to reallocate.
He knows who will win, and he knows the step estimate of all agents.

There are a few ways to improve this, but most of the times, trucks will be the only agents who can get the job done, it will not be possible to allocate their tasks to other agents.

A few noActions are being sent

Sometimes a noAction will be sent, but it doesn't affect our strategies too much.
I suspect that it has something to do with the free perceptions.

Item starvation

We have to consider item quantity in shops while bidding for a task.
Not sure how to prioritise though.

Artifact not available

[vehicle6] Doing action skip at step 86
[vehicle6] Could not finish intention: intention 4814:
+winner([item(item8,2)],assist(storage4,vehicle23,job13))[source(vehicle1)] <- ... org::focus(SchArtId)[wid(OrgId)]; .print("I won the tasks(",JobId,") ",TaskList); org::commitMission(massist)[artifact_id(SchArtId)] / {OrgId=cobj_2, Storage=storage4, Assembler=vehicle23, SchArtId=cobj_9, JobId=job13, TaskList=[item(item8,2)]}
Trigger: +winner([item(item8,2)],assist(storage4,vehicle23,job13))[code(org::focus(cobj_9)[wid(cobj_2)]),code_line(82),code_src("/home/tabajara/git/mapc2017-pucrs/src/agt/strategies/bidder.asl"),error(action_failed),error_msg("Artifact Not Available."),source(vehicle1)]
[vehicle6] >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> I have done 1 noActions.
[vehicle6] >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> I have done 2 noActions.

image

Not storing item

[vehicle1] Registering...
[vehicle1] Doing action skip at step 0
[vehicle1] Doing action skip at step 1
[vehicle1] Doing action skip at step 2
[vehicle1] Doing action skip at step 3
[vehicle1] Doing action skip at step 4
[vehicle1] Doing action skip at step 5
[vehicle1] Doing action skip at step 6
[vehicle1] Doing action skip at step 7
[vehicle1] Doing action skip at step 8
[vehicle1] Doing action skip at step 9
[vehicle1] Doing action skip at step 10
[vehicle1] Doing action skip at step 11
[vehicle1] Doing action skip at step 12
[vehicle1] Doing action skip at step 13
[vehicle1] Doing action skip at step 14
[vehicle1] Doing action skip at step 15
[vehicle1] Doing action skip at step 16
[vehicle1] Doing action skip at step 17
[vehicle1] Doing action skip at step 18
[vehicle1] Doing action skip at step 19
[vehicle1] Doing action skip at step 20
[vehicle1] New job job2 deliver to storage7 for 3005 starting at 21 to 208
[vehicle1] Items required: [required(item13,1),required(item15,1),required(item14,1),required(item12,1)]
[vehicle1] Estimated cost 2149.4 reward 3005
[vehicle1] Estimate 65 < 187
[vehicle1] Received all bids job2
[vehicle1] For job2
[vehicle1] vehicle7 will assist and do [item(item7,3),item(item6,1)]
[vehicle1] vehicle6 will assist and do [item(item8,2)]
[vehicle1] vehicle24 will assist and do [tool(tool0),item(item9,2)]
[vehicle1] vehicle13 will assist and do [item(item6,3),item(item1,1)]
[vehicle1] vehicle14 will assist and do [item(item3,2),item(item2,1)]
[vehicle1] vehicle19 will assist and do [item(item6,1),item(item7,6)]
[vehicle1] vehicle10 will assist and do [tool(tool6),item(item1,2)]
[vehicle1] vehicle4 will assist and do [tool(tool7)]
[vehicle1] vehicle26 will assemble and do [required(item13,1),required(item15,1),required(item14,1),required(item12,1)]
[vehicle1] ****** I want to perform action skip
[vehicle1] Doing action skip at step 21
[vehicle1] Task allocation is done job2
[vehicle1] Doing action skip at step 22
[vehicle1] New job job3 deliver to storage6 for 5437 starting at 23 to 274
[vehicle1] Items required: [required(item11,1),required(item20,1)]
[vehicle1] Estimated cost 3576.1000000000004 reward 5437
[vehicle1] Estimate 120 < 251
[vehicle1] Received all bids job3
[vehicle1] For job3
[vehicle1] vehicle23 will assist and do [item(item7,9),item(item7,3),item(item5,3)]
[vehicle1] vehicle20 will assist and do [tool(tool6),item(item5,3),item(item3,2)]
[vehicle1] vehicle21 will assist and do [tool(tool7),item(item6,3),item(item1,3),item(item6,3)]
[vehicle1] vehicle12 will assist and do [item(item7,3)]
[vehicle1] vehicle1 will assist and do [tool(tool2)]
[vehicle1] vehicle2 will assist and do [tool(tool5)]
[vehicle1] vehicle25 will assist and do [tool(tool3)]
[vehicle1] vehicle3 will assist and do [tool(tool1)]
[vehicle1] vehicle27 will assemble and do [required(item11,1),required(item20,1)]
[vehicle1] ****** I want to perform action skip
[vehicle1] Doing action skip at step 23
[vehicle1] Task allocation is done job3
[vehicle1] I won the tasks(job3) [tool(tool2)]
[vehicle1] Doing action goto(shop4) at step 24
[vehicle1] Doing action continue at step 25
[vehicle1] Doing action continue at step 26
[vehicle1] Doing action continue at step 27
[vehicle1] Doing action buy(tool2,1) at step 28
[vehicle1] Doing action goto(workshop2) at step 29
[vehicle1] Doing action continue at step 30
[vehicle1] Doing action skip at step 31
[vehicle1] Doing action skip at step 32
[vehicle1] Doing action skip at step 33
[vehicle1] Doing action skip at step 34
[vehicle1] Doing action skip at step 35
[vehicle1] Doing action skip at step 36
[vehicle1] New job job5 deliver to storage4 for 2432 starting at 37 to 156
[vehicle1] Items required: [required(item13,11)]
[vehicle1] Estimated cost 376.20000000000005 reward 2432
[vehicle1] Estimate 114 < 119
[vehicle1] Received all bids job5
[vehicle1] For job5
[vehicle1] vehicle22 will assist and do [tool(tool7),item(item6,11)]
[vehicle1] vehicle17 will assist and do [tool(tool6)]
[vehicle1] vehicle28 will assemble and do [required(item13,11)]
[vehicle1] ****** I want to perform action skip
[vehicle1] Doing action skip at step 37
[vehicle1] Task allocation is done job5
[vehicle1] Doing action skip at step 38
[vehicle1] Doing action skip at step 39
[vehicle1] Ignoring job job6
[vehicle1] Doing action skip at step 40
[vehicle1] Doing action skip at step 41
[vehicle1] Ignoring mission job7 for now.
[vehicle1] Doing action skip at step 42
[vehicle1] Doing action skip at step 43
[vehicle1] Doing action skip at step 44
[vehicle1] Doing action skip at step 45
[vehicle1] Doing action skip at step 46
[vehicle1] Doing action skip at step 47
[vehicle1] Doing action skip at step 48
[vehicle1] Doing action skip at step 49
[vehicle1] Doing action skip at step 50
[vehicle1] Doing action skip at step 51
[vehicle1] Doing action skip at step 52
[vehicle1] Doing action skip at step 53
[vehicle1] Doing action skip at step 54
[vehicle1] Ignoring job job9
[vehicle1] Doing action skip at step 55
[vehicle1] Doing action skip at step 56
[vehicle1] Doing action skip at step 57
[vehicle1] Doing action skip at step 58
[vehicle1] Doing action skip at step 59
[vehicle1] Doing action skip at step 60
[vehicle1] Doing action skip at step 61
[vehicle1] Doing action skip at step 62
[vehicle1] Doing action skip at step 63
[vehicle1] Doing action skip at step 64
[vehicle1] Doing action skip at step 65
[vehicle1] Doing action skip at step 66
[vehicle1] Doing action skip at step 67
[vehicle1] Doing action skip at step 68
[vehicle1] Doing action skip at step 69
[vehicle1] Doing action skip at step 70
[vehicle1] Doing action skip at step 71
[vehicle1] Doing action skip at step 72
[vehicle1] Doing action skip at step 73
[vehicle1] Doing action skip at step 74
[vehicle1] Doing action skip at step 75
[vehicle1] Doing action skip at step 76
[vehicle1] Doing action skip at step 77
[vehicle1] Doing action skip at step 78
[vehicle1] Doing action assist_assemble("agentA27") at step 79
[vehicle1] Doing action assist_assemble("agentA27") at step 80
[vehicle1] Doing action assist_assemble("agentA27") at step 81
[vehicle1] Doing action assist_assemble("agentA27") at step 82
[vehicle1] Doing action assist_assemble("agentA27") at step 83
[vehicle1] Doing action assist_assemble("agentA27") at step 84
[vehicle1] Received all bids job7
[vehicle1] Unable to allocate tool tool7
[vehicle1] Impossible job job7, aborting it.
[vehicle1] Task allocation is done job7
[vehicle1] Doing action assist_assemble("agentA27") at step 85
[vehicle1] Doing action assist_assemble("agentA27") at step 86
[vehicle1] Received all bids job7
[vehicle1] For job7
[vehicle1] vehicle26 will assist and do [tool(tool7),item(item7,9),item(item7,3)]
[vehicle1] vehicle18 will assist and do [item(item3,2)]
[vehicle1] vehicle11 will assist and do [item(item1,3)]
[vehicle1] vehicle6 will assist and do [item(item6,1)]
[vehicle1] vehicle16 will assist and do [item(item9,2),item(item7,3),item(item8,2)]
[vehicle1] vehicle7 will assist and do [item(item1,1)]
[vehicle1] vehicle4 will assist and do [tool(tool2)]
[vehicle1] vehicle24 will assemble and do [required(item10,1),required(item12,1),required(item18,1)]
[vehicle1] Task allocation is done job7
[vehicle1] Doing action assist_assemble("agentA27") at step 87
[vehicle1] Doing action assist_assemble("agentA27") at step 88
[vehicle1] Doing action assist_assemble("agentA27") at step 89
[vehicle1] Doing action goto(storage5) at step 90
[vehicle1] Doing action continue at step 91
[vehicle1] Doing action continue at step 92
[vehicle1] New job job14 deliver to storage2 for 5725 starting at 93 to 299
[vehicle1] Items required: [required(item15,1),required(item18,1),required(item17,1)]
[vehicle1] Job job14 failed evaluation, ignoring it.
[vehicle1] ****** I want to perform action store(tool2,1)
[vehicle1] Doing action store(tool2,1) at step 93
[vehicle1] Doing action skip at step 94
[vehicle1] Doing action skip at step 95
[vehicle1] Doing action skip at step 96
[vehicle1] Doing action skip at step 97
[vehicle1] Doing action skip at step 98
[vehicle1] Doing action skip at step 99
[vehicle1] Doing action skip at step 100
[vehicle1] Doing action skip at step 101
[vehicle1] Doing action skip at step 102
[vehicle1] Doing action skip at step 103
[vehicle1] Doing action skip at step 104
[vehicle1] Doing action skip at step 105
[vehicle1] Doing action skip at step 106
[vehicle1] Doing action skip at step 107
[vehicle1] Doing action skip at step 108
[vehicle1] Doing action skip at step 109
[vehicle1] New job job17 deliver to storage0 for 3978 starting at 110 to 343
[vehicle1] Items required: [required(item14,1),required(item10,1),required(item12,1),required(item17,1)]
[vehicle1] Estimated cost 2281.4 reward 3978
[vehicle1] Estimate 71 < 233
[vehicle1] Received all bids job17
[vehicle1] For job17
[vehicle1] vehicle8 will assist and do [item(item6,1),item(item6,2)]
[vehicle1] vehicle15 will assist and do [item(item8,4)]
[vehicle1] vehicle5 will assist and do [item(item8,2),item(item9,2),item(item9,1),item(item9,4)]
[vehicle1] vehicle10 will assist and do [item(item8,2)]
[vehicle1] vehicle14 will assist and do [item(item2,1),item(item1,1),item(item7,3)]
[vehicle1] vehicle19 will assist and do [item(item1,1)]
[vehicle1] vehicle12 will assist and do [item(item7,3)]
[vehicle1] vehicle25 will assemble and do [required(item14,1),required(item10,1),required(item12,1),required(item17,1)]
[vehicle1] ****** I want to perform action skip
[vehicle1] Doing action skip at step 110
[vehicle1] Task allocation is done job17
[vehicle1] Doing action skip at step 111
[vehicle1] Doing action skip at step 112
[vehicle1] Doing action skip at step 113
[vehicle1] Doing action skip at step 114
[vehicle1] Doing action skip at step 115
[vehicle1] Doing action skip at step 116
[vehicle1] Doing action skip at step 117
[vehicle1] New job job19 deliver to storage1 for 5333 starting at 118 to 478
[vehicle1] Items required: [required(item14,1),required(item17,1),required(item16,1)]
[vehicle1] Estimated cost 3422.1000000000004 reward 5333
[vehicle1] Estimate 59 < 360
[vehicle1] Received all bids job19
[vehicle1] For job19
[vehicle1] vehicle27 will assist and do [item(item8,2),item(item8,4),item(item6,2),item(item6,6),item(item5,6),item(item7,6)]
[vehicle1] vehicle9 will assist and do [item(item7,3),item(item9,4)]
[vehicle1] vehicle1 will assist and do [item(item9,1)]
[vehicle1] vehicle13 will assist and do [item(item2,1),item(item1,1)]
[vehicle1] vehicle3 will assist and do [tool(tool5)]
[vehicle1] vehicle2 will assist and do [tool(tool1)]
[vehicle1] vehicle22 will assist and do [tool(tool0)]
[vehicle1] vehicle23 will assemble and do [required(item14,1),required(item17,1),required(item16,1)]
[vehicle1] ****** I want to perform action skip
[vehicle1] Doing action skip at step 118
[vehicle1] Task allocation is done job19
[vehicle1] I won the tasks(job19) [item(item9,1)]
[vehicle1] Doing action goto(shop1) at step 119
[vehicle1] Doing action continue at step 120
[vehicle1] Doing action continue at step 121
[vehicle1] New job job20 deliver to storage5 for 2927 starting at 122 to 509
[vehicle1] Items required: [required(item13,1),required(item16,1)]
[vehicle1] Job job20 failed evaluation, ignoring it.
[vehicle1] ****** I want to perform action continue
[vehicle1] Doing action continue at step 122
[vehicle1] Doing action continue at step 123
[vehicle1] Doing action buy(item9,1) at step 124
[vehicle1] Doing action goto(workshop2) at step 125
[vehicle1] New job job21 deliver to storage1 for 5255 starting at 126 to 373
[vehicle1] Items required: [required(item13,3),required(item14,3),required(item17,1)]
[vehicle1] Estimated cost 2808.3 reward 5255
[vehicle1] Estimate 113 < 247
[vehicle1] Received all bids job21
[vehicle1] For job21
[vehicle1] vehicle28 will assist and do [tool(tool7),item(item7,9),item(item6,2)]
[vehicle1] vehicle18 will assist and do [item(item8,4)]
[vehicle1] vehicle17 will assist and do [item(item9,1),item(item8,2),item(item9,4)]
[vehicle1] vehicle7 will assist and do [item(item1,3)]
[vehicle1] vehicle6 will assist and do [item(item2,3)]
[vehicle1] vehicle11 will assist and do [item(item6,3)]
[vehicle1] vehicle16 will assist and do [tool(tool6)]
[vehicle1] vehicle21 will assemble and do [required(item13,3),required(item14,3),required(item17,1)]
[vehicle1] ****** I want to perform action continue
[vehicle1] Doing action continue at step 126
[vehicle1] Doing action continue at step 127
[vehicle1] Task allocation is done job21
[vehicle1] Doing action continue at step 128
[vehicle1] Doing action continue at step 129
[vehicle1] Doing action continue at step 130
[vehicle1] Doing action continue at step 131
[vehicle1] Doing action skip at step 132
[vehicle1] Doing action skip at step 133
[vehicle1] Doing action skip at step 134
[vehicle1] New job job23 deliver to storage4 for 6969 starting at 135 to 249
[vehicle1] Items required: [required(item13,1),required(item14,1),required(item18,1),required(item16,1)]
[vehicle1] Estimated cost 4574.900000000001 reward 6969
[vehicle1] Estimate 131 < 114
[vehicle1] Job job23 failed evaluation, ignoring it.
[vehicle1] Doing action skip at step 135
[vehicle1] Doing action skip at step 136
[vehicle1] New job job24 deliver to storage2 for 6282 starting at 137 to 455
[vehicle1] Items required: [required(item12,9)]
[vehicle1] Estimated cost 3049.2000000000003 reward 6282
[vehicle1] Estimate 115 < 318
[vehicle1] Received all bids job24
[vehicle1] For job24
[vehicle1] vehicle24 will assist and do [item(item8,18),item(item6,9)]
[vehicle1] vehicle12 will assist and do [item(item9,18)]
[vehicle1] vehicle26 will assemble and do [required(item12,9)]
[vehicle1] ****** I want to perform action skip
[vehicle1] Doing action skip at step 137
[vehicle1] Task allocation is done job24
[vehicle1] Doing action skip at step 138
[vehicle1] Doing action skip at step 139
[vehicle1] Doing action skip at step 140
[vehicle1] Doing action skip at step 141
[vehicle1] Doing action skip at step 142
[vehicle1] Doing action skip at step 143
[vehicle1] Doing action skip at step 144
[vehicle1] Doing action skip at step 145
[vehicle1] Doing action skip at step 146
[vehicle1] Ignoring job job25
[vehicle1] Doing action skip at step 147
[vehicle1] Doing action skip at step 148
[vehicle1] Doing action assist_assemble("agentA23") at step 149
[vehicle1] Doing action assist_assemble("agentA23") at step 150
[vehicle1] Doing action assist_assemble("agentA23") at step 151
[vehicle1] Doing action assist_assemble("agentA23") at step 152
[vehicle1] New job job26 deliver to storage2 for 3873 starting at 153 to 431
[vehicle1] Items required: [required(item11,1),required(item10,1),required(item16,1)]
[vehicle1] Estimated cost 3273.6000000000004 reward 3873
[vehicle1] Estimate 68 < 278
[vehicle1] Received all bids job26
[vehicle1] Unable to allocate tool tool0
[vehicle1] Impossible job job26, aborting it.
[vehicle1] ****** I want to perform action assist_assemble("agentA23")
[vehicle1] Doing action assist_assemble("agentA23") at step 153
[vehicle1] Task allocation is done job26
[vehicle1] New job job27 deliver to storage6 for 1888 starting at 154 to 536
[vehicle1] Items required: [required(item14,1),required(item10,1),required(item12,1)]
[vehicle1] Estimated cost 1373.9 reward 1888
[vehicle1] Estimate 65 < 382
[vehicle1] Received all bids job27
[vehicle1] For job27
[vehicle1] vehicle19 will assist and do [item(item8,2)]
[vehicle1] vehicle14 will assist and do [item(item9,2)]
[vehicle1] vehicle15 will assist and do [item(item7,3)]
[vehicle1] vehicle5 will assist and do [item(item6,1)]
[vehicle1] vehicle8 will assist and do [item(item1,1)]
[vehicle1] vehicle10 will assist and do [item(item7,3)]
[vehicle1] vehicle20 will assist and do [item(item1,1)]
[vehicle1] vehicle4 will assist and do [item(item2,1)]
[vehicle1] vehicle25 will assemble and do [required(item14,1),required(item10,1),required(item12,1)]
[vehicle1] ****** I want to perform action assist_assemble("agentA23")
[vehicle1] Doing action assist_assemble("agentA23") at step 154
[vehicle1] Task allocation is done job27
[vehicle1] Ignoring job job28
[vehicle1] Doing action assist_assemble("agentA23") at step 155
[vehicle1] Doing action skip at step 156
[vehicle1] Doing action skip at step 157
[vehicle1] Doing action skip at step 158
[vehicle1] Doing action skip at step 159
[vehicle1] Doing action skip at step 160
[vehicle1] Doing action skip at step 161
[vehicle1] Doing action skip at step 162
[vehicle1] Doing action skip at step 163
[vehicle1] Doing action skip at step 164
[vehicle1] Doing action skip at step 165
[vehicle1] Doing action skip at step 166
[vehicle1] Doing action skip at step 167
[vehicle1] Doing action skip at step 168
[vehicle1] Doing action skip at step 169
[vehicle1] Doing action skip at step 170
[vehicle1] Doing action skip at step 171
[vehicle1] Doing action skip at step 172
[vehicle1] New job job30 deliver to storage5 for 3053 starting at 173 to 396
[vehicle1] Items required: [required(item15,1),required(item14,1),required(item10,1)]
[vehicle1] Estimated cost 2205.5 reward 3053
[vehicle1] Estimate 66 < 223
[vehicle1] Received all bids job30
[vehicle1] For job30
[vehicle1] vehicle22 will assist and do [item(item6,3),item(item7,3),item(item2,1),item(item1,1),item(item7,3),item(item1,1)]
[vehicle1] vehicle23 will assist and do [tool(tool0),item(item3,2)]
[vehicle1] vehicle13 will assist and do [item(item7,6)]
[vehicle1] vehicle9 will assist and do [item(item1,2)]
[vehicle1] vehicle2 will assist and do [tool(tool7)]
[vehicle1] vehicle27 will assemble and do [required(item15,1),required(item14,1),required(item10,1)]
[vehicle1] ****** I want to perform action skip
[vehicle1] Doing action skip at step 173
[vehicle1] Task allocation is done job30
[vehicle1] Doing action skip at step 174
[vehicle1] Ignoring job job31
[vehicle1] Doing action skip at step 175
[vehicle1] Doing action skip at step 176
[vehicle1] Doing action skip at step 177
[vehicle1] Doing action skip at step 178
[vehicle1] Doing action skip at step 179
[vehicle1] Doing action skip at step 180
[vehicle1] Doing action skip at step 181
[vehicle1] New job job32 deliver to storage7 for 7017 starting at 182 to 316
[vehicle1] Items required: [required(item13,1),required(item11,1),required(item18,1),required(item16,1)]
[vehicle1] Estimated cost 4877.400000000001 reward 7017
[vehicle1] Estimate 133 < 134
[vehicle1] Received all bids job32
[vehicle1] Unable to allocate tool tool5
[vehicle1] Impossible job job32, aborting it.
[vehicle1] ****** I want to perform action skip
[vehicle1] Doing action skip at step 182
[vehicle1] Task allocation is done job32
[vehicle1] Doing action skip at step 183
[vehicle1] Doing action skip at step 184
[vehicle1] New job job33 deliver to storage1 for 6873 starting at 185 to 423
[vehicle1] Items required: [required(item11,7)]
[vehicle1] Estimated cost 6255.700000000001 reward 6873
[vehicle1] Estimate 118 < 238
[vehicle1] Received all bids job33
[vehicle1] Unable to allocate #21 of item5
[vehicle1] Impossible job job33, aborting it.
[vehicle1] ****** I want to perform action skip
[vehicle1] Doing action skip at step 185
[vehicle1] Task allocation is done job33
[vehicle1] Doing action skip at step 186
[vehicle1] Doing action skip at step 187
[vehicle1] Doing action skip at step 188
[vehicle1] Doing action skip at step 189
[vehicle1] Doing action skip at step 190
[vehicle1] Doing action skip at step 191
[vehicle1] Doing action skip at step 192
[vehicle1] New job job34 deliver to storage3 for 6646 starting at 193 to 584
[vehicle1] Items required: [required(item11,1),required(item12,2),required(item16,2)]
[vehicle1] Estimated cost 5256.900000000001 reward 6646
[vehicle1] Estimate 127 < 391
[vehicle1] Received all bids job34
[vehicle1] For job34
[vehicle1] vehicle28 will assist and do [item(item5,12)]
[vehicle1] vehicle25 will assist and do [item(item6,12),item(item7,12)]
[vehicle1] vehicle7 will assist and do [item(item6,2)]
[vehicle1] vehicle18 will assist and do [item(item8,4)]
[vehicle1] vehicle6 will assist and do [item(item5,3)]
[vehicle1] vehicle24 will assist and do [tool(tool0),item(item9,4)]
[vehicle1] vehicle20 will assist and do [item(item6,3)]
[vehicle1] vehicle15 will assist and do [item(item7,3)]
[vehicle1] vehicle4 will assist and do [tool(tool5)]
[vehicle1] vehicle3 will assist and do [tool(tool1)]
[vehicle1] vehicle26 will assemble and do [required(item11,1),required(item12,2),required(item16,2)]
[vehicle1] ****** I want to perform action skip
[vehicle1] Doing action skip at step 193
[vehicle1] Task allocation is done job34
[vehicle1] Doing action skip at step 194
[vehicle1] Doing action skip at step 195
[vehicle1] Doing action skip at step 196
[vehicle1] Doing action skip at step 197
[vehicle1] Doing action skip at step 198
[vehicle1] Doing action skip at step 199
[vehicle1] New job job36 deliver to storage7 for 2770 starting at 200 to 518
[vehicle1] Items required: [required(item11,1),required(item14,1),required(item12,1)]
[vehicle1] Estimated cost 1886.5000000000002 reward 2770
[vehicle1] Estimate 69 < 318
[vehicle1] Received all bids job36
[vehicle1] Unable to allocate tool tool5
[vehicle1] Impossible job job36, aborting it.
[vehicle1] ****** I want to perform action skip
[vehicle1] Doing action skip at step 200
[vehicle1] Task allocation is done job36
[vehicle1] Doing action skip at step 201
[vehicle1] Doing action skip at step 202
[vehicle1] Doing action skip at step 203
[vehicle1] Doing action skip at step 204
[vehicle1] New job job37 deliver to storage2 for 4852 starting at 205 to 365
[vehicle1] Items required: [required(item19,1)]
[vehicle1] Estimated cost 3390.2000000000003 reward 4852
[vehicle1] Estimate 120 < 160
[vehicle1] Received all bids job37
[vehicle1] Unable to allocate tool tool0
[vehicle1] Impossible job job37, aborting it.
[vehicle1] ****** I want to perform action skip
[vehicle1] Doing action skip at step 205
[vehicle1] Task allocation is done job37
[vehicle1] Doing action skip at step 206
[vehicle1] Doing action skip at step 207
[vehicle1] Doing action skip at step 208
[vehicle1] Doing action skip at step 209
[vehicle1] Doing action skip at step 210
[vehicle1] Doing action skip at step 211
[vehicle1] Doing action skip at step 212
[vehicle1] Doing action skip at step 213
[vehicle1] Doing action skip at step 214
[vehicle1] Doing action skip at step 215
[vehicle1] Doing action skip at step 216
[vehicle1] Doing action skip at step 217
[vehicle1] Doing action skip at step 218
[vehicle1] Doing action skip at step 219
[vehicle1] New job job39 deliver to storage6 for 4911 starting at 220 to 592
[vehicle1] Items required: [required(item19,1)]
[vehicle1] Estimated cost 3390.2000000000003 reward 4911
[vehicle1] Estimate 120 < 372
[vehicle1] Received all bids job39
[vehicle1] Unable to allocate tool tool0
[vehicle1] Impossible job job39, aborting it.
[vehicle1] ****** I want to perform action skip
[vehicle1] Doing action skip at step 220
[vehicle1] Task allocation is done job39
[vehicle1] Doing action skip at step 221
[vehicle1] New job job40 deliver to storage4 for 2180 starting at 222 to 402
[vehicle1] Items required: [required(item13,3),required(item12,3)]
[vehicle1] Estimated cost 1181.4 reward 2180
[vehicle1] Estimate 61 < 180
[vehicle1] Received all bids job40
[vehicle1] For job40
[vehicle1] vehicle11 will assist and do [item(item6,3)]
[vehicle1] vehicle19 will assist and do [item(item8,6)]
[vehicle1] vehicle16 will assist and do [item(item9,6)]
[vehicle1] vehicle12 will assist and do [item(item6,3)]
[vehicle1] vehicle17 will assist and do [tool(tool6)]
[vehicle1] vehicle1 will assist and do [tool(tool7)]
[vehicle1] vehicle21 will assemble and do [required(item13,3),required(item12,3)]
[vehicle1] ****** I want to perform action skip
[vehicle1] Doing action skip at step 222
[vehicle1] Task allocation is done job40
[vehicle1] I won the tasks(job40) [tool(tool7)]
[vehicle1] There is no charging station between me and my goal, going to the nearest one.
[vehicle1] **** Going to charge my battery at chargingStation5
[vehicle1] Doing action goto(chargingStation5) at step 223
[vehicle1] Doing action continue at step 224
[vehicle1] Doing action charge at step 225
[vehicle1] Doing action charge at step 226
[vehicle1] New job job42 deliver to storage6 for 5136 starting at 227 to 546
[vehicle1] Items required: [required(item11,1),required(item14,1),required(item18,1)]
[vehicle1] Job job42 failed evaluation, ignoring it.
[vehicle1] ****** I want to perform action goto(storage5)
[vehicle1] Doing action goto(storage5) at step 227
[vehicle1] Doing action continue at step 228
[vehicle1] Doing action continue at step 229
[vehicle1] Doing action continue at step 230
[vehicle1] Doing action retrieve(tool7,1) at step 231
[vehicle1] New job job44 deliver to storage7 for 2213 starting at 232 to 361
[vehicle1] Items required: [required(item16,1)]
[vehicle1] Job job44 failed evaluation, ignoring it.
[vehicle1] ****** I want to perform action goto(workshop2)
[vehicle1] Doing action goto(workshop2) at step 232
[vehicle1] Doing action continue at step 233
[vehicle1] Doing action continue at step 234
[vehicle1] Doing action skip at step 235
[vehicle1] Doing action skip at step 236
[vehicle1] Doing action skip at step 237
[vehicle1] Doing action skip at step 238
[vehicle1] Doing action skip at step 239
[vehicle1] New job job46 deliver to storage3 for 4372 starting at 240 to 404
[vehicle1] Items required: [required(item20,1)]
[vehicle1] Estimated cost 2607 reward 4372
[vehicle1] Estimate 121 < 164
[vehicle1] Received all bids job46
[vehicle1] Unable to allocate tool tool2
[vehicle1] Impossible job job46, aborting it.
[vehicle1] ****** I want to perform action skip
[vehicle1] Doing action skip at step 240
[vehicle1] Task allocation is done job46
[vehicle1] Doing action skip at step 241
[vehicle1] Doing action skip at step 242
[vehicle1] Doing action skip at step 243
[vehicle1] Doing action assist_assemble("agentA21") at step 244
[vehicle1] Doing action assist_assemble("agentA21") at step 245
[vehicle1] Doing action assist_assemble("agentA21") at step 246
[vehicle1] Doing action assist_assemble("agentA21") at step 247
[vehicle1] New job job48 deliver to storage5 for 5045 starting at 248 to 617
[vehicle1] Items required: [required(item20,1),required(item10,1)]
[vehicle1] Estimated cost 3063.5000000000005 reward 5045
[vehicle1] Estimate 123 < 369
[vehicle1] Received all bids job48
[vehicle1] For job48
[vehicle1] vehicle6 will assist and do [item(item7,3)]
[vehicle1] vehicle7 will assist and do [item(item1,1)]
[vehicle1] vehicle14 will assist and do [item(item5,3)]
[vehicle1] vehicle5 will assist and do [item(item7,3)]
[vehicle1] vehicle10 will assist and do [item(item3,2)]
[vehicle1] vehicle28 will assist and do [item(item7,9)]
[vehicle1] vehicle8 will assist and do [item(item1,3)]
[vehicle1] vehicle13 will assist and do [item(item6,3)]
[vehicle1] vehicle3 will assist and do [tool(tool2)]
[vehicle1] vehicle9 will assist and do [tool(tool6)]
[vehicle1] vehicle2 will assist and do [tool(tool7)]
[vehicle1] vehicle18 will assist and do [tool(tool3)]
[vehicle1] vehicle22 will assemble and do [required(item20,1),required(item10,1)]
[vehicle1] ****** I want to perform action assist_assemble("agentA21")
[vehicle1] Doing action assist_assemble("agentA21") at step 248
[vehicle1] Task allocation is done job48
[vehicle1] Doing action assist_assemble("agentA21") at step 249
[vehicle1] Doing action assist_assemble("agentA21") at step 250
[vehicle1] Doing action goto(storage5) at step 251
[vehicle1] Doing action continue at step 252
[vehicle1] Doing action continue at step 253
[vehicle1] New job job49 deliver to storage6 for 5973 starting at 254 to 465
[vehicle1] Items required: [required(item15,1),required(item14,2),required(item18,1)]
[vehicle1] Estimated cost 4275.700000000001 reward 5973
[vehicle1] Estimate 117 < 211
[vehicle1] Received all bids job49
[vehicle1] Unable to allocate tool tool2
[vehicle1] Impossible job job49, aborting it.
[vehicle1] ****** I want to perform action skip
[vehicle1] Doing action skip at step 254
[vehicle1] Task allocation is done job49
[vehicle1] Doing action skip at step 255
[vehicle1] Doing action skip at step 256
[vehicle1] Doing action skip at step 257
[vehicle1] Doing action skip at step 258
[vehicle1] Doing action skip at step 259
[vehicle1] New job job50 deliver to storage3 for 6267 starting at 260 to 551
[vehicle1] Items required: [required(item20,1),required(item16,1)]
[vehicle1] Estimated cost 4543 reward 6267
[vehicle1] Estimate 128 < 291
[vehicle1] Received all bids job50
[vehicle1] Unable to allocate tool tool1
[vehicle1] Impossible job job50, aborting it.
[vehicle1] ****** I want to perform action skip
[vehicle1] Doing action skip at step 260
[vehicle1] Task allocation is done job50
[vehicle1] Doing action skip at step 261
[vehicle1] Doing action skip at step 262
[vehicle1] Doing action skip at step 263
[vehicle1] Doing action skip at step 264
[vehicle1] Doing action skip at step 265
[vehicle1] Doing action skip at step 266
[vehicle1] Doing action skip at step 267
[vehicle1] Doing action skip at step 268
[vehicle1] Doing action skip at step 269
[vehicle1] Doing action skip at step 270
[vehicle1] Doing action skip at step 271
[vehicle1] Doing action skip at step 272
[vehicle1] Doing action skip at step 273
[vehicle1] Doing action skip at step 274
[vehicle1] Doing action skip at step 275
[vehicle1] New job job52 deliver to storage3 for 3177 starting at 276 to 437
[vehicle1] Items required: [required(item10,1),required(item16,1)]
[vehicle1] Estimated cost 2392.5 reward 3177
[vehicle1] Estimate 63 < 161
[vehicle1] Received all bids job52
[vehicle1] For job52
[vehicle1] vehicle15 will assist and do [item(item5,6)]
[vehicle1] vehicle16 will assist and do [item(item7,6)]
[vehicle1] vehicle24 will assist and do [item(item6,6)]
[vehicle1] vehicle11 will assist and do [item(item1,1)]
[vehicle1] vehicle19 will assist and do [item(item7,3)]
[vehicle1] vehicle1 will assist and do [tool(tool5)]
[vehicle1] vehicle4 will assist and do [tool(tool1)]
[vehicle1] vehicle25 will assist and do [tool(tool0)]
[vehicle1] vehicle26 will assemble and do [required(item10,1),required(item16,1)]
[vehicle1] ****** I want to perform action skip
[vehicle1] Doing action skip at step 276
[vehicle1] Task allocation is done job52
[vehicle1] I won the tasks(job52) [tool(tool5)]
[vehicle1] Doing action goto(shop4) at step 277
[vehicle1] New job job53 deliver to storage7 for 2238 starting at 278 to 505
[vehicle1] Items required: [required(item14,1),required(item10,2)]
[vehicle1] Estimated cost 1491.6000000000001 reward 2238
[vehicle1] Estimate 62 < 227
[vehicle1] Received all bids job53
[vehicle1] For job53
[vehicle1] vehicle21 will assist and do [item(item1,2),item(item7,6)]
[vehicle1] vehicle17 will assist and do [item(item1,1)]
[vehicle1] vehicle20 will assist and do [item(item7,3)]
[vehicle1] vehicle12 will assist and do [item(item2,1)]
[vehicle1] vehicle27 will assemble and do [required(item14,1),required(item10,2)]
[vehicle1] ****** I want to perform action continue
[vehicle1] Doing action continue at step 278
[vehicle1] Task allocation is done job53
[vehicle1] Doing action continue at step 279
[vehicle1] Doing action continue at step 280
[vehicle1] Doing action continue at step 281
[vehicle1] Doing action buy(tool5,1) at step 282
[vehicle1] Doing action buy(tool5,1) at step 283
[vehicle1] Doing action buy(tool5,1) at step 284
[vehicle1] Doing action buy(tool5,1) at step 285
[vehicle1] Doing action buy(tool5,1) at step 286
[vehicle1] Doing action buy(tool5,1) at step 287
[vehicle1] Doing action buy(tool5,1) at step 288
[vehicle1] Doing action buy(tool5,1) at step 289
[vehicle1] Doing action buy(tool5,1) at step 290
[vehicle1] Doing action buy(tool5,1) at step 291
[vehicle1] Doing action buy(tool5,1) at step 292
[vehicle1] Doing action buy(tool5,1) at step 293
[vehicle1] Doing action buy(tool5,1) at step 294
[vehicle1] Doing action buy(tool5,1) at step 295
[vehicle1] Doing action buy(tool5,1) at step 296
[vehicle1] Doing action buy(tool5,1) at step 297
[vehicle1] Doing action buy(tool5,1) at step 298
[vehicle1] Doing action buy(tool5,1) at step 299
[vehicle1] Doing action buy(tool5,1) at step 300
[vehicle1] New job job56 deliver to storage0 for 5379 starting at 301 to 471
[vehicle1] Items required: [required(item11,1),required(item20,1)]
[vehicle1] Estimated cost 3576.1000000000004 reward 5379
[vehicle1] Estimate 128 < 170
[vehicle1] Received all bids job56
[vehicle1] Unable to allocate tool tool2
[vehicle1] Impossible job job56, aborting it.
[vehicle1] ****** I want to perform action buy(tool5,1)
[vehicle1] Doing action buy(tool5,1) at step 301
[vehicle1] Task allocation is done job56
[vehicle1] Doing action buy(tool5,1) at step 302
[vehicle1] Doing action buy(tool5,1) at step 303
[vehicle1] Doing action buy(tool5,1) at step 304
[vehicle1] Doing action buy(tool5,1) at step 305
[vehicle1] Doing action buy(tool5,1) at step 306
[vehicle1] Doing action buy(tool5,1) at step 307
[vehicle1] Doing action buy(tool5,1) at step 308
[vehicle1] Doing action buy(tool5,1) at step 309
[vehicle1] Doing action buy(tool5,1) at step 310
[vehicle1] Doing action buy(tool5,1) at step 311
[vehicle1] Doing action buy(tool5,1) at step 312
[vehicle1] Doing action buy(tool5,1) at step 313
[vehicle1] Doing action buy(tool5,1) at step 314
[vehicle1] Doing action buy(tool5,1) at step 315
[vehicle1] Doing action buy(tool5,1) at step 316
[vehicle1] New job job58 deliver to storage2 for 3460 starting at 317 to 464
[vehicle1] Items required: [required(item15,1),required(item17,1)]
[vehicle1] Estimated cost 2077.9 reward 3460
[vehicle1] Estimate 67 < 147
[vehicle1] Received all bids job58
[vehicle1] For job58
[vehicle1] vehicle7 will assist and do [item(item6,2)]
[vehicle1] vehicle22 will assist and do [tool(tool0),item(item9,1),item(item8,2),item(item9,4),item(item8,4)]
[vehicle1] vehicle5 will assist and do [item(item6,3)]
[vehicle1] vehicle13 will assist and do [item(item7,6)]
[vehicle1] vehicle14 will assist and do [item(item1,2)]
[vehicle1] vehicle6 will assist and do [item(item3,2)]
[vehicle1] vehicle2 will assist and do [tool(tool7)]
[vehicle1] vehicle21 will assemble and do [required(item15,1),required(item17,1)]
[vehicle1] ****** I want to perform action buy(tool5,1)
[vehicle1] Doing action buy(tool5,1) at step 317
[vehicle1] Task allocation is done job58
[vehicle1] Doing action buy(tool5,1) at step 318
[vehicle1] Doing action buy(tool5,1) at step 319
[vehicle1] New mission job59 deliver to storage7 for 1678 starting at 320 to 540 or pay 1444
[vehicle1] Items required: [required(item13,1),required(item17,1)]
[vehicle1] Received all bids job59
[vehicle1] Unable to allocate #4 of item8
[vehicle1] Impossible job job59, aborting it.
[vehicle1] ****** I want to perform action buy(tool5,1)
[vehicle1] Doing action buy(tool5,1) at step 320
[vehicle1] Doing action buy(tool5,1) at step 321
[vehicle1] Task allocation is done job59
[vehicle1] New job job60 deliver to storage7 for 3889 starting at 321 to 427
[vehicle1] Items required: [required(item13,1),required(item15,1),required(item16,1)]
[vehicle1] Estimated cost 3082.2000000000003 reward 3889
[vehicle1] Estimate 71 < 106
[vehicle1] Received all bids job60
[vehicle1] Unable to allocate tool tool1
[vehicle1] Impossible job job60, aborting it.
[vehicle1] ****** I want to perform action buy(tool5,1)
[vehicle1] Doing action buy(tool5,1) at step 322
[vehicle1] Task allocation is done job60
[vehicle1] New job job61 deliver to storage0 for 3760 starting at 323 to 508
[vehicle1] Items required: [required(item13,1),required(item11,1),required(item18,1)]
[vehicle1] Doing action buy(tool5,1) at step 323
[vehicle1] Estimated cost 3029.4 reward 3760
[vehicle1] Estimate 127 < 185
[vehicle1] Received all bids job61
[vehicle1] Unable to allocate tool tool1
[vehicle1] Impossible job job61, aborting it.
[vehicle1] Task allocation is done job61
[vehicle1] Doing action buy(tool5,1) at step 324
[vehicle1] Doing action buy(tool5,1) at step 325
[vehicle1] Doing action buy(tool5,1) at step 326
[vehicle1] Received all bids job59
[vehicle1] For job59
[vehicle1] vehicle17 will assist and do [item(item6,2)]
[vehicle1] vehicle27 will assist and do [item(item8,2),item(item8,4)]
[vehicle1] vehicle8 will assist and do [item(item9,4)]
[vehicle1] vehicle18 will assist and do [item(item9,1)]
[vehicle1] vehicle20 will assist and do [item(item6,1)]
[vehicle1] vehicle9 will assist and do [tool(tool6)]
[vehicle1] vehicle3 will assist and do [tool(tool7)]
[vehicle1] vehicle23 will assemble and do [required(item13,1),required(item17,1)]
[vehicle1] Task allocation is done job59
[vehicle1] Doing action buy(tool5,1) at step 327
[vehicle1] New job job62 deliver to storage0 for 5681 starting at 328 to 597
[vehicle1] Items required: [required(item19,1)]
[vehicle1] Job job62 failed evaluation, ignoring it.
[vehicle1] ****** I want to perform action buy(tool5,1)
[vehicle1] Doing action buy(tool5,1) at step 328
[vehicle1] Doing action buy(tool5,1) at step 329
[vehicle1] Doing action buy(tool5,1) at step 330
[vehicle1] Doing action buy(tool5,1) at step 331
[vehicle1] Doing action buy(tool5,1) at step 332
[vehicle1] Doing action buy(tool5,1) at step 333
[vehicle1] Doing action buy(tool5,1) at step 334
[vehicle1] Doing action buy(tool5,1) at step 335
[vehicle1] Doing action buy(tool5,1) at step 336
[vehicle1] Doing action buy(tool5,1) at step 337
[vehicle1] Doing action buy(tool5,1) at step 338
[vehicle1] Doing action buy(tool5,1) at step 339
[vehicle1] Doing action buy(tool5,1) at step 340
[vehicle1] Doing action buy(tool5,1) at step 341
[vehicle1] Doing action buy(tool5,1) at step 342
[vehicle1] Doing action buy(tool5,1) at step 343
[vehicle1] Doing action buy(tool5,1) at step 344

image
image
image
image
image

Composite bases are not being added in the correct amount

Composite bases are composite items that are required for job items.
Example:
Job required 2 of item15, and item15 required 2 of item 10.
The assemble list should contain assemble(item10,4) and assemble(item15,2), but right now it is adding only assemble(item10,2) and assemble(item15,2).

Task allocation bug

Doesn't happen every time, only in a few executions (even for the same mission).
It must have something to do with the order of bids.

Could not finish intention: intention 1391: Trigger: +initiator::bids(item(item9,2),[bid(vehicle17,13,shop1,item(item9,2),16),bid(vehicle14,10,shop1,item(item9,2),16),bid(vehicle27,23,shop1,item(item9,2),16),bid(vehicle13,19,shop1,item(item9,2),16),bid(vehicle15,7,shop1,item(item9,2),16),bid(vehicle1,4,shop1,item(item9,2),16),bid(vehicle2,2,shop1,item(item9,2),16),bid(vehicle23,27,shop1,item(item9,2),16),bid(vehicle21,20,shop1,item(item9,2),16),bid(vehicle19,19,shop1,item(item9,2),16),bid(vehicle11,8,shop1,item(item9,2),16),bid(vehicle26,18,shop1,item(item9,2),16),bid(vehicle6,4,shop1,item(item9,2),16),bid(vehicle22,10,shop1,item(item9,2),16),bid(vehicle18,12,shop1,item(item9,2),16),bid(vehicle12,9,shop1,item(item9,2),16),bid(vehicle16,5,shop1,item(item9,2),16),bid(vehicle28,22,shop1,item(item9,2),16),bid(vehicle9,10,shop1,item(item9,2),16),bid(vehicle4,6,shop1,item(item9,2),16),bid(vehicle3,5,shop1,item(item9,2),16),bid(vehicle10,13,shop1,item(item9,2),16),bid(vehicle5,5,shop1,item(item9,2),16),bid(vehicle24,25,shop1,item(item9,2),16),bid(vehicle7,13,shop1,item(item9,2),16),bid(vehicle20,8,shop1,item(item9,2),16),bid(vehicle25,20,shop1,item(item9,2),16),bid(vehicle8,11,shop1,item(item9,2),16)],job2)[code(initiator::awarded(vehicle27,shop1,_9947)),code_line(86),code_src("D:\mapc2017-pucrs\src\agt\strategies\initiator.asl"),error(test_goal_failed),error_msg("Failed to test 'initiator::awarded(Agent,Shop,List)'"),source(self)]

lastAction: buy() = failed_item_amount

failed_item_amount The given amount is not an integer, less than 1, or greater than the shop's available quantity.

I believe its because the shop is out of stock, but we need to test more.

CellSize and Proximity values

We are using the values from WorldState, which are different from config.

Using the WorldState values we do not get accurate route lengths when using our internal actions. And using config values we do not get any route length.

If we use the routeLength percept from the server we can get the real length, but lose one step to calculate it.

It seems that there might be something missing in our MapHelper, in order to use the new values of cellsize and proximity.

Bug with the buy action

Agents keep trying to buy after they already bought the amount that they needed.
Happens sometimes with randomSeed set to 2.

Bug with CommitAction

[vehicle1] Job job45 failed evaluation, ignoring it.
[vehicle1] !!!!!!!!!!!!!!!!! Job job38 failed!
[vehicle1] Final analysis for job46 at step 256
[vehicle1] Job job46 failed evaluation, ignoring it.
[vehicle1] Doing action goto(storage6) at step 256 . Waiting for step 257
[vehicle1] No failure event was generated for +!#1localActions::commitAction(goto(storage6))[code(#1localActions::action(goto(storage6))),code_line(11),code_src("/home/tabajara/git/mapc2017-pucrs/src/agt/action/actions.asl"),env_failure_reason(unknown_operation("action/1")),error(action_failed),error_msg("Unknown Operation"),source(self)]
intention 9200:
+!#1localActions::commitAction(goto(storage6))[source(self)] <- ... #1localActions::action(Action); .wait((actionID(S2) & (S2 == S))); ?lastActionResult(Result); -action::action(S); .if_then_else(((#1localActions::Action == #1localActions::recharge) & ((#1localActions::Action == #1localActions::continue) & (not (.substring("assist_assemble",Action)) & (not (.substring("buy",Action)) & (not (.substring("bid_for_job",Action)) & (#1localActions::Result == #1localActions::failed)))))),{ !#1localActions::commitAction(Action) },{ .if_then_else((.substring("deliver",Action) & ((#1localActions::Result == #1localActions::failed_job_status) & winner(_11,assemble(_12,JobId,_13)))),{ +strategies::jobDone(JobId) }); .if_then_else(action::next_action(Action2),{ -action::next_action(Action2) },{ .if_then_else(strategies::free,{ !!action::recharge_is_new_skip }) }) }) / {Action=goto(storage6), S=256}
+!action::goto(storage6)[source(self)] <- ... !#1localActions::commitAction(goto(FacilityId)); !action::goto(FacilityId) / {FacilityId=storage6, List=[chargingStation0,chargingStation3,chargingStation2,chargingStation1], FacilityId2=chargingStation3, Result="true"}
+!strategies::go_store(drone)[source(self)] <- ... !action::goto(Facility); ?storage(Facility,_237,_238,TotCap2,UsedCap2,_239); .if_then_else(((strategies::UsedCap2+strategies::Load) < strategies::TotCap2),{ .foreach(hasItem(ItemId,Qty),{ ?storage(Facility,_240,_241,TotCapL,UsedCapL,_242); .if_then_else((load(LoadL) & ((strategies::UsedCapL+strategies::LoadL) < strategies::TotCapL)),{ !action::store(ItemId,Qty); strategies::addAvailableItem(Facility,ItemId,Qty) }) }) }) / {Role=drone, TotCap=14534, Load=20, SList=[storage2,storage3,storage6,storage4,storage0,storage5,storage1], UsedCap=1337, Facility=storage6, _236=[item(tool6,1,0),item(tool5,1,0),item(tool3,1,0),item(tool0,1,0),item(tool1,1,0)], _235=2.38945, _234=48.88962}
+!strategies::job_failed_assist[source(self)] <- ... !strategies::go_store(Role); .if_then_else(hasItem(_257,_258),{ !strategies::go_dump }); .if_then_else((strategies::Role == strategies::truck),{ .send(vehicle1,achieve,initiator::add_truck_to_free) },{ .if_then_else((strategies::Me == strategies::vehicle1),{ !initiator::add_myself_to_free },{ .send(vehicle1,achieve,initiator::add_agent_to_free) }) }); !!strategies::free / {Role=drone, _110511=assist(storage5,vehicle23,job38), _249=self, S=255, _110510=[item(item0,2)], _244=100, Me=vehicle1, _255=item0, _243=5, _110509=self, _248=assist(storage5,vehicle23,job38), _247=[item(item0,2)], _246=[tool4,tool6,tool7], _245=250, S2=256, _256=2}
+job_done(job38,storage5,2931,213,510,[required(item11,2),required(item14,1)])[artifact_id(cobj_6),percept_type(obs_ev),artifact_name(cobj_6,eis_art_vehicle1),workspace(cobj_6,vehicleart,cobj_4)] <- ... !strategies::job_failed_assist / {_291=213, _290=2931, _295=storage5, _294=[item(item0,2)], _293=[required(item11,2),required(item14,1)], _292=510, _110508=0, _296=vehicle23, JobId=job38, _289=storage5, JobsFail=0}

[vehicle1] New job job47 deliver to storage5 for 2630 starting at 258 to 492
[vehicle1] Items required: [required(item14,2)]
[vehicle1] Job job47 failed evaluation, ignoring it.
[vehicle1] >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Step 257 I have done 1 noActions.
[vehicle1] >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Step 258 I have done 2 noActions.

Try to reallocate priced jobs once a job finishes

It might be worth trying to reallocate priced jobs once we complete a job.

This might result in more failures when playing against another team, but in the end we could win more money than we lose.

Assemble coordination

The agent who is doing assemble does not have to send a message to the agents who are assisting to stop.
They should be able stop when they do not have any "hasItem" percepts, that are not tools, left.

Tool reuse

Instead of using an observable property to maintain which tools are available, we should be able to use the storage information about which Items are stored.

Wrong workspace error when placing a bid

This happens because the artefact has already been disposed.
The initiator thinks he received all bids.

I think this is a problem with the free agents / free trucks list.
Additions to the list are message based, so the initiator might not have added the agent to the list yet, but the agent has already sent the message and believe it is free.

Perhaps moving the list to an observable property at the task board artefact could solve it.

Allow assemble agent to receive other tasks

Now that we have coordination via Moise, the assemble agent should be able to take one extra task, as long as he still has enough space.
We should limit extra tasks to one though (maybe two).

Charge bug

This truck decided to go charge its battery at the worst possible moment:

[vehicle25] I won the tasks(job76) [tool(tool3),item(item4,2),item(item6,1)]
[vehicle25] Doing action goto(shop4) at step 537 . Waiting for step 538
[vehicle25] Doing action buy(item6,1) at step 545 . Waiting for step 546
[vehicle25] Doing action goto(shop2) at step 546 . Waiting for step 547
[vehicle25] Doing action buy(item4,2) at step 567 . Waiting for step 568
[vehicle25] **** Going to charge my battery at chargingStation1
[vehicle25] Doing action goto(chargingStation1) at step 568 . Waiting for step 569
[vehicle25] Doing action charge at step 582 . Waiting for step 583
[vehicle25] Doing action charge at step 583 . Waiting for step 584
[vehicle25] Doing action charge at step 584 . Waiting for step 585
[vehicle25] Doing action charge at step 585 . Waiting for step 586
[vehicle25] Doing action charge at step 586 . Waiting for step 587
[vehicle25] Doing action charge at step 587 . Waiting for step 588
[vehicle25] Doing action charge at step 588 . Waiting for step 589
[vehicle25] Doing action charge at step 589 . Waiting for step 590
[vehicle25] Doing action charge at step 590 . Waiting for step 591
[vehicle25] Doing action charge at step 591 . Waiting for step 592
[vehicle25] Doing action charge at step 592 . Waiting for step 593
[vehicle25] Doing action charge at step 593 . Waiting for step 594
[vehicle25] Doing action charge at step 594 . Waiting for step 595
[vehicle25] Doing action charge at step 595 . Waiting for step 596
[vehicle25] Doing action charge at step 596 . Waiting for step 597
[vehicle25] Doing action charge at step 597 . Waiting for step 598
[vehicle25] Doing action charge at step 598 . Waiting for step 599
[vehicle25] Doing action charge at step 599 . Waiting for step 600
[vehicle25] Doing action charge at step 600 . Waiting for step 601
[vehicle25] Doing action charge at step 601 . Waiting for step 602
[vehicle25] Doing action charge at step 602 . Waiting for step 603
[vehicle25] Doing action charge at step 603 . Waiting for step 604
[vehicle25] Doing action charge at step 604 . Waiting for step 605
[vehicle25] Doing action charge at step 605 . Waiting for step 606
[vehicle25] Doing action charge at step 606 . Waiting for step 607
[vehicle25] Doing action charge at step 607 . Waiting for step 608
[vehicle25] Doing action charge at step 608 . Waiting for step 609
[vehicle25] Doing action charge at step 609 . Waiting for step 610
[vehicle25] Doing action charge at step 610 . Waiting for step 611
[vehicle25] Doing action charge at step 611 . Waiting for step 612
[vehicle25] Doing action charge at step 612 . Waiting for step 613
[vehicle25] Doing action charge at step 613 . Waiting for step 614
[vehicle25] Doing action charge at step 614 . Waiting for step 615
[vehicle25] Doing action charge at step 615 . Waiting for step 616
[vehicle25] Doing action charge at step 616 . Waiting for step 617
[vehicle25] Doing action charge at step 617 . Waiting for step 618
[vehicle25] Doing action charge at step 618 . Waiting for step 619
[vehicle25] Doing action charge at step 619 . Waiting for step 620
[vehicle25] Doing action charge at step 620 . Waiting for step 621
[vehicle25] Doing action charge at step 621 . Waiting for step 622
[vehicle25] Doing action charge at step 622 . Waiting for step 623
[vehicle25] Doing action charge at step 623 . Waiting for step 624
[vehicle25] Doing action goto(storage3) at step 624 . Waiting for step 625
[vehicle25] Doing action retrieve(tool3,1) at step 641 . Waiting for step 642
[vehicle25] Doing action goto(workshop1) at step 642 . Waiting for step 643
[vehicle25] !!!!!!!!!!!!!!!!! Job job76 failed!

Bug with create scheme

[vehicle1] Doing action continue at step 187
[vehicle1] New mission job34 deliver to storage6 for 2276 starting at 188 to 370 or pay 1503
[vehicle1] Items required: [required(item10,2),required(item14,1)]
[vehicle1] Received all bids job34
[vehicle1] Unable to allocate #6 of item7
[vehicle1] Impossible job job34, aborting it.
[vehicle1] ****** I want to perform action skip
[vehicle1] Doing action skip at step 188
[vehicle1] Task allocation is done job34
[vehicle1] Doing action skip at step 189
[vehicle1] Doing action skip at step 190
[vehicle1] Doing action skip at step 191
[vehicle1] Doing action skip at step 192
[vehicle1] Doing action skip at step 193
[vehicle1] Doing action skip at step 194
[vehicle1] Doing action skip at step 195
[vehicle1] Doing action skip at step 196
[vehicle1] Doing action skip at step 197
[vehicle1] Doing action skip at step 198
[vehicle1] Doing action skip at step 199
[vehicle1] New job job35 deliver to storage4 for 5344 starting at 200 to 463
[vehicle1] Items required: [required(item14,1),required(item15,2),required(item13,1),required(item12,1)]
[vehicle1] Estimated cost 3183.4 reward 5344
[vehicle1] Estimate 128 < 263
[vehicle1] Received all bids job35
[vehicle1] Unable to allocate tool tool0
[vehicle1] Impossible job job35, aborting it.
[vehicle1] ****** I want to perform action skip
[vehicle1] Doing action skip at step 200
[vehicle1] Task allocation is done job35
[vehicle1] Doing action skip at step 201
[vehicle1] Doing action skip at step 202
[vehicle1] Doing action skip at step 203
[vehicle1] Doing action skip at step 204
[vehicle1] Doing action skip at step 205
[vehicle1] New job job36 deliver to storage7 for 5867 starting at 206 to 498
[vehicle1] Items required: [required(item16,2),required(item15,1)]
[vehicle1] Doing action assist_assemble("agentA23") at step 206
[vehicle1] Job job36 failed evaluation, ignoring it.
[vehicle1] New job job37 deliver to storage3 for 3096 starting at 207 to 520
[vehicle1] Items required: [required(item18,1),required(item13,1),required(item12,1)]
[vehicle1] Estimated cost 2399.1000000000004 reward 3096
[vehicle1] Estimate 124 < 313
[vehicle1] Received all bids job37
[vehicle1] Unable to allocate tool tool2
[vehicle1] Impossible job job37, aborting it.
[vehicle1] ****** I want to perform action assist_assemble("agentA23")
[vehicle1] Doing action assist_assemble("agentA23") at step 207
[vehicle1] Task allocation is done job37
[vehicle1] Doing action assist_assemble("agentA23") at step 208
[vehicle1] Doing action assist_assemble("agentA23") at step 209
[vehicle1] Doing action assist_assemble("agentA23") at step 210
[vehicle1] Doing action goto(storage5) at step 211
[vehicle1] Doing action continue at step 212
[vehicle1] Doing action continue at step 213
[vehicle1] Doing action store(tool7,1) at step 214
[vehicle1] Doing action skip at step 215
[vehicle1] Doing action skip at step 216
[vehicle1] Doing action skip at step 217
[vehicle1] Doing action skip at step 218
[vehicle1] Doing action skip at step 219
[vehicle1] Received all bids job34
[vehicle1] For job34
[vehicle1] vehicle20 will assist and do [item(item7,3)]
[vehicle1] vehicle6 will assist and do [item(item2,1)]
[vehicle1] vehicle17 will assist and do [item(item7,6)]
[vehicle1] vehicle8 will assist and do [item(item1,1)]
[vehicle1] vehicle11 will assist and do [item(item1,2)]
[vehicle1] vehicle26 will assemble and do [required(item10,2),required(item14,1)]
[vehicle1] Task allocation is done job34
[vehicle1] Doing action skip at step 220
[vehicle1] Received all bids job34
[vehicle1] Bug with create scheme for job34, detected, aborting it.
[vehicle1] Could not finish intention: intention 8209:
+initiator::bids(item(item1,2),[bid(vehicle3,-1,null,item(item1,2),213),bid(vehicle1,-1,null,item(item1,2),213),bid(vehicle14,8,shop4,item(item1,2),213),bid(vehicle15,7,shop4,item(item1,2),213),bid(vehicle22,12,shop4,item(item1,2),213),bid(vehicle25,14,shop2,item(item1,2),213),bid(vehicle16,10,shop2,item(item1,2),213),bid(vehicle24,14,shop2,item(item1,2),213),bid(vehicle18,12,shop4,item(item1,2),213)],job34)[source(self)] <- ... ?initiator::awarded_assemble(AgentA,Items,Storage,JobId); -initiator::awarded_assemble(AgentA,Items,Storage,JobId); ?initiator::free_agents(FreeAgentsA); ?initiator::free_trucks(FreeTrucksA); .delete(AgentA,FreeTrucksA,FreeTrucksNewA); -+initiator::free_trucks(FreeTrucksNewA); .delete(AgentA,FreeAgentsA,FreeAgentsNewA); -+initiator::free_agents(FreeAgentsNewA); .print("For ",JobId); .foreach(initiator::awarded(Agent,Shop,List,JobId),{ ?initiator::free_agents(FreeAgents); .delete(Agent,FreeAgents,FreeAgentsNew); -+initiator::free_agents(FreeAgentsNew); ?initiator::free_trucks(FreeTrucks); .if_then_else(.member(Agent,FreeTrucks),{ .delete(Agent,FreeTrucks,FreeTrucksNew); -+initiator::free_trucks(FreeTrucksNew) }); .print(Agent," will assist and do ",List); .send(Agent,tell,winner(List,assist(Storage,AgentA,JobId))); -initiator::awarded(Agent,Shop,List,JobId) }); .print(AgentA," will assemble and do ",Items); .send(AgentA,tell,winner(Items,assemble(Storage,JobId))); .if_then_else(initiator::mission(JobId,_9195,_9196,_9197,_9198,_9199),{ -initiator::mission(JobId,_9200,_9201,_9202,_9203,_9204) }); -initiator::cnp(JobId); !strategies::not_reasoning; .print("Task allocation is done ",JobId) / {_9175=item(item1,2), _9176=[bid(vehicle3,-1,null,item(item1,2),213),bid(vehicle1,-1,null,item(item1,2),213),bid(vehicle14,8,shop4,item(item1,2),213),bid(vehicle15,7,shop4,item(item1,2),213),bid(vehicle22,12,shop4,item(item1,2),213),bid(vehicle25,14,shop2,item(item1,2),213),bid(vehicle16,10,shop2,item(item1,2),213),bid(vehicle24,14,shop2,item(item1,2),213),bid(vehicle18,12,shop4,item(item1,2),213)], NumberOfTasks=6, SchArtId=_83574, NumberOfBids=6, OrgId=cobj_2, Me=vehicle1, JobId=job34}
+!initiator::announce(item(item1,2),10000,9,job34,213,[vehicle22,vehicle24,vehicle14,vehicle1,vehicle15,vehicle3,vehicle16,vehicle18,vehicle25],[vehicle22,vehicle24,vehicle25])[source(self)] <- ... +initiator::bids(Task,Bids,JobId); initiator::remove[artifact_name(CNPBoardName)] / {Task=item(item1,2), TaskId=213, Deadline=10000, NumberOfAgents=9, Bids=[bid(vehicle3,(-1),null,item(item1,2),213),bid(vehicle1,(-1),null,item(item1,2),213),bid(vehicle14,8,shop4,item(item1,2),213),bid(vehicle15,7,shop4,item(item1,2),213),bid(vehicle22,12,shop4,item(item1,2),213),bid(vehicle25,14,shop2,item(item1,2),213),bid(vehicle16,10,shop2,item(item1,2),213),bid(vehicle24,14,shop2,item(item1,2),213),bid(vehicle18,12,shop4,item(item1,2),213)], FreeAgents=[vehicle22,vehicle24,vehicle14,vehicle1,vehicle15,vehicle3,vehicle16,vehicle18,vehicle25], JobId=job34, FreeTrucks=[vehicle22,vehicle24,vehicle25], CNPBoardName="cnp_board_213"}
Trigger: +initiator::bids(item(item1,2),[bid(vehicle3,-1,null,item(item1,2),213),bid(vehicle1,-1,null,item(item1,2),213),bid(vehicle14,8,shop4,item(item1,2),213),bid(vehicle15,7,shop4,item(item1,2),213),bid(vehicle22,12,shop4,item(item1,2),213),bid(vehicle25,14,shop2,item(item1,2),213),bid(vehicle16,10,shop2,item(item1,2),213),bid(vehicle24,14,shop2,item(item1,2),213),bid(vehicle18,12,shop4,item(item1,2),213)],job34)[code(initiator::awarded_assemble(_83583,_83584,_83585,job34)),code_line(277),code_src("/home/tabajara/git/mapc2017-pucrs/src/agt/strategies/initiator.asl"),error(test_goal_failed),error_msg("Failed to test 'initiator::awarded_assemble(AgentA,Items,Storage,JobId)'"),source(self)]
[vehicle1] Doing action skip at step 221
[vehicle1] Doing action skip at step 222
[vehicle1] Doing action skip at step 223
[vehicle1] Doing action skip at step 224

image

Test case with two teams

Create a test case where two teams connect and play against each other.
It can be a mirror match first.

An agent can win tasks from more than one job

This can happen if a CNP for a task is still being processed after the step that the job perception came, and then another job is perceived.
Since the free agents list was not yet updated, agents will receive tasks from both jobs.

I will implement a rule that checks if there are any CNPs active for a different job, and if there is, than wait and try again in 500ms.

Interleaving of actions

Sometimes agents start to interleave the skip action with another action, causing all sorts of problems.

Problema no Assamble

Testando a simulação com 1 round e 1 time, alterando o "randomSeed" (no conf/1simConfig.json) para 19
houve muitos problemas pra montar os itens, cada agente fica dando um erro: failed_counterpart ou failed_item_amount, um deles deu o erro failed_tools em um momento, e ali eles ficam por um bom tempo até darem um abort e desistirem do job mas isso demora mais de 200 steps pra acontecer, impactando no valor arrecadado final que nas outras configurações era em torno de mais de 100 mil e nessa configuração fica em torno de 60 mil.

Longas rotas caminhões

Observei que em algumas simulações um caminhão realiza a compra de itens em shops distintos e distantes um do outro, o que acaba prolongando a execução do job.

Post auction bids with more than one agent

If at least one other agent is free, he should also post a bid for the auction, this way we increase the odds that our bid will not fail because of the 1% random chance.

Limit the number of tasks that can be awarded to an agent in the same job

Example:
[vehicle27] I won the tasks(job111) [tool(tool2),item(item3,4),item(item7,3),item(item0,4),item(item1,2),item(item7,8),item(item6,4)]
[vehicle27] Doing action goto(shop0) at step 831 . Waiting for step 832
[vehicle27] Doing action buy(item6,4) at step 856 . Waiting for step 857
[vehicle27] Doing action goto(shop6) at step 857 . Waiting for step 858
[vehicle27] Doing action buy(item7,11) at step 879 . Waiting for step 880
[vehicle27] Doing action buy(item3,4) at step 880 . Waiting for step 881
[vehicle27] Doing action goto(shop3) at step 881 . Waiting for step 882
[vehicle27] Doing action buy(item1,2) at step 899 . Waiting for step 900
[vehicle27] Doing action goto(shop5) at step 900 . Waiting for step 901
[vehicle27] Doing action buy(item0,4) at step 924 . Waiting for step 925
[vehicle27] Doing action goto(storage2) at step 925 . Waiting for step 926
[vehicle27] !!!!!!!!!!!!!!!!! Job job111 failed!

Perhaps even limiting the amount of tasks where the shops are different should be enough.
But this might confict with future strategies when agents decide to go to other shops anyway...

For now I will just limit the number of tasks to 4.

Drones can go to a different workshop than the rest of the team

Agents detect which facility is closest (from a list of facilities) depending on their role.
What matters here is if the role is drone or not, that is, if the vehicle can travel by air and not follow roads.
This can result in instances where all agents go to one workshop, and drones go to a different one, because of the route by air.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.