How would I wrap a call to James in this signature?

28 views
Skip to first unread message

benjam...@gmail.com

unread,
Sep 21, 2018, 4:35:54 PM9/21/18
to JAMES Users
I built out a Simulated Annealing algo before finding James, and it looks much better, so I'd like to migrate.

I have a very generic (Kotlin) signature of 

SimulatedAnnealing(vararg val dimensions: Dimension, val errorFunc: () -> Double) { ...

where a Dimension is a ClosedRange<Double> with a String name and a current/candidate value.

This allows ridiculously easy calls without custom classes like

val centerOfRotationX = Dimension(0..5000, "x")
val centerOfRotationY = Dimension(0..3000, "y")

val sf = SimulatedAnnealing(
  centerOfRotationX,
  centerOfRotationY
) {
  doRotationAndReturnError(centerOfRotationX.candidate, centerOfRotationX.candidate)
}

while(sf.iterate()) {
    println(sf.status())
}

println(sf.finalResult())

Could I somehow call James with a similar signature?

Herman De Beukelaer

unread,
Oct 14, 2018, 9:44:14 AM10/14/18
to JAMES Users
Dear Benjamin,

Could you provide me some more details of what you are trying to achieve?
I am unfamiliar with the Kotlin language so not sure if you can use JAMES. Do you intend to call Java from Kotlin?

What exactly is the optimization problem that you are trying to solve?
How exactly did you implement simulate annealing? For example, which neighbourhood function do you use?

If you could share more of your Kotlin code with me, that would be helpful.

Thanks
Herman
Reply all
Reply to author
Forward
0 new messages