Skip to content

conjure-cp/conjure-aas

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

82 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

conjure-aas

Conjure as a service. Mainly for small example/demo jobs.

Hosted at https://conjure-aas.cs.st-andrews.ac.uk

It is running on a small VM at the School of Computer Science, University of St Andrews. Do not expect the best performance...

Conjure Client

This API provides a front-end JS client to allow developers to submit jobs through a simple interface.

Below is a simple example of how to use the client:

<script src="https://conjure-aas.cs.st-andrews.ac.uk/client.js"></script>
<script>
    const client = new ConjureClient("example-app");

    client.solve("find x: int(1..3) such that x > 2")
        .then(result => console.log(result.solution));
</script>

Options

The solve method accepts an optional object containing additional parameters:

  • The solver used by Conjure can be changed with the solver parameter and defaults to "kissat". You can find a full list of available solvers in the documentation.

  • Additional data, like variable assignments, can be given via the data parameter.

  • The options parameter allows you to pass additional command line options to Conjure. For example, to specify the number of solutions returned, you can use the --number-of-solutions option.

client.solve("given m: int, find x: int(1..3) such that x > m", {
    data: { "m": 2 },
    solver: "minion",
    options: ["--number-of-solutions", "1"],
}).then(result => console.log(result.solution));

About

Conjure as a service. Mainly for small example/demo jobs.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •