@@ -194,6 +194,24 @@ def __init__(self):
194
194
super ().__init__ (JavaDeepPlanningClone , {})
195
195
196
196
197
+ class ConstraintConfigurationProvider (JavaAnnotation ):
198
+ def __init__ (self ):
199
+ ensure_init ()
200
+ from ai .timefold .solver .core .api .domain .constraintweight import (
201
+ ConstraintConfigurationProvider as JavaConstraintConfigurationProvider )
202
+ super ().__init__ (JavaConstraintConfigurationProvider , {})
203
+
204
+
205
+ class ConstraintWeight (JavaAnnotation ):
206
+ def __init__ (self , constraint_name : str , * , constraint_package : str = None ):
207
+ ensure_init ()
208
+ from ai .timefold .solver .core .api .domain .constraintweight import ConstraintWeight as JavaConstraintWeight
209
+ super ().__init__ (JavaConstraintWeight , {
210
+ 'value' : constraint_name ,
211
+ 'constraintPackage' : constraint_package
212
+ })
213
+
214
+
197
215
@JImplements ('ai.timefold.solver.core.api.domain.entity.PinningFilter' , deferred = True )
198
216
class _PythonPinningFilter :
199
217
def __init__ (self , delegate ):
@@ -301,6 +319,15 @@ def __init__(self, a_list):
301
319
return out
302
320
303
321
322
+ def constraint_configuration (constraint_configuration_class : Type [Solution_ ]) -> Type [Solution_ ]:
323
+ ensure_init ()
324
+ from jpyinterpreter import add_class_annotation
325
+ from ai .timefold .solver .core .api .domain .constraintweight import (
326
+ ConstraintConfiguration as JavaConstraintConfiguration )
327
+ out = add_class_annotation (JavaConstraintConfiguration )(constraint_configuration_class )
328
+ return out
329
+
330
+
304
331
def nearby_distance_meter (distance_function : Callable [[Origin_ , Destination_ ], float ], / ) \
305
332
-> Callable [[Origin_ , Destination_ ], float ]:
306
333
ensure_init ()
@@ -575,8 +602,9 @@ def wrapper_doChange(self, solution, problem_change_director):
575
602
'IndexShadowVariable' , 'AnchorShadowVariable' , 'InverseRelationShadowVariable' ,
576
603
'ProblemFactProperty' , 'ProblemFactCollectionProperty' ,
577
604
'PlanningEntityProperty' , 'PlanningEntityCollectionProperty' ,
578
- 'ValueRangeProvider' , 'DeepPlanningClone' ,
579
- 'planning_entity' , 'planning_solution' ,
605
+ 'ValueRangeProvider' , 'DeepPlanningClone' , 'ConstraintConfigurationProvider' ,
606
+ 'ConstraintWeight' ,
607
+ 'planning_entity' , 'planning_solution' , 'constraint_configuration' ,
580
608
'nearby_distance_meter' ,
581
609
'constraint_provider' , 'easy_score_calculator' , 'incremental_score_calculator' ,
582
610
'variable_listener' , 'problem_change' ]
0 commit comments