76 final Set<CVotingAgent> l_agents;
77 final CVotingAgent.CVotingAgentGenerator l_votingagentgenerator;
80 final String l_name =
"results.h5";
81 CDataWriter.createHDF5( l_name );
82 CDataWriter.test( l_name );
86 final FileInputStream l_stream =
new FileInputStream( p_args[0] );
87 final FileInputStream l_chairstream =
new FileInputStream( p_args[1] );
89 s_environment =
new CEnvironment( Integer.parseInt( p_args[2] ), l_name );
92 l_agents = l_votingagentgenerator
93 .generatemultiple( Integer.parseInt( p_args[2] ),
new CChairAgent.CChairAgentGenerator( l_chairstream, s_environment, s_grouping,
s_protocol, l_name ) )
94 .collect( Collectors.toSet() );
97 System.out.println(
" Numbers of agents: " + l_agents.size() );
101 catch (
final Exception l_exception )
103 l_exception.printStackTrace();
104 throw new RuntimeException();
109 final Set<CVotingAgent> l_activeAgents = Sets.newConcurrentHashSet();
111 System.out.println(
" Numbers of active agents: " + l_activeAgents.size() );
113 System.out.println(
" Numbers of active agents: " + l_activeAgents.size() );
114 System.out.println(
" Will run " + p_args[3] +
" cycles." );
121 : Integer.parseInt( p_args[3] ) )
124 System.out.println(
"Global cycle: " + j );
125 l_agents.parallelStream().forEach( i ->
135 catch (
final Exception l_exception )
137 l_exception.printStackTrace();
138 throw new RuntimeException();
static CEnvironment s_environment