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

進捗の保存

parent b17b090b
...@@ -105,5 +105,7 @@ DefaultTacticsFireBrigade.Search : autumn_2023.module.complex.AuctionFBSearch ...@@ -105,5 +105,7 @@ DefaultTacticsFireBrigade.Search : autumn_2023.module.complex.AuctionFBSearch
DefaultTacticsFireBrigade.CommandExecutorFire : autumn_2023.centralized.AuctionCommandExecutorFire DefaultTacticsFireBrigade.CommandExecutorFire : autumn_2023.centralized.AuctionCommandExecutorFire
DefaultTacticsFireStation.TargetAllocator : autumn_2023.module.complex.AuctionFireTargetAllocator DefaultTacticsFireStation.TargetAllocator : autumn_2023.module.complex.AuctionFireTargetAllocator
DefaultTacticsFireStation.CommandPicker : autumn_2023.centralized.AuctionCommandPickerFire DefaultTacticsFireStation.CommandPicker : autumn_2023.centralized.AuctionCommandPickerFire
MessageManager.PlatoonMessageCoordinator : autumn_2023.module.comm.DefaultMessageCoordinator MessageManager.PlatoonMessageCoordinator : autumn_2023.module.comm.AuctionMessageCoordinator
MessageManager.CenterMessageCoordinator : autumn_2023.module.comm.DefaultMessageCoordinator MessageManager.CenterMessageCoordinator : autumn_2023.module.comm.AuctionMessageCoordinator
\ No newline at end of file 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; ...@@ -3,6 +3,7 @@ package autumn_2023.centralized;
import adf.core.agent.action.common.ActionMove; import adf.core.agent.action.common.ActionMove;
import adf.core.agent.action.common.ActionRest; import adf.core.agent.action.common.ActionRest;
import adf.core.agent.communication.MessageManager; 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.centralized.CommandFire;
import adf.core.agent.communication.standard.bundle.information.MessageCivilian; import adf.core.agent.communication.standard.bundle.information.MessageCivilian;
import adf.core.agent.develop.DevelopData; import adf.core.agent.develop.DevelopData;
...@@ -91,6 +92,11 @@ public class AuctionCommandExecutorFire extends CommandExecutor<CommandFire> { ...@@ -91,6 +92,11 @@ public class AuctionCommandExecutorFire extends CommandExecutor<CommandFire> {
.filter(e -> !this.bidCentreCivilians.contains(e)) .filter(e -> !this.bidCentreCivilians.contains(e))
.collect(Collectors.toSet()); .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) if (this.commandType == -1)
{ {
......
...@@ -2,6 +2,7 @@ package autumn_2023.module.complex; ...@@ -2,6 +2,7 @@ package autumn_2023.module.complex;
import adf.core.agent.communication.MessageManager; import adf.core.agent.communication.MessageManager;
import adf.core.agent.communication.standard.bundle.MessageUtil; 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.communication.standard.bundle.information.MessageCivilian;
import adf.core.agent.develop.DevelopData; import adf.core.agent.develop.DevelopData;
import adf.core.agent.info.AgentInfo; import adf.core.agent.info.AgentInfo;
...@@ -111,6 +112,10 @@ public class AuctionFireTargetAllocator extends FireTargetAllocator{ ...@@ -111,6 +112,10 @@ public class AuctionFireTargetAllocator extends FireTargetAllocator{
public FireTargetAllocator updateInfo(MessageManager messageManager) public FireTargetAllocator updateInfo(MessageManager messageManager)
{ {
super.updateInfo(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{ ...@@ -131,6 +136,7 @@ public class AuctionFireTargetAllocator extends FireTargetAllocator{
|| !this.finishreceivedCivilians.contains(mesCiv.getAgentID())) || !this.finishreceivedCivilians.contains(mesCiv.getAgentID()))
{ {
this.receivedAgentCivilians.add(mesCiv.getAgentID()); this.receivedAgentCivilians.add(mesCiv.getAgentID());
System.out.println("receivedAgentCivilians = " + mesCiv.getAgentID());
} }
} }
} }
...@@ -141,6 +147,7 @@ public class AuctionFireTargetAllocator extends FireTargetAllocator{ ...@@ -141,6 +147,7 @@ public class AuctionFireTargetAllocator extends FireTargetAllocator{
if (this.worldInfo.getEntity(mesCos.getSenderID()) instanceof FireBrigade) if (this.worldInfo.getEntity(mesCos.getSenderID()) instanceof FireBrigade)
{ {
this.rescueCosts.add(mesCos); 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