Example: Autonomic Parallel Matrix Multiplication
ce4_agency.c
#include <stdio.h>
#include <libmc.h>

int main(int argc, char *argv[]) {
  MCAgency_t agency;
  int port = 5050;

  agency = MC_Initialize(port, NULL);
  MC_LoadAgentFromFile(agency, "agent/regulating_agent4.xml");
  MC_MainLoop(agency);

  return 0;
}
  
ce1_agency.c
#include <stdio.h>
#include <libmc.h>

int main(int argc, char *argv[]) {
  MCAgency_t agency;
  int port = 5050;

  agency = MC_Initialize(port, NULL);
  MC_LoadAgentFromFile(agency, "agent/regulating_agent1.xml");
  MC_MainLoop(agency);

  return 0;
}
  
ce2_agency.c
#include <stdio.h>
#include <libmc.h>

int main(int argc, char *argv[]) {
  MCAgency_t agency;
  int port = 5050;

  agency = MC_Initialize(port, NULL);
  MC_LoadAgentFromFile(agency, "agent/regulating_agent2.xml");
  MC_MainLoop(agency);

  return 0;
}
  
ce3_agency.c
#include <stdio.h>
#include <libmc.h>

int main(int argc, char *argv[]) {
  MCAgency_t agency;
  int port = 5050;

  agency = MC_Initialize(port, NULL);
  MC_LoadAgentFromFile(agency, "agent/regulating_agent3.xml");
  MC_MainLoop(agency);

  return 0;
}