Package jline.solvers.ag
Class AgWorkerClient
java.lang.Object
jline.solvers.ag.AgWorkerClient
- All Implemented Interfaces:
AutoCloseable
Coordinator-side connection to one ag-worker process.
The connection is opened lazily and the agents are assigned once; after
that each sweep is one request carrying the reversed rates and one reply
carrying the agents' stationary vectors. Any failure marks the client dead
rather than propagating: AgExec then solves those agents locally,
which it can do because an agent depends on the rest of the model only through
the reversed rates.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidassign(List<Integer> agents, Matrix[] Aa, Matrix[] Pb, Matrix[] L, int[] ACT, int[] PSV, int numActions, int[] N, RCATModel rcat) Ship the static half of the owned agents.voidclose()endpoint()booleanisLive()voidkill()Mark the worker unusable for the rest of the run and drop its socket.One sweep: send the reversed rates, receive the owned agents' stationary vectors in the order they were assigned.
-
Constructor Details
-
AgWorkerClient
-
-
Method Details
-
endpoint
-
isLive
public boolean isLive() -
kill
public void kill()Mark the worker unusable for the rest of the run and drop its socket. -
assign
public void assign(List<Integer> agents, Matrix[] Aa, Matrix[] Pb, Matrix[] L, int[] ACT, int[] PSV, int numActions, int[] N, RCATModel rcat) throws Exception Ship the static half of the owned agents. Sent once per solve.- Throws:
Exception
-
sweep
One sweep: send the reversed rates, receive the owned agents' stationary vectors in the order they were assigned.- Throws:
Exception
-
close
public void close()- Specified by:
closein interfaceAutoCloseable
-