-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8eab67f
commit 1183fde
Showing
9 changed files
with
197 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
...erarium/hmiserver/models/simulationservice/statusupdates/CiemssCalibrateStatusUpdate.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package software.uncharted.terarium.hmiserver.models.simulationservice.statusupdates; | ||
|
||
import lombok.Data; | ||
import software.uncharted.terarium.hmiserver.annotations.TSModel; | ||
|
||
@Data | ||
@TSModel | ||
public class CiemssCalibrateStatusUpdate extends CiemssStatusUpdate { | ||
|
||
private Number loss; | ||
} |
26 changes: 26 additions & 0 deletions
26
...terarium/hmiserver/models/simulationservice/statusupdates/CiemssOptimizeStatusUpdate.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package software.uncharted.terarium.hmiserver.models.simulationservice.statusupdates; | ||
|
||
import com.fasterxml.jackson.annotation.JsonAlias; | ||
import com.fasterxml.jackson.annotation.JsonIgnore; | ||
import com.fasterxml.jackson.databind.JsonNode; | ||
import com.fasterxml.jackson.databind.ObjectMapper; | ||
import java.util.List; | ||
import lombok.Data; | ||
import software.uncharted.terarium.hmiserver.annotations.TSModel; | ||
|
||
@Data | ||
@TSModel | ||
public class CiemssOptimizeStatusUpdate extends CiemssStatusUpdate { | ||
|
||
@JsonAlias("current_results") | ||
private List<Number> currentResults; | ||
|
||
@JsonAlias("total_possible_iterations") | ||
private Number totalPossibleIterations; | ||
|
||
@JsonIgnore | ||
public JsonNode getDataToPersist() { | ||
final ObjectMapper mapper = new ObjectMapper(); | ||
return mapper.valueToTree(this); | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
...uncharted/terarium/hmiserver/models/simulationservice/statusupdates/CiemssStatusType.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package software.uncharted.terarium.hmiserver.models.simulationservice.statusupdates; | ||
|
||
import com.fasterxml.jackson.annotation.JsonValue; | ||
import software.uncharted.terarium.hmiserver.annotations.TSModel; | ||
|
||
@TSModel | ||
public enum CiemssStatusType { | ||
OPTIMIZE("optimize"), | ||
CALIBRATE("calibrate"); | ||
|
||
public final String type; | ||
|
||
CiemssStatusType(final String type) { | ||
this.type = type; | ||
} | ||
|
||
@Override | ||
@JsonValue | ||
public String toString() { | ||
return type; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.