Questions tagged [optapy]
OptaPy is the AI constraint solver in Python
39
questions
-1
votes
1
answer
21
views
OptaPy quickstart crashing on mac Mini M1
Just trying out the OptaPy school timetabling quickstart on a mac Mini with M1 silicon. It crashes with the error message (below). Note that OptaPlanner quickstarts are working on the same machine, so ...
0
votes
1
answer
43
views
I think My Constraint didn't work as I intended
I'm newbie here and my English isn't that good, so I hope what I want to explain can reach all of you.
Now I am using Python library called Optapy, and I tried to try it to auto scheduling production ...
0
votes
0
answers
85
views
How to solve job scheduling problem using OptaPy?
I am working on solving a scheduling problem using OptaPy. This scheduling problem is based on assigning and scheduling unassigned task orders, each of which represents a cleaning job. The reference ...
0
votes
0
answers
47
views
Optapy/Optaplanner task for complicated logistic problem
I'd like to ask a general question. Is there any example of OptaPy/Optaplanner package to solve a model, where several trucks (with certain capacity) distribute operation machines between customers. ...
0
votes
1
answer
53
views
Optapy error with getting the rigth JAVA version and couldn't get source code in a ipynb
I am trying to use the library optapy with a conda environment created locally. I have installed all of the libraries I needes to, also installed Java JDK-17.0.6.10 and created a JAVA-HOME variable. ...
0
votes
2
answers
74
views
Optapy domain definitions help. Getting error: java.lang.VerifyError: Bad type on operand stack
I am trying to write a pilot rostering project, where pilots and copilots need to be assigned to flights ("Duty"). I'm using python because there are existing python investments at the ...
1
vote
1
answer
152
views
Choosing the employee closest to the shift's location using optapy
I'm using the employee scheduling quick start on optapy's github page. Only difference is I modified the Employee class to have the employee's home address included.
@optapy.problem_fact class ...
0
votes
1
answer
120
views
How to model a time-dependent vehicle routing problem with time windows in octapy?
I am looking to model a vehicle routing problem with time windows on OctaPy. Specifically, this problem involves traffic enforcement on public roads, so parking wardens need to survey carparks and ...
1
vote
3
answers
392
views
Is it possible to create a VRP solution using NetworkX?
Please refer to the dummy network created using networkX.
I have created a dummy network of 50 nodes (incomplete graph) in Python using the networkX package. The dummy network of nodes is represented ...
-1
votes
1
answer
82
views
Is it possible to write a combined version of the OptaPlanner's task assignment and project scheduling examples in OptaPy?
I know that custom shadow variables are currently not supported in optapy, so is there a way to solve the optimization problem below: distribute tasks from the project among employees, given that the ...
0
votes
1
answer
158
views
Optapy constraint testing
Started out using Optapy as I am slightly more familiar with python than java. I would like to write some tests for my constraints to ensure they work correctly but I can't seem to find any ...
-1
votes
2
answers
131
views
java.lang.IllegalStateException: Error occurred when wrapping object
Here is my problem to solve using optapy.
@problem_fact
class Room:
id: int
name: str
def __init__(self, id, name):
self.id = id
self.name = name
@planning_id
def ...
0
votes
1
answer
196
views
Optimizing Optapy constraints and possibly redefining classes
I started using OptaPy last week, I've read through the documentation and watched a few videos. I have a rough understanding of how things work in the big picture - but I would appreciate any input ...
0
votes
1
answer
158
views
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 ...
0
votes
1
answer
28
views
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]
...
0
votes
1
answer
89
views
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-...
0
votes
1
answer
131
views
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 ...
1
vote
0
answers
98
views
I'm working on school schedule by optapy and I'm still a beginner I want to fill in all classes with teachers,set the constraints but output the same
[These are the outputs]
[1]: https://i.stack.imgur.com/aVepW.png
constraints.py
from optapy import constraint_provider, get_class
from optapy.types import Joiners, HardSoftScore
from domain import ...
0
votes
1
answer
117
views
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 ...
0
votes
1
answer
55
views
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 ...
0
votes
1
answer
76
views
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 ...
0
votes
1
answer
98
views
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 ...
0
votes
1
answer
338
views
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....
0
votes
1
answer
187
views
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 ...
0
votes
1
answer
171
views
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(...
0
votes
1
answer
135
views
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 ...
0
votes
1
answer
101
views
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 : ...
1
vote
1
answer
68
views
How to activate FAST_ASSERT mode in Optapy
First, thanks to work on a Python version of OptaPlanner. I thinks it's a great idea. I have encountered a problem. I have a SolverConfig objectif in Optapy and I want to activate the FAST_ASSERT mode ...
0
votes
1
answer
113
views
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 ...
0
votes
1
answer
343
views
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:
0
votes
1
answer
112
views
Getting partial results from Optapy solver during running time
I am using the Optapy library in python for school timetabling optimisation. I am trying to solve complex problem, which demand long time of solving.
Is there any option to get partial results during ...
1
vote
1
answer
410
views
Optimisation algorithm, constraints and score calculation configurations with Optapy
I am using the Optapy library in python, and I am using the school timetabling instance on GitHub as a base. I have few questions regarding the library configurations:
How do I choose the ...
0
votes
1
answer
176
views
Constraint for curriculum to be met with Optapy - School timetabling optimization
I am using Optapy library in python and I want to add constraint that the curriculum needs to be met, since I get for now many unassigned lessons even though most of the timeslots and rooms are empty ...
0
votes
1
answer
259
views
School timetabling with Optapy - allow to choose teacher from a list for a lesson
I am trying to use Optapy with the school timetabling example as a base.
For any given of subject I have a list of teachers that potentially can teach this subject and each teacher can potentially ...
0
votes
1
answer
56
views
Does Optapy allow access to Optaplanner Benchmarker?
Is there a way to use the Optaplanner benchmarker using Optapy? If not, will this be added? What do you suggest to do in order to facilitate systematic benchmarking of Optapy solvers in the meantime?
1
vote
1
answer
101
views
Optapy having problems with constraints (groupBy and sum)
Just starting to test optapy, I have an error trying to use optapy, groupBy and sum:
TypeError: 'function' object is not iterable"
probably for the argument of sum. Any help?
def ...
0
votes
1
answer
176
views
OptaPy isEqual isNotEqual in python
I'm trying to schedule sports matches into timeslots and would like to not have empty timeslots during the day (so finish as early as possible). I think isEqual and isNotEqual should help, but stuck ...
1
vote
2
answers
411
views
OptaPy Constraint to groupBy 2 variables for the same target
I am trying to add a constraint_factory using OptaPy, the Python variant of OptaPlanner, (using the School Timetabling quickstart as a base) for scheduling sports matches. Each match has 2 teams, so ...
0
votes
1
answer
55
views
Can OptaPy run on GraalVM?
Given that OptaPy internally runs OptaPlanner in a JVM, can it run on GraalVM too, in graalpython?