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 InputData class to define your data structure

  • Defining a PulpVariables class for your decision variables

  • Implementing a PulpDecisionAIModel class containing

    • Objective 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:

  1. Get and solve the model yourself

    • Request the current model code

    • Solve it client-side

    • Full control over the solving process

  2. 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.