open-energymesh-offline-fir.../dsl/local_problem_seed.js

24 lines
504 B
JavaScript

// Lightweight DSL seeds for LocalProblem / SharedVariables / PlanDelta
class LocalProblem {
constructor(id) {
this.id = id;
this.vars = {}; // numeric targets or decision vars
this.objective = 0;
}
}
class SharedVariables {
constructor() {
this.values = {}; // priors, multipliers, signals
}
}
class PlanDelta {
constructor(planId) {
this.planId = planId;
this.changes = []; // minimal change log
}
}
module.exports = { LocalProblem, SharedVariables, PlanDelta };