solverforge-macros 0.19.13

Derive macros for SolverForge constraint solver
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#[path = "basic_macros/domain/mod.rs"]
mod domain;

use domain::*;

fn main() {
    let plan = Plan {
        tasks: vec![Task {
            id: "pinned".into(),
            pinned: true,
            worker_idx: Some(0),
        }],
        workers: Vec::new(),
        score: None,
    };
    assert!(Plan::descriptor().entity_descriptors[0].is_pinned(&plan, 0));
}