Commit 49f2daeb authored by K20014's avatar K20014
Browse files

進捗の保存

parent b17b090b
......@@ -105,5 +105,7 @@ DefaultTacticsFireBrigade.Search : autumn_2023.module.complex.AuctionFBSearch
DefaultTacticsFireBrigade.CommandExecutorFire : autumn_2023.centralized.AuctionCommandExecutorFire
DefaultTacticsFireStation.TargetAllocator : autumn_2023.module.complex.AuctionFireTargetAllocator
DefaultTacticsFireStation.CommandPicker : autumn_2023.centralized.AuctionCommandPickerFire
MessageManager.PlatoonMessageCoordinator : autumn_2023.module.comm.DefaultMessageCoordinator
MessageManager.CenterMessageCoordinator : autumn_2023.module.comm.DefaultMessageCoordinator
\ No newline at end of file
MessageManager.PlatoonMessageCoordinator : autumn_2023.module.comm.AuctionMessageCoordinator
MessageManager.CenterMessageCoordinator : autumn_2023.module.comm.AuctionMessageCoordinator
MessageManager.PlatoonChannelSubscriber : autumn_2023.module.comm.AuctionChannelSubscriber
MessageManager.CenterChannelSubscriber : autumn_2023.module.comm.AuctionChannelSubscriber
\ No newline at end of file
......@@ -3,6 +3,7 @@ package autumn_2023.centralized;
import adf.core.agent.action.common.ActionMove;
import adf.core.agent.action.common.ActionRest;
import adf.core.agent.communication.MessageManager;
import adf.core.agent.communication.standard.bundle.StandardMessageBundle;
import adf.core.agent.communication.standard.bundle.centralized.CommandFire;
import adf.core.agent.communication.standard.bundle.information.MessageCivilian;
import adf.core.agent.develop.DevelopData;
......@@ -91,6 +92,11 @@ public class AuctionCommandExecutorFire extends CommandExecutor<CommandFire> {
.filter(e -> !this.bidCentreCivilians.contains(e))
.collect(Collectors.toSet());
if (this.agentInfo.getTime() == 1) {
final var index = new StandardMessageBundle().getMessageClassList().size() + 1;
messageManager.registerMessageClass(index, MessageCost.class);
}
// 新規メッセージクラスを用いてタスク実行時のコストを救急司令所に送信
if (this.commandType == -1)
{
......
......@@ -2,6 +2,7 @@ package autumn_2023.module.complex;
import adf.core.agent.communication.MessageManager;
import adf.core.agent.communication.standard.bundle.MessageUtil;
import adf.core.agent.communication.standard.bundle.StandardMessageBundle;
import adf.core.agent.communication.standard.bundle.information.MessageCivilian;
import adf.core.agent.develop.DevelopData;
import adf.core.agent.info.AgentInfo;
......@@ -111,6 +112,10 @@ public class AuctionFireTargetAllocator extends FireTargetAllocator{
public FireTargetAllocator updateInfo(MessageManager messageManager)
{
super.updateInfo(messageManager);
if (this.agentInfo.getTime() == 1) {
final var index = new StandardMessageBundle().getMessageClassList().size() + 1;
messageManager.registerMessageClass(index, MessageCost.class);
}
// 受信処理
// そのステップで受信した(前ステップで送信された)メッセージ一覧
......@@ -131,6 +136,7 @@ public class AuctionFireTargetAllocator extends FireTargetAllocator{
|| !this.finishreceivedCivilians.contains(mesCiv.getAgentID()))
{
this.receivedAgentCivilians.add(mesCiv.getAgentID());
System.out.println("receivedAgentCivilians = " + mesCiv.getAgentID());
}
}
}
......@@ -141,6 +147,7 @@ public class AuctionFireTargetAllocator extends FireTargetAllocator{
if (this.worldInfo.getEntity(mesCos.getSenderID()) instanceof FireBrigade)
{
this.rescueCosts.add(mesCos);
System.out.println("rescueCosts = " + mesCos);
}
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment