| Chunk |
|---|
| Conflicting content |
|---|
// TODO adjust hack for CCS
<<<<<<< HEAD
if (me.getLongitudinalModel().modelName() == ModelName.CCS ) {
=======
if (me.getLongitudinalModel().modelName() == ModelName.CCS) {
double biasForced = 10000;
double biasNormal = 0.2;
double bias;
final int laneCount = roadSegment.laneCount();
>>>>>>> f0c092f3760ddeb209017a9ead5dd72c59405150
if (roadSegment.laneSegment(currentLane).type() == Lane.Type.ENTRANCE) {
double factor=(currentLane>0.5*(laneCount-1))
? (laneCount-currentLane) : (currentLane+1); |
| Solution content |
|---|
// TODO adjust hack for CCS
if (me.getLongitudinalModel().modelName() == ModelName.CCS) {
double biasForced = 10000;
double biasNormal = 0.2;
double bias;
final int laneCount = roadSegment.laneCount();
if (roadSegment.laneSegment(currentLane).type() == Lane.Type.ENTRANCE) {
double factor=(currentLane>0.5*(laneCount-1))
? (laneCount-currentLane) : (currentLane+1); |
| File |
|---|
| MOBIL.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| If statement |
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
return biasForced*factor;
} else {
<<<<<<< HEAD
// bias towards middle lanes:
int biasSign = -1;
// assume increasing lane index from right to left
final int laneCount = roadSegment.laneCount();
if ((currentLane+6 < laneCount/2 && changeTo == MovsimConstants.TO_LEFT) || (currentLane-6 > laneCount/2 && changeTo == MovsimConstants.TO_RIGHT)){
biasSign = 1; // in favor of changing to the middle
}
prospectiveBalance = meDiffAcc + politeness * (oldBackDiffAcc + newBackDiffAcc) - threshold + biasSign
* biasRight;
=======
// assume increasing lane index from right to left
bias = +2 * biasNormal / (laneCount - 1) * (currentLane - (0.5 * (laneCount - 1)));
>>>>>>> f0c092f3760ddeb209017a9ead5dd72c59405150
}
prospectiveBalance = meDiffAcc + politeness * (oldBackDiffAcc + newBackDiffAcc) - threshold -bias*direction; |
| Solution content |
|---|
return biasForced*factor;
} else {
// assume increasing lane index from right to left
bias = +2 * biasNormal / (laneCount - 1) * (currentLane - (0.5 * (laneCount - 1)));
}
prospectiveBalance = meDiffAcc + politeness * (oldBackDiffAcc + newBackDiffAcc) - threshold -bias*direction; |
| File |
|---|
| MOBIL.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Attribute |
| Comment |
| If statement |
| Method invocation |
| Variable |