Skip to content

This feature is currently in Preview.

Prescriptive reasoning

Use prescriptive reasoning when your question involves making a choice. This overview explains the workflow, helps you decide when prescriptive reasoning fits, and points you to the right next guide.

Prescriptive reasoning is a workflow for solving decision problems. A decision problem asks you to choose values that satisfy requirements, and optionally optimize an objective.

In PyRel, you:

  • Describe what the solver is allowed to choose by declaring decision variables. These variables represent the unknowns in your problem.
  • Add solution constraints that must be satisfied for a solution to be valid.
  • Optionally add an objective that defines what “best” means.
  • Choose a solver backend and solve.
  • Inspect the solution and decide what to do next.

Solver backend choice depends on the problem type you model. The most common categories are:

  • Linear programs, or LP: decision problems where all requirements and the objective are linear functions of the decision variables.
  • Mixed-integer linear programs, or MILP: linear programs that include both continuous and discrete decision variables.
  • Nonlinear programs, or NLP: decision problems where some requirements or the objective are nonlinear functions of the decision variables.
  • Constraint programming, or CP: decision problems where requirements are expressed as constraints on variables, and the solver searches for solutions that satisfy all constraints.

Backends differ in what they support. Some backends support continuous decision variables, some support discrete decision variables, and some support both. They also differ by which problem classes they can solve (LP, MILP, NLP, and CP).

Prescriptive reasoning does not optimize your entire semantic model. You decide which parts of the model are inputs, which relationships become decision variables, and which requirements constrain those variables.

Use prescriptive reasoning when you need to:

  • Choose an assignment, schedule, or allocation that must satisfy requirements.
  • Find a feasible choice that meets requirements.
  • Optimize trade-offs, such as minimizing cost or maximizing profit, subject to requirements.

Other types of reasoning may be a better fit if you just need to derive new facts or explore relationships in your model without making a choice.