Questions tagged [optapy]

OptaPy is the AI constraint solver in Python

Tag for OptaPy, the AI constraint solver in Python for the vehicle routing problem, employee rostering, maintenance scheduling, school timetabling, etc. Sibling project of OptaPlanner.

39 questions
0
votes
1 answer

Optapy How to deal with contraints with planning variable as a list

We are try to use EmployeeSchedule algorithm for n-n shift-employee schedule. But the algorithm assigns only one employee per shift. For this case we find that we need to use planning_variable_list decorator (as shown as in the vehicle algorihm) and…
0
votes
1 answer

java.lang.IllegalStateException: 2 members with a @ValueRangeProvider annotation must not have the same id (timeslotRangeLS)

Trying to generate school timetable with lab hours. Kindly help me to solve this error! Thanks in advance. Here is my code! @planning_solution class TimeTable: timeslot_list: list[Timeslot] timeslot_list1: list[Timeslot] room_list:…
VijiS
  • 1
  • 2
0
votes
1 answer

Optapy error at "solver_manager_create(solver_config)"

I am trying to run solver_manager_create method as it shown in the quick start code in optapy repo (https://github.com/optapy/optapy-quickstarts/blob/04fd102ee31919cacc4145d0517fe07b2627ca02/employee-scheduling/services.py#L168) SINGLETON_ID =…
0
votes
1 answer

How to measure workload balance by using variance in Optapy

I am new to use this OptaPy solver. I'm trying to solve my workload balance problem by using it. My assignment problem is: I have a list of users and a list of jobs. Each job requires only one user from a user list base on its business requirements.…
Meccanico
  • 1
  • 1
0
votes
1 answer

Inheritance of OptaPy planning_entitiy classes?

I'm working on a schedule optimization solution with Optapy. I'm trying like to make a chained planned variable, which should include multiple types of actual entities in the chain. Something like this: @planning_entity class Slot: """ Schedule…
kol
  • 126
  • 1
  • 5
0
votes
1 answer

Optapy: Java type cast error while using several @custom_shadow_variable

I'm trying to use OptaPy for inspector's schedule optimization. I've tried to add a shadow variable, which must be updated along with another variable. Docs recommend to annotate one shadow variable with custom VariableListener and make others refer…
kol
  • 126
  • 1
  • 5
0
votes
1 answer

Integrating Optapy into Node JS web service

I am working on a project in which I need to run a python script which is based on an optapy solution. So after running the web service, I was expecting to get as response the solution provided by optapy. But I just received this line which is…
0
votes
1 answer

Solving integer network flow problem using OptaPlanner

I am new to OptaPlanner and would like to test its capabilities on an integer network flow problem. The problem I am trying to model is relatively simple: We are given a directed graph with nodes and edges (where edges are (node from, node to)…
Fabian
  • 3
  • 1
0
votes
1 answer

Optapy Error "RuntimeError: An error occurred during solving. This can occur when functions take the wrong number of parameters"

I am working on an optapy project and I am getting this error in the solver phase. return _unwrap_java_object(self._java_solve(wrapped_problem)) java.lang.java.lang.IllegalStateException: java.lang.IllegalStateException: Error occurred when wrapping…
0
votes
1 answer

Optapy : Use toList function on group by from two joined classes - TypeError : No matching overloads

I am currently working on an employee rostering problem in which one constraint's goal is to avoid gaps in an employee schedule using a constraint stream. The idea is to get for each employee the timeslots they are assigned to along with their…
0
votes
1 answer

Optapy Error "return SolverFactory.create(solver_config) TypeError: Unable to convert"

I am working on an optapy project and I am getting this error in the solver phase. \optapy\optaplanner_api_wrappers.py", line 310, in solver_factory_create return SolverFactory.create(solver_config) TypeError: Unable to convert You can find…
0
votes
1 answer

Is there a way of installing OptaPy in Kaggle?

I want to try out OptaPy in a Kaggle notebook, but I fell at the first hurdle when I tried to install it: !pip install optapy ERROR: Ignored the following versions that require a different python version: 8.11.0a0 Requires-Python >=3.9; 8.11.0a1…
0
votes
1 answer

How to define a constraint in OptaPy for a list of element

I have some difficult to create one of my constraint. The structure of my problem is something like this class ToolFact: id : str type : str @planning_entity class SubObjectFact: id : str tool : ToolFact @planning_entity class…
0
votes
1 answer

Shadow variable in optapy is not updated as expected

This clarification makes a lot of sense to me, but if I try and apply the reasoning to the code below (which is based on the employee scheduling example available in optapy) I would have expected set_timeslot_list to be called when set_task is…
Andrea
  • 5
  • 1
0
votes
1 answer

Could not find a version that satisfies the requirement optapy (from versions: none)

I am getting this error when I am trying to install optapy:
Hoda
  • 36
  • 6