Skip to content

Commit

Permalink
DailyOcupation, Session Settings and TeachersOptimization updated
Browse files Browse the repository at this point in the history
  • Loading branch information
dburgos92 committed Feb 28, 2024
1 parent 2e2c3af commit 5353aab
Show file tree
Hide file tree
Showing 4 changed files with 251 additions and 50 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@

package com.penalara.ghc.jsonghcfile.engineghcfile;

import java.util.LinkedHashMap;
import java.util.Map;
import com.fasterxml.jackson.annotation.JsonAnyGetter;
import com.fasterxml.jackson.annotation.JsonAnySetter;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyDescription;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;


/**
* ConditionOcupancy
* <p>
* Indicates the condition type, the total minutes, the variation with the asisted time and if the ocupancy also takes the free days or not
*
*/
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({
"type",
"minutes",
"isAssisted",
"variationTime"
})
public class ConditionOcupancy {

/**
* ConditionType
* <p>
* Indicate whether the incompatibility is strict, avoid (penalisable in optimisation) or ignored.
*
*/
@JsonProperty("type")
@JsonPropertyDescription("Indicate whether the incompatibility is strict, avoid (penalisable in optimisation) or ignored.")
private ConditionType type;
/**
* Custom total time in minutes for the ocupancy.
*
*/
@JsonProperty("minutes")
@JsonPropertyDescription("Custom total time in minutes for the ocupancy.")
private Integer minutes;
/**
* Indicates if the field is assigned manualy or with the assisted mode
*
*/
@JsonProperty("isAssisted")
@JsonPropertyDescription("Indicates if the field is assigned manualy or with the assisted mode")
private Boolean isAssisted;
/**
* time in minutes you add to the assisted time so you generate the total time
*
*/
@JsonProperty("variationTime")
@JsonPropertyDescription("time in minutes you add to the assisted time so you generate the total time")
private Integer variationTime;
@JsonIgnore
private Map<String, Object> additionalProperties = new LinkedHashMap<String, Object>();

/**
* ConditionType
* <p>
* Indicate whether the incompatibility is strict, avoid (penalisable in optimisation) or ignored.
*
*/
@JsonProperty("type")
public ConditionType getType() {
return type;
}

/**
* ConditionType
* <p>
* Indicate whether the incompatibility is strict, avoid (penalisable in optimisation) or ignored.
*
*/
@JsonProperty("type")
public void setType(ConditionType type) {
this.type = type;
}

/**
* Custom total time in minutes for the ocupancy.
*
*/
@JsonProperty("minutes")
public Integer getMinutes() {
return minutes;
}

/**
* Custom total time in minutes for the ocupancy.
*
*/
@JsonProperty("minutes")
public void setMinutes(Integer minutes) {
this.minutes = minutes;
}

/**
* Indicates if the field is assigned manualy or with the assisted mode
*
*/
@JsonProperty("isAssisted")
public Boolean getIsAssisted() {
return isAssisted;
}

/**
* Indicates if the field is assigned manualy or with the assisted mode
*
*/
@JsonProperty("isAssisted")
public void setIsAssisted(Boolean isAssisted) {
this.isAssisted = isAssisted;
}

/**
* time in minutes you add to the assisted time so you generate the total time
*
*/
@JsonProperty("variationTime")
public Integer getVariationTime() {
return variationTime;
}

/**
* time in minutes you add to the assisted time so you generate the total time
*
*/
@JsonProperty("variationTime")
public void setVariationTime(Integer variationTime) {
this.variationTime = variationTime;
}

@JsonAnyGetter
public Map<String, Object> getAdditionalProperties() {
return this.additionalProperties;
}

@JsonAnySetter
public void setAdditionalProperty(String name, Object value) {
this.additionalProperties.put(name, value);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -31,41 +31,41 @@ public class DailyOcupation {
@JsonPropertyDescription("It indicates whether checking of minimums is omitted in the case of non-assigned days. Forbidden days are never checked.")
private Boolean allowFreeDays;
/**
* ConditionTypeWithTime
* ConditionOcupancy
* <p>
* Indicate condition with time wich can be strict, avoid (penalisable in optimisation) or ignored.
* Indicates the condition type, the total minutes, the variation with the asisted time and if the ocupancy also takes the free days or not
*
*/
@JsonProperty("minimumTeaching")
@JsonPropertyDescription("Indicate condition with time wich can be strict, avoid (penalisable in optimisation) or ignored.")
private ConditionTypeWithTime minimumTeaching;
@JsonPropertyDescription("Indicates the condition type, the total minutes, the variation with the asisted time and if the ocupancy also takes the free days or not")
private ConditionOcupancy minimumTeaching;
/**
* ConditionTypeWithTime
* ConditionOcupancy
* <p>
* Indicate condition with time wich can be strict, avoid (penalisable in optimisation) or ignored.
* Indicates the condition type, the total minutes, the variation with the asisted time and if the ocupancy also takes the free days or not
*
*/
@JsonProperty("maximumTeaching")
@JsonPropertyDescription("Indicate condition with time wich can be strict, avoid (penalisable in optimisation) or ignored.")
private ConditionTypeWithTime maximumTeaching;
@JsonPropertyDescription("Indicates the condition type, the total minutes, the variation with the asisted time and if the ocupancy also takes the free days or not")
private ConditionOcupancy maximumTeaching;
/**
* ConditionTypeWithTime
* ConditionOcupancy
* <p>
* Indicate condition with time wich can be strict, avoid (penalisable in optimisation) or ignored.
* Indicates the condition type, the total minutes, the variation with the asisted time and if the ocupancy also takes the free days or not
*
*/
@JsonProperty("minimumOccupancy")
@JsonPropertyDescription("Indicate condition with time wich can be strict, avoid (penalisable in optimisation) or ignored.")
private ConditionTypeWithTime minimumOccupancy;
@JsonPropertyDescription("Indicates the condition type, the total minutes, the variation with the asisted time and if the ocupancy also takes the free days or not")
private ConditionOcupancy minimumOccupancy;
/**
* ConditionTypeWithTime
* ConditionOcupancy
* <p>
* Indicate condition with time wich can be strict, avoid (penalisable in optimisation) or ignored.
* Indicates the condition type, the total minutes, the variation with the asisted time and if the ocupancy also takes the free days or not
*
*/
@JsonProperty("maximumOccupancy")
@JsonPropertyDescription("Indicate condition with time wich can be strict, avoid (penalisable in optimisation) or ignored.")
private ConditionTypeWithTime maximumOccupancy;
@JsonPropertyDescription("Indicates the condition type, the total minutes, the variation with the asisted time and if the ocupancy also takes the free days or not")
private ConditionOcupancy maximumOccupancy;

/**
* It indicates whether checking of minimums is omitted in the case of non-assigned days. Forbidden days are never checked.
Expand All @@ -86,90 +86,90 @@ public void setAllowFreeDays(Boolean allowFreeDays) {
}

/**
* ConditionTypeWithTime
* ConditionOcupancy
* <p>
* Indicate condition with time wich can be strict, avoid (penalisable in optimisation) or ignored.
* Indicates the condition type, the total minutes, the variation with the asisted time and if the ocupancy also takes the free days or not
*
*/
@JsonProperty("minimumTeaching")
public ConditionTypeWithTime getMinimumTeaching() {
public ConditionOcupancy getMinimumTeaching() {
return minimumTeaching;
}

/**
* ConditionTypeWithTime
* ConditionOcupancy
* <p>
* Indicate condition with time wich can be strict, avoid (penalisable in optimisation) or ignored.
* Indicates the condition type, the total minutes, the variation with the asisted time and if the ocupancy also takes the free days or not
*
*/
@JsonProperty("minimumTeaching")
public void setMinimumTeaching(ConditionTypeWithTime minimumTeaching) {
public void setMinimumTeaching(ConditionOcupancy minimumTeaching) {
this.minimumTeaching = minimumTeaching;
}

/**
* ConditionTypeWithTime
* ConditionOcupancy
* <p>
* Indicate condition with time wich can be strict, avoid (penalisable in optimisation) or ignored.
* Indicates the condition type, the total minutes, the variation with the asisted time and if the ocupancy also takes the free days or not
*
*/
@JsonProperty("maximumTeaching")
public ConditionTypeWithTime getMaximumTeaching() {
public ConditionOcupancy getMaximumTeaching() {
return maximumTeaching;
}

/**
* ConditionTypeWithTime
* ConditionOcupancy
* <p>
* Indicate condition with time wich can be strict, avoid (penalisable in optimisation) or ignored.
* Indicates the condition type, the total minutes, the variation with the asisted time and if the ocupancy also takes the free days or not
*
*/
@JsonProperty("maximumTeaching")
public void setMaximumTeaching(ConditionTypeWithTime maximumTeaching) {
public void setMaximumTeaching(ConditionOcupancy maximumTeaching) {
this.maximumTeaching = maximumTeaching;
}

/**
* ConditionTypeWithTime
* ConditionOcupancy
* <p>
* Indicate condition with time wich can be strict, avoid (penalisable in optimisation) or ignored.
* Indicates the condition type, the total minutes, the variation with the asisted time and if the ocupancy also takes the free days or not
*
*/
@JsonProperty("minimumOccupancy")
public ConditionTypeWithTime getMinimumOccupancy() {
public ConditionOcupancy getMinimumOccupancy() {
return minimumOccupancy;
}

/**
* ConditionTypeWithTime
* ConditionOcupancy
* <p>
* Indicate condition with time wich can be strict, avoid (penalisable in optimisation) or ignored.
* Indicates the condition type, the total minutes, the variation with the asisted time and if the ocupancy also takes the free days or not
*
*/
@JsonProperty("minimumOccupancy")
public void setMinimumOccupancy(ConditionTypeWithTime minimumOccupancy) {
public void setMinimumOccupancy(ConditionOcupancy minimumOccupancy) {
this.minimumOccupancy = minimumOccupancy;
}

/**
* ConditionTypeWithTime
* ConditionOcupancy
* <p>
* Indicate condition with time wich can be strict, avoid (penalisable in optimisation) or ignored.
* Indicates the condition type, the total minutes, the variation with the asisted time and if the ocupancy also takes the free days or not
*
*/
@JsonProperty("maximumOccupancy")
public ConditionTypeWithTime getMaximumOccupancy() {
public ConditionOcupancy getMaximumOccupancy() {
return maximumOccupancy;
}

/**
* ConditionTypeWithTime
* ConditionOcupancy
* <p>
* Indicate condition with time wich can be strict, avoid (penalisable in optimisation) or ignored.
* Indicates the condition type, the total minutes, the variation with the asisted time and if the ocupancy also takes the free days or not
*
*/
@JsonProperty("maximumOccupancy")
public void setMaximumOccupancy(ConditionTypeWithTime maximumOccupancy) {
public void setMaximumOccupancy(ConditionOcupancy maximumOccupancy) {
this.maximumOccupancy = maximumOccupancy;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
"avoidAssingLastHourAndFirstNextDay",
"sameHourPreference",
"avoidAfternoonSessions",
"avoidSectionsAfterBreak",
"avoidAfterBreakSessions",
"nonBreakInTheMiddleOfConsecutiveSession",
"nonBreakInTheMiddleOfSession",
"followedDaysPreference",
"consecutiveWeeksBorders",
Expand Down Expand Up @@ -71,9 +72,16 @@ public class SessionSettings {
* It penalises if more than 50% of the class unit are after the last break of the day.
*
*/
@JsonProperty("avoidSectionsAfterBreak")
@JsonProperty("avoidAfterBreakSessions")
@JsonPropertyDescription("It penalises if more than 50% of the class unit are after the last break of the day.")
private Boolean avoidSectionsAfterBreak = true;
private Boolean avoidAfterBreakSessions = true;
/**
* Do not allow breaks between consecutive class units (class duration of more than one section).
*
*/
@JsonProperty("nonBreakInTheMiddleOfConsecutiveSession")
@JsonPropertyDescription("Do not allow breaks between consecutive class units (class duration of more than one section).")
private Boolean nonBreakInTheMiddleOfConsecutiveSession = true;
/**
* Do not allow breaks between class units of multiple duration (class duration of more than one section).
*
Expand Down Expand Up @@ -199,18 +207,36 @@ public void setAvoidAfternoonSessions(Boolean avoidAfternoonSessions) {
* It penalises if more than 50% of the class unit are after the last break of the day.
*
*/
@JsonProperty("avoidSectionsAfterBreak")
public Boolean getAvoidSectionsAfterBreak() {
return avoidSectionsAfterBreak;
@JsonProperty("avoidAfterBreakSessions")
public Boolean getAvoidAfterBreakSessions() {
return avoidAfterBreakSessions;
}

/**
* It penalises if more than 50% of the class unit are after the last break of the day.
*
*/
@JsonProperty("avoidSectionsAfterBreak")
public void setAvoidSectionsAfterBreak(Boolean avoidSectionsAfterBreak) {
this.avoidSectionsAfterBreak = avoidSectionsAfterBreak;
@JsonProperty("avoidAfterBreakSessions")
public void setAvoidAfterBreakSessions(Boolean avoidAfterBreakSessions) {
this.avoidAfterBreakSessions = avoidAfterBreakSessions;
}

/**
* Do not allow breaks between consecutive class units (class duration of more than one section).
*
*/
@JsonProperty("nonBreakInTheMiddleOfConsecutiveSession")
public Boolean getNonBreakInTheMiddleOfConsecutiveSession() {
return nonBreakInTheMiddleOfConsecutiveSession;
}

/**
* Do not allow breaks between consecutive class units (class duration of more than one section).
*
*/
@JsonProperty("nonBreakInTheMiddleOfConsecutiveSession")
public void setNonBreakInTheMiddleOfConsecutiveSession(Boolean nonBreakInTheMiddleOfConsecutiveSession) {
this.nonBreakInTheMiddleOfConsecutiveSession = nonBreakInTheMiddleOfConsecutiveSession;
}

/**
Expand Down
Loading

0 comments on commit 5353aab

Please sign in to comment.