UK 2023 AMIRIS model - Java errors

Hi, I am trying to model the UK’s energy market for 2023 within AMIRIS, it is in the context of a research paper I am doing for my masters project with the University of Sheffield. I am new to Java and AMIRIS and am trying to get my head around it. I have set up csv files with data from the UK over 2023, and have just tried to run AMIRIS using eclipse-workspace, and it has returned this error:

java.lang.RuntimeException: List has not exactly one entry!
	at de.dlr.gitlab.fame.communication.CommUtils.ensureExactlyOneEntry(CommUtils.java:41)
	at de.dlr.gitlab.fame.communication.CommUtils.getExactlyOneEntry(CommUtils.java:32)
	at agents.trader.renewable.AggregatorTrader.sendYieldPotentials(AggregatorTrader.java:279)
	at de.dlr.gitlab.fame.agent.Agent.executeAction(Agent.java:104)
	at de.dlr.gitlab.fame.agent.Agent.executeActions(Agent.java:87)
	at de.dlr.gitlab.fame.service.Scheduler.scheduleNext(Scheduler.java:80)
	at de.dlr.gitlab.fame.service.Simulator.proceedWithSchedule(Simulator.java:125)
	at de.dlr.gitlab.fame.service.Simulator.run(Simulator.java:103)
	at de.dlr.gitlab.fame.setup.FameRunner.run(FameRunner.java:45)
	at picocli.CommandLine.executeUserObject(CommandLine.java:1939)
	at picocli.CommandLine.access$1300(CommandLine.java:145)
	at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2352)
	at picocli.CommandLine$RunLast.handle(CommandLine.java:2346)
	at picocli.CommandLine$RunLast.handle(CommandLine.java:2311)
	at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2179)
	at picocli.CommandLine.execute(CommandLine.java:2078)
	at de.dlr.gitlab.fame.setup.FameRunner.main(FameRunner.java:34)

Could someone give me a bit of an insight into what I have done wrong, and where I can find out where the extra entry is, currently I am struggling to work out if it is in a csv or pb file and if so then which one it is in.

Thanks for any help :slight_smile:

It seems to be something to do with the aggregate trader, and the yield potential within the support for renewables policy, but not really sure where to look to try to fix this?

Dear Ben,

it’s great to hear you are using AMIRIS. Sorry for the late response — we were on Easter holidays.

Regarding your error report — I guess the message could be more explicit. However, I have a guess what went wrong: Did you maybe introduce multiple SupportPolicy agents or add a contract copy of YieldPotential-contract. Or did you maybe add another DayAheadMarket (or copy its GateClosureInfo-contract)?

The AggregatorTrader cannot communicate with multiple DayAheadMarkets or SupportPolicies at the same time, thus the error.

If you are unsure, I can offer to have a look at your scenario.yaml or contracts files.

Kind regards
Christoph