• Initialises MiniZinc.

    Calling this function is generally optional, but may be required if the library is unable to automatically find the minizinc-worker.js script in the browser, or the MiniZinc executable on NodeJS.

    Parameters

    Returns Promise<void>

    Example

    // In the browser
    MiniZinc.init({ workerURL: 'https://localhost:3000/minizinc-worker.js'} );
    // In NodeJS
    MiniZinc.init({ minizinc: '/path/to/minizinc' });

    It may also be useful to call in the browser to get a promise which resolves when the WebAssembly module has been loaded.

    Example

    MiniZinc.init().then(() => {
    console.log('Ready to start solving');
    });

Generated using TypeDoc