PlanSolve is still in pre-alpha – Features may change or break. Feedback welcome!

Software Development Kits

Choose your preferred programming language and get started with PlanSolve optimization in minutes. Our SDKs provide a clean, type-safe interface to all PlanSolve APIs with complete working examples in the quick start guides.

🔷
.NET SDK
Stable
Official .NET SDK for C# and .NET applications
v1.0.0

Installation

Install-Package PlanSolve

Quick Start

using PlanSolve;
using PlanSolve.Models;

// Initialize the client
var client = new PlanSolveClient("your-api-key");

// Create a field service request
var request = new FieldServiceStartRequest
{
    Solver = "field_service",
    SouthWestCorner = new double[] { 51.45, -0.15 },
    NorthEastCorner = new double[] { 51.55, -0.05 },
    StartDateTime = DateTime.Parse("2024-01-15T08:00:00"),
    EndDateTime = DateTime.Parse("2024-01-15T18:00:00"),
    Vehicles = new List<Vehicle>
    {
        new Vehicle
        {
            Id = "1",
            HomeLocation = new double[] { 51.52, -0.1 },
            Shifts = new List<Shift>
            {
                new Shift
                {
                    Id = "full-day",
                    MinStartTime = DateTime.Parse("2024-01-15T08:00:00"),
                    MaxEndTime = DateTime.Parse("2024-01-15T18:00:00")
                }
            },
            Skills = new List<string> { "English", "Heating" }
        }
    },
    Visits = new List<Visit>
    {
        new Visit
        {
            Id = "1",
            Name = "Heating Repair",
            Location = new double[] { 51.51, -0.12 },
            TimeWindows = new List<TimeWindow>
            {
                new TimeWindow
                {
                    MinStartTime = DateTime.Parse("2024-01-15T09:00:00"),
                    MaxEndTime = DateTime.Parse("2024-01-15T12:00:00")
                }
            },
            ServiceDuration = "PT60M",
            Priority = "HIGH",
            RequiredSkills = new List<string> { "Heating" }
        }
    }
};

// Start the optimization
var result = await client.FieldService.StartAsync(request);
🟨
JavaScript/TypeScript SDK
Stable
Modern JavaScript and TypeScript SDK for web and Node.js
v1.0.0

Installation

npm install @plansolve/sdk

Quick Start

import { PlanSolveClient } from '@plansolve/sdk';

// Initialize the client
const client = new PlanSolveClient('your-api-key');

// Create a field service request
const request = {
  solver: 'field_service',
  southWestCorner: [51.45, -0.15],
  northEastCorner: [51.55, -0.05],
  startDateTime: '2024-01-15T08:00:00',
  endDateTime: '2024-01-15T18:00:00',
  vehicles: [
    {
      id: '1',
      homeLocation: [51.52, -0.1],
      shifts: [
        {
          id: 'full-day',
          minStartTime: '2024-01-15T08:00:00',
          maxEndTime: '2024-01-15T18:00:00'
        }
      ],
      skills: ['English', 'Heating']
    }
  ],
  visits: [
    {
      id: '1',
      name: 'Heating Repair',
      location: [51.51, -0.12],
      timeWindows: [
        {
          minStartTime: '2024-01-15T09:00:00',
          maxEndTime: '2024-01-15T12:00:00'
        }
      ],
      serviceDuration: 'PT60M',
      priority: 'HIGH',
      requiredSkills: ['Heating']
    }
  ]
};

// Start the optimization
const result = await client.fieldService.start(request);

Need Help Getting Started?

Check out our comprehensive guides and examples for each SDK.