Skip to content

Commit

Permalink
Update Optimisation.java
Browse files Browse the repository at this point in the history
  • Loading branch information
apete committed Nov 30, 2024
1 parent da6eec3 commit e32af89
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/main/java/org/ojalgo/optimisation/Optimisation.java
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,10 @@ public Options() {
super();
}

/**
* Set the {@link #time_abort} to the given duration. A duration may be constructed this way:
* <code>CalendarDateUnit.HOUR.newDuration(0.5)</code>.
*/
public Options abort(final CalendarDateDuration duration) {
ProgrammingError.throwIfNull(duration);
time_abort = duration.toDurationInMillis();
Expand Down Expand Up @@ -390,6 +394,10 @@ public void setConfigurator(final Object configurator) {
myConfigurator = configurator;
}

/**
* Set the {@link #time_suffice} to the given duration. A duration may be constructed this way:
* <code>CalendarDateUnit.HOUR.newDuration(0.5)</code>.
*/
public Options suffice(final CalendarDateDuration duration) {
ProgrammingError.throwIfNull(duration);
time_suffice = duration.toDurationInMillis();
Expand Down

0 comments on commit e32af89

Please sign in to comment.