Skip to content

Commit

Permalink
docs: fix InverseRelationShadowVariable code snippet (#1066)
Browse files Browse the repository at this point in the history
InverseRelationShadowVariable is on a collection of the holder of the
relationship. For instance, see the `Consumer` to `Facility` in the
`facility-location` quickstart project.
  • Loading branch information
RutgerLubbers committed Sep 2, 2024
1 parent 3d56855 commit 3b01463
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -619,7 +619,7 @@ Java::
public class Timeslot {

@InverseRelationShadowVariable(sourceVariableName = "timeslot")
public List<Timeslot> timeslotList;
public List<Lesson> lessons;

...

Expand All @@ -632,7 +632,7 @@ Python::
----
@planning_entity
class Timeslot:
timeslot_list: Annotated[list[Timeslot], InverseRelationShadowVariable(source_variable_name ="timeslot")]
lesson_list: Annotated[list[Lesson], InverseRelationShadowVariable(source_variable_name ="timeslot")]
...
----
====
Expand Down Expand Up @@ -2791,4 +2791,4 @@ def generate_demo_data(demo_data: DemoData) -> Timetable:
====
Usually, most of this data comes from your data layer,
and your solution implementation just aggregates that data and creates the uninitialized planning entity instances for the solver to plan.
and your solution implementation just aggregates that data and creates the uninitialized planning entity instances for the solver to plan.

0 comments on commit 3b01463

Please sign in to comment.