Hi,

the following are excerpts of my recent attempt to workaround previous WF 
issues (which I believe are due to bugs in OpenMOLE…). How can I resolve the 
compilation error:

[error] 
/Users/as12312/Documents/Projects/REPEAT/src/main/scala/com/andreasschuh/repeat/workflow/RunRegistration.scala:496:
 overloaded method value >- with alternatives:
[error]   (toHead: org.openmole.core.workflow.puzzle.Puzzle,toTail: 
org.openmole.core.workflow.puzzle.Puzzle*)org.openmole.core.workflow.puzzle.Puzzle
 <and>
[error]   (to: org.openmole.core.workflow.puzzle.Puzzle,condition: 
org.openmole.core.workflow.transition.Condition,filter: 
org.openmole.core.workflow.transition.Filter[String],trigger: 
org.openmole.core.workflow.transition.Condition)org.openmole.core.workflow.puzzle.Puzzle
[error]  cannot be applied to 
(org.openmole.core.workflow.transition.TransitionParameter, 
org.openmole.core.workflow.transition.TransitionParameter)
[error]           evaluateOverlapEnd >- (
[error]                              ^
[error] one error found
[error] (compile:compile) Compilation failed


List of OpenMOLE imports:

import org.openmole.core.dsl._
import org.openmole.core.workflow.data.Prototype
import org.openmole.plugin.domain.file._
import org.openmole.plugin.hook.file._
import org.openmole.plugin.sampling.combine._
import org.openmole.plugin.sampling.csv._
import org.openmole.plugin.task.scala._
import org.openmole.plugin.tool.pattern.Skip


Here the offending aggregation:

val writeMean =
  evaluateOverlapEnd >- (
    writeMeanOverlap(dscRegAvgCsvPath, dscGrpAvg, dscRegAvg, header = groups) 
when "!dscGrpAvgValid.contains(false)",
    writeMeanOverlap(jsiRegAvgCsvPath, jsiGrpAvg, jsiRegAvg, header = groups) 
when "!jsiGrpAvgValid.contains(false)"
  )


Definition of evaluateOverlapEnd:

val evaluateOverlapEnd =
  Capsule(
    EmptyTask() set (
      name    := s"${reg.id}-EvaluateOverlapEnd",
      inputs  += (dscValues, dscGrpAvg, dscGrpStd, jsiValues, jsiGrpAvg, 
jsiGrpStd),
      inputs  += (dscValuesValid, dscGrpAvgValid, dscGrpStdValid, 
jsiValuesValid, jsiGrpAvgValid, jsiGrpStdValid),
      outputs += (dscValues, dscGrpAvg, dscGrpStd, jsiValues, jsiGrpAvg, 
jsiGrpStd),
      outputs += (dscValuesValid, dscGrpAvgValid, dscGrpStdValid, 
jsiValuesValid, jsiGrpAvgValid, jsiGrpStdValid)
    ),
    strainer = true
  )


Definition of writeMeanOverlap:

def writeMeanOverlap(path: String, values: Prototype[Array[Double]], mean: 
Prototype[Array[Double]], header: String) =
  ScalaTask(
    s"""
      | val regId = input.regId.head
      | val parId = input.parId.head
      | val ${mean.name} = ${values.name}.transpose.map(_.sum / 
${values.name}.head.size)
    """.stripMargin
  ) set (
    name    := s"${reg.id}-Write${mean.name.capitalize}",
    inputs  += (regId.toArray, parId.toArray, values.toArray),
    outputs += (regId, parId, mean)
  ) hook (
    AppendToCSVFileHook(path, regId, parId, mean) set (
      csvHeader := "Registration,Parameters," + header,
      singleRow := true
    )
  )


Cheers,
Andreas
_______________________________________________
OpenMOLE-users mailing list
[email protected]
http://fedex.iscpif.fr/mailman/listinfo/openmole-users

Reply via email to