Web Interface¶
The Savanty web interface provides a modern, browser-based experience for solving optimization problems.
Starting the Server¶
Then open http://localhost:8000 in your browser.
Custom Port¶
Production Deployment¶
For production environments, configure CORS:
Interface Overview¶
Problem Input¶
The main text area accepts your problem description in plain English. Enter your constraints, requirements, and objectives here.
Example Selector¶
Quick-start buttons load pre-written example problems:
- Nurse Scheduling - Hospital shift scheduling
- Delivery Routing - Route optimization with time windows
- Team Formation - Skill-based team building
- Wedding Seating - Event seating with constraints
Results Tabs¶
After solving, view results in three tabs:
- Visualization - A formatted display of your solution
- Raw Output - The ASP solver's raw answer set
- ASP Code - The generated logic program
Workflow¶
- Enter your problem in the text area
- Click "Solve" to submit
- Answer questions if clarification is needed
- Review results in the tabs
Question Flow¶
If Savanty needs more information, a question panel appears:
- Answer each question in the provided fields
- Click "Submit Answers" to continue
- The solver uses your answers to refine the problem
API Access¶
The web interface exposes a REST API at the same address:
Bash
curl -X POST http://localhost:8000/solve \
-H "Content-Type: application/json" \
-d '{"problem_description": "Schedule 2 workers for 2 shifts"}'
See REST API Reference for details.
Health Checks¶
For monitoring and load balancers:
GET /health- Basic health statusGET /ready- Readiness check (verifies API key)
Configuration¶
| Variable | Default | Description |
|---|---|---|
SAVANTY_PORT |
8000 |
Server port |
SAVANTY_CORS_ORIGINS |
localhost | Allowed origins (comma-separated) |
SAVANTY_ENV |
development |
Environment mode |
Browser Compatibility¶
The web interface works in modern browsers:
- Chrome 90+
- Firefox 90+
- Safari 15+
- Edge 90+
Tips¶
- Use the examples to understand the expected input format
- Check the ASP tab to understand how your problem was encoded
- Bookmark problems by saving the URL with your input