deltamesh-federated-privacy.../delta_mesh/demo_main.c

17 lines
460 B
C

#include <stdio.h>
#include "LocalMarket.h"
#include "admm_lite.h"
// A tiny demo that creates two LocalMarkets and demonstrates a simple ADMM-lite step.
int main(void) {
LocalMarket v1 = {"VenueA", 100.0, 50.0};
LocalMarket v2 = {"VenueB", 150.0, 75.0};
double quotes[2] = { v1.inventory, v2.inventory };
double aggregate = 0.0;
admm_lite_step(quotes, 2, &aggregate);
printf("DeltaMesh DEMO: aggregated quote = %f\n", aggregate);
return 0;
}