JijSolver Optimization Solver for Practical Problems

A mathematical optimization solver made by Jij. It supports a wide range of problem classes, making it suitable for solving practical problems.

Features

No Complex Parameter Configuration Required

While typical optimization solvers require setting multiple parameters, JijSolver can be used by specifying just one parameter.

Supports Many Practical Problems

Provides feasible solutions for practical problems in a short time.

Available On-Premises

On-premises deployment is available to meet requirements for handling confidential data securely and performing calculations in your own environment.

Quick Start

Here's how to execute JijSolver via Web API using the JijSolver API Free Version.

1

Application

To use the JijSolver API Free Version, please first apply through the application form.

JijSolverAPI Free Version Application Form
2

Installation

Install the JijSolver API client package.

pip install jijsolver-api-client
3

Environment Variable Setup

Set the following values obtained through the application process as environment variables:

  • JIJSOLVER_SERVER_HOST: API server hostname
  • JIJSOLVER_ACCESS_TOKEN: Access token

Setup Examples

Environment variable setup example:


export JIJSOLVER_SERVER_HOST="API server hostname"
export JIJSOLVER_ACCESS_TOKEN="Access token"
                  

Or example of setting within Python code:


import os

os.environ["JIJSOLVER_SERVER_HOST"] = "API server hostname"
os.environ["JIJSOLVER_ACCESS_TOKEN"] = "Access token"
                  
4

Knapsack Problem Example

Since JijModeling is used in the execution example, please install it in advance.

pip install jijmodeling

Example of solving a knapsack problem:


import logging
import jijsolver
import jijmodeling as jm

logging.basicConfig(level=logging.INFO)

# Define knapsack problem
v = jm.Placeholder("v", ndim=1)  # Item values
w = jm.Placeholder("w", ndim=1)  # Item weights
W = jm.Placeholder("W")  # Knapsack capacity
N = v.len_at(0, latex="N")  # Number of items
x = jm.BinaryVar("x", shape=(N,))  # Decision variables
i = jm.Element("i", belong_to=(0, N))

problem = jm.Problem("Knapsack", sense=jm.ProblemSense.MAXIMIZE)
problem += jm.sum(i, v[i] * x[i])  # Objective function: maximize value
problem += jm.Constraint("weight", jm.sum(i, w[i] * x[i]) <= W)  # Weight constraint

# Instance data
instance_data = {
    "v": [10, 13, 18, 31, 7, 15],  # Item values
    "w": [11, 15, 20, 35, 10, 33],  # Item weights
    "W": 47,  # Knapsack capacity
}

# Create OMMX instance
interpreter = jm.Interpreter(instance_data)
instance = interpreter.eval_problem(problem)

# Execute API request
solution = jijsolver.solve(instance, time_limit_sec=2.0)
print(f"Value of the objective function: {solution.objective}")
                  

Using JijZept IDE

JijSolver can also be used from the integrated development environment JijZept IDE.

When using JijZept IDE, the environment setup and API token configuration described in the Quick Start above are not required.

JijZept IDE is a cloud service that provides all the tools needed for mathematical optimization with just a login, enabling mathematical optimization development without the hassle of environment setup or tool selection.

Feel free to contact us

Expert staff with advanced optimization skills will answer your business concerns and questions.

Easy completion with just your email address and basic information.