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
1
vote
1 answer

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 Employee: name: str skill_set: list[str] address:…
fuchcar
  • 15
  • 4
1
vote
3 answers

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 by the above diagrams diagrams. I have…
Saugata Paul
  • 59
  • 1
  • 9
1
vote
0 answers

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 TimeTable, Lesson, Room from datetime import…
mery
  • 11
  • 2
1
vote
1 answer

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 without passing by the XML file but I can't find…
1
vote
1 answer

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 optimisation algorithm (e.g. tabu search or simulated…
IsKan
  • 17
  • 5
1
vote
1 answer

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 lecturer_teaching_load(constraint_factory: ConstraintFactory): …
Raul
  • 11
  • 1
1
vote
2 answers

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 there are 2 variables in the Match class : team1…
Hebbs
  • 17
  • 2
0
votes
1 answer

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 in my factory. I set Schedule Class as a planning…
0
votes
0 answers

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 for this task is the "scheduling dataset." Each…
Saugata Paul
  • 59
  • 1
  • 9
0
votes
0 answers

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. The operation of the machine at the customer place…
Josef
  • 1
0
votes
1 answer

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. But when I try to run and try to use optapy it…
vctrgv
  • 1
0
votes
2 answers

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 client. I'm basing this POC off of the optapy Employee…
Andrew M
  • 83
  • 5
0
votes
1 answer

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 road segments and visit them more than once during a…
kangsoon93
  • 11
  • 3
0
votes
1 answer

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 documentation or examples of a test class in python and how…
0
votes
1 answer

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 and tips for optimization. I am trying to generate…
1
2 3