General Workflow#
The typical workflow for using DecisionAI consists of four main steps:
1. Code the Base Model#
First, create a base optimization model that defines the structure of your problem. This involves:
Creating an
InputDataclass to define your data structureDefining a
PulpVariablesclass for your decision variablesImplementing a
PulpDecisionAIModelclass containingObjective function
Base constraints
Solution string representation
For detailed instructions and examples, see Setting Up the Base Model.
2. Deploy the Model#
You can deploy your model in two ways:
Using the CLI
Use the DecisionAI CLI tools to initialize and deploy your model. The configuration will be written to your pyproject.toml.
Using Python
Alternatively, use the Python interface to programmatically deploy your model using the DecisionAI client.
For detailed deployment instructions, see Deploying Models.
3. Start a Chat Session#
Once deployed, create a new chat session to interact with your model. The chat session allows you to:
Add new constraints using natural language
Modify existing constraints
Ask the AI to solve the model
Each constraint added during the chat is stored and persists throughout the session.
For details on starting and using chat sessions, see Starting a Chat Session.
4. Solve the Model#
There are two ways to solve your model:
Get and solve the model yourself
Request the current model code
Solve it client-side
Full control over the solving process
Let DecisionAI solve it
Ask the AI through the chat interface
Model is solved automatically
Simple, guided approach
For more information about solving models, see Starting a Chat Session.