Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
vadere
vadere
Commits
5cad3b08
Commit
5cad3b08
authored
Oct 13, 2016
by
Jakob Schöttl
Browse files
Add line breaks
parent
2be636de
Changes
1
Hide whitespace changes
Inline
Side-by-side
VadereSimulator/src/org/vadere/simulator/models/seating/SeatingModel.java
View file @
5cad3b08
...
...
@@ -251,7 +251,8 @@ public class SeatingModel implements ActiveCallback, Model {
}
private
Seat
chooseSeat1
(
final
SeatGroup
seatGroup
)
{
final
EnumeratedDistribution
<
SeatRelativePosition
>
distribution
=
new
EnumeratedDistribution
<>(
rng
,
attributes
.
getSeatChoice1
());
final
EnumeratedDistribution
<
SeatRelativePosition
>
distribution
=
new
EnumeratedDistribution
<>(
rng
,
attributes
.
getSeatChoice1
());
final
SeatRelativePosition
relativePosition
=
distribution
.
sample
();
return
seatGroup
.
seatRelativeTo
(
seatGroup
.
getTheOccupiedSeat
(),
relativePosition
);
}
...
...
@@ -259,13 +260,15 @@ public class SeatingModel implements ActiveCallback, Model {
private
Seat
chooseSeat2
(
final
SeatGroup
seatGroup
)
{
if
(
seatGroup
.
onlySideChoice
())
{
// choice only between window/aisle
final
EnumeratedDistribution
<
SeatSide
>
distribution
=
new
EnumeratedDistribution
<>(
rng
,
attributes
.
getSeatChoice2Side
());
final
EnumeratedDistribution
<
SeatSide
>
distribution
=
new
EnumeratedDistribution
<>(
rng
,
attributes
.
getSeatChoice2Side
());
SeatSide
side
=
distribution
.
sample
();
return
seatGroup
.
availableSeatAtSide
(
side
);
}
else
if
(
seatGroup
.
onlyFacingDirectionChoice
())
{
// choice only between forward/backward
final
EnumeratedDistribution
<
SeatFacingDirection
>
distribution
=
new
EnumeratedDistribution
<>(
rng
,
attributes
.
getSeatChoice2FacingDirection
());
final
EnumeratedDistribution
<
SeatFacingDirection
>
distribution
=
new
EnumeratedDistribution
<>(
rng
,
attributes
.
getSeatChoice2FacingDirection
());
SeatFacingDirection
facingDirection
=
distribution
.
sample
();
return
seatGroup
.
availableSeatAtFacingDirection
(
facingDirection
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment