AG (Cooperating agents)
Methods · Configuration · Shared options · All solvers
The AG solver decomposes a queueing network into cooperating agents using the Reversed Compound Agent Theorem (RCAT). It iterates the reversed rates of synchronizing actions, including signals.
Methods
The method names and defaults below describe the MATLAB version. Use solver.listValidMethods() to inspect the names available for your specific model.
| Method | Algorithm and applicability |
|---|---|
default | Runs inap. |
exact | Compatibility alias: warns and resolves to inap; it does not select a separate exact algorithm. |
inap | RCAT fixed point for cooperating processes. Uses mean state-wise reversed-rate ratios for birth-death components and rate conservation for phase-expanded or non-birth-death components; exact when the RCAT product-form conditions hold. |
inapplus | The same RCAT solution with the reversed rate estimated by rate conservation instead. |
inapinf | Matrix-geometric decomposition of the cooperating processes on the infinite state space. |
Configuration options
The solver-specific fields below belong to options.config. Set them on an options struct, for example opt.config.name = value, and pass that struct to the solver constructor. See shared solver options for all top-level fields, shared configuration, defaults and usage. Options apply only to the methods and model features that consume them.
Relevant top-level options: iter_max, iter_tol.
AG defaults to iter_max=100. Execution is selected with config.exec, independently of the INAP method. inapinf handles the infinite tail and does not use maxStates to truncate an open agent. It supports serial and parallel execution; cluster is refused for this method.
| Option | Default | Description and values |
|---|---|---|
endpoints | {} | 'cluster' execution: worker endpoints as a cell array of 'host:port' strings. |
exec | 'serial' | Execution backend of the fixed point: 'serial' (reference), 'parallel'/'para' (parfor pool), 'cluster' (remote workers). |
maxStates | 100 | Truncation level of an open component's queue-length dimension; a closed class uses its own population instead. |
nworkers | 0 | 'parallel': pool size, 0 lets MATLAB choose the default pool. |
worker_timeout | 30 | 'cluster': seconds to wait on a worker before solving its agents locally. |
MATLAB example
model = Network('AG Example');
source = Source(model, 'source');
queue1 = Queue(model, 'queue1', SchedStrategy.FCFS);
queue2 = Queue(model, 'queue2', SchedStrategy.FCFS);
sink = Sink(model, 'sink');
jobclass = OpenClass(model, 'jobs');
source.setArrival(jobclass, Exp.fitMean(1/0.6));
queue1.setService(jobclass, Exp.fitMean(1.0));
queue2.setService(jobclass, Exp.fitMean(1/1.2));
R = model.initRoutingMatrix();
R.set(jobclass, jobclass, source, queue1, 1.0);
R.set(jobclass, jobclass, queue1, queue2, 1.0);
R.set(jobclass, jobclass, queue2, sink, 1.0);
model.link(R);
opt = SolverAG.defaultOptions();
opt.method = 'inap';
opt.config.exec = 'serial';
solver = SolverAG(model, opt);
solver.getAvgTable()