Loading solver…
Problem: inspect the protobuf schemas embedded in the WebAssembly package so raw model structures are easier to understand.
import { CpSat } from 'or-tools-wasm/cp-sat';
const schemas = await CpSat.getSchemas();
console.log(schemas.cp_model);
console.log(schemas.sat_parameters);
This demo calls the WASM exports that expose the embedded cp_model.proto
and sat_parameters.proto
schemas and prints their contents.
CpModelProto defines variables, constraints, objectives, and search hints.SatParameters defines solver configuration such as time limits and workers.