set maxiob=0 only for objective 4
This commit is contained in:
parent
1c65a88e49
commit
ef2a565c18
2 changed files with 7 additions and 6 deletions
|
@ -197,6 +197,7 @@ public class ObjectivesFragment extends Fragment {
|
|||
ObjectivesPlugin.objectives.get(4).objective = MainApp.sResources.getString(R.string.objectives_4_objective);
|
||||
ObjectivesPlugin.objectives.get(5).objective = MainApp.sResources.getString(R.string.objectives_5_objective);
|
||||
ObjectivesPlugin.objectives.get(6).objective = MainApp.sResources.getString(R.string.objectives_6_objective);
|
||||
ObjectivesPlugin.objectives.get(7).objective = MainApp.sResources.getString(R.string.objectives_7_objective);
|
||||
ObjectivesPlugin.objectives.get(0).gate = MainApp.sResources.getString(R.string.objectives_0_gate);
|
||||
ObjectivesPlugin.objectives.get(1).gate = MainApp.sResources.getString(R.string.objectives_1_gate);
|
||||
ObjectivesPlugin.objectives.get(2).gate = MainApp.sResources.getString(R.string.objectives_2_gate);
|
||||
|
|
|
@ -320,12 +320,12 @@ public class ObjectivesPlugin implements PluginBase, ConstraintsInterface {
|
|||
|
||||
@Override
|
||||
public Double applyMaxIOBConstraints(Double maxIob) {
|
||||
if (objectives.get(4).started.getTime() > 0 || objectives.get(2).accomplished.getTime() == 0)
|
||||
return maxIob;
|
||||
else {
|
||||
if (objectives.get(3).started.getTime() > 0 && objectives.get(3).accomplished.getTime() == 0) {
|
||||
if (Config.logConstraintsChanges)
|
||||
log.debug("Limiting maxIOB " + maxIob + " to " + 0 + "U");
|
||||
return 0d;
|
||||
} else {
|
||||
return maxIob;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue