Commit 1b7187d8 authored by Jens Korinth's avatar Jens Korinth
Browse files

Remove restriction for minimum of one dimension in DSE

parent 485abb90
...@@ -106,13 +106,11 @@ package object json { ...@@ -106,13 +106,11 @@ package object json {
/* ComposeJob @} */ /* ComposeJob @} */
/* @{ DesignSpaceExplorationJob */ /* @{ DesignSpaceExplorationJob */
private def atLeastOneVariation(d: DesignSpace.Dimensions): Boolean =
d.frequency || d.utilization || d.alternatives
private val dseJobReads: Reads[Job] = ( private val dseJobReads: Reads[Job] = (
(JsPath \ "Job").read[String] (verifying[String](_.toLowerCase equals "designspaceexploration")) ~> (JsPath \ "Job").read[String] (verifying[String](_.toLowerCase equals "designspaceexploration")) ~>
(JsPath \ "Initial Composition").read[Composition] ~ (JsPath \ "Initial Composition").read[Composition] ~
(JsPath \ "Initial Frequency").readNullable[Heuristics.Frequency].map (_ getOrElse 100.0) ~ (JsPath \ "Initial Frequency").readNullable[Heuristics.Frequency].map (_ getOrElse 100.0) ~
(JsPath \ "Dimensions").read[DesignSpace.Dimensions] (verifying[DesignSpace.Dimensions](atLeastOneVariation _)) ~ (JsPath \ "Dimensions").read[DesignSpace.Dimensions] ~
(JsPath \ "Heuristic").read[Heuristics.Heuristic] ~ (JsPath \ "Heuristic").read[Heuristics.Heuristic] ~
(JsPath \ "Batch Size").read[Int] (verifying[Int](_ > 0)) ~ (JsPath \ "Batch Size").read[Int] (verifying[Int](_ > 0)) ~
(JsPath \ "Output Path").readNullable[Path] ~ (JsPath \ "Output Path").readNullable[Path] ~
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment