0

How to define CH, if both basic and list variables are included in the model, there is an error as below: The entity (class com.app.planner.domain.Machine) has both basic and list variables and cannot be deduced automatically. Maybe customize the phase configuration and add separate construction heuristic phases for each variable.

3
  • 1
    heyif: What version of Timefold are you working with? Mixed models are relatively new, so you'd need a version higher than 1.24. If the error persists, please add an issue on our GitHub so we can have a look: github.com/TimefoldAI/timefold-solver/issues Commented Sep 19 at 7:23
  • I used the version of 1.26 Commented Sep 22 at 1:14
  • Try 1.26.1. 1.26.0 had some issues apparently. But even then, 1.26 shouldn't have this issue. If it persists, please add issue on GitHub, preferably with a reproducer. Commented Sep 24 at 4:00

1 Answer 1

0

It means OptaPlanner can’t guess how to build a solution when an entity has both a basic variable like boolean or int and a list variable. You need to define separate construction heuristic phases in your solver config, one for the basic variable another for the list variable.

Sign up to request clarification or add additional context in comments.

1 Comment

list variable no need to define CH, if I define one for the basic, it also show error:"java.lang.IllegalStateException: Local Search phase (1) needs to start from an initialized solution, but planning list variable (Machine.tasks variable) has (133) unexpected unassigned values."

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.