agentjs-core
Version:
A comprehensive agent-based modeling framework with built-in p5.js visualization
47 lines • 1.97 kB
TypeScript
import type { DataCollector } from './DataCollector';
import type { StatisticsEngine } from './StatisticsEngine';
export interface ExportOptions {
format: 'csv' | 'json' | 'xlsx';
includeTimestamps: boolean;
includeMetadata: boolean;
dateFormat: 'iso' | 'unix' | 'readable';
precision: number;
compression: boolean;
}
export interface ExportResult {
data: string | Uint8Array;
filename: string;
mimeType: string;
size: number;
}
export declare class DataExporter {
private dataCollector;
private statisticsEngine;
constructor(dataCollector: DataCollector, statisticsEngine?: StatisticsEngine);
exportTimeSeries(seriesNames?: string[], options?: Partial<ExportOptions>): Promise<ExportResult>;
exportSimulationHistory(options?: Partial<ExportOptions>): Promise<ExportResult>;
exportAgentHistory(agentIds?: string[], options?: Partial<ExportOptions>): Promise<ExportResult>;
exportStatistics(options?: Partial<ExportOptions>): Promise<ExportResult>;
exportComplete(options?: Partial<ExportOptions>): Promise<ExportResult>;
private mergeExportOptions;
private prepareTimeSeriesData;
private prepareSimulationHistoryData;
private prepareAgentHistoryData;
private prepareStatisticsData;
private formatTimestamp;
private formatNumber;
private exportToCSV;
private exportToJSON;
private exportToXLSX;
downloadExport(exportResult: ExportResult): void;
saveToFile(exportResult: ExportResult, _customFilename?: string): Promise<void>;
exportAllFormats(dataType: 'timeSeries' | 'simulationHistory' | 'agentHistory' | 'statistics' | 'complete', options?: Partial<ExportOptions>): Promise<ExportResult[]>;
getExportSummary(): {
availableTimeSeries: string[];
simulationHistoryLength: number;
trackedAgents: number;
hasStatistics: boolean;
supportedFormats: string[];
};
}
//# sourceMappingURL=DataExporter.d.ts.map