"""Solver interface for optimization and constraint programming.

This module provides a declarative Python API for building mathematical optimization
problems that can be solved using external solvers (MiniZinc, HiGHS, Ipopt, etc.).

## Quick Start

    from relationalai.semantics import Model, Float, Integer
    from relationalai.semantics.reasoners.solvers import SolverModel

    model = Model("my_problem")
    # Use Float for HiGHS/Gurobi/Ipopt, Integer for MiniZinc.
    s = SolverModel(model, Float)

    # Define variables
    x = model.Relationship(f"{Float:x}")
    y = model.Relationship(f"{Float:y}")
    s.solve_for(x, name="x", lower=0, upper=10)
    s.solve_for(y, name="y", lower=0, upper=10)

    # Add objective
    s.minimize(x**2 + y**2)

    # Add constraints
    s.satisfy(model.require(x + y >= 5))

    # Solve
    s.solve("highs")

## Choosing numeric_type

When creating a SolverModel, the ``numeric_type`` parameter (Float or Integer)
should match your solver, not your variable types:

- Use **Float** for HiGHS, Gurobi, Ipopt — even for MIPs with integer variables.
- Use **Integer** for MiniZinc (constraint programming with integer data/solutions).

## Exports

    SolverModel: Build optimization models with variables, objectives, constraints.
    all_different: Global constraint for pairwise distinct values.
    implies: Logical implication constraint (left => right).
    special_ordered_set_type_1: SOS1 constraint (at most one variable non-zero).
    special_ordered_set_type_2: SOS2 constraint for piecewise-linear modeling.
"""

from __future__ import annotations

from .solver_model import (
    SolverModel,
    all_different,
    implies,
    special_ordered_set_type_1,
    special_ordered_set_type_2,
)

# Package version.
__version__ = "0.0.0"

__all__ = [
    "SolverModel",
    "all_different",
    "implies",
    "special_ordered_set_type_1",
    "special_ordered_set_type_2",
]
