public void UpdateMaximizeSegmentDuration(double value) { if (rowMaximizeSegment == -1) { rowMaximizeSegment = lp.AddConstraint(true); } lp.SetConstraintRHS(rowMaximizeSegment, lp.GetConstraintRHS(rowMaximizeSegment) - value); compactSolution = null; needsDual = true; }