#12 GSoC’18 – Finding closet simulation algorithm

I slightly moved away from the proposed work this week. Currently, SBSCL supports following simulation algorithms:

final static String[] SUPPORTED_KISAO_IDS = new String[] {

  "KISAO:0000033",  // Rosenbrock method
  "KISAO:0000030",  // Euler forward method
  "KISAO:0000087",  // Dormand-Prince method
  "KISAO:0000088",  // LSODA
  "KISAO:0000019"   // CVODE
};

Although these simulation techniques cover a wide array, they still don’t cover all of them. For example, the SED-ML test file parameter-scan-2D given in the official SED-ML specification requires KIASO:0000282 which is not supported by simulation core.

This week’s work involved finding the closest algorithm match when the desired algorithm is not supported. To do this, I am using libKiSAO to find the algorithm with minimal distance in the KiSAO ontology tree. A short code snippet to create a query looks as under:

IKiSAOQueryMaker kisaoQuery = new KiSAOQueryMaker();
IRI wanted = kisaoQuery.searchById(kisaoID);
IRI simAlgo = kisaoQuery.searchById(SUPPORTED_KISAO_IDS[0]);

// Find the closest available algorithm to what is asked
for (String supported : SUPPORTED_KISAO_IDS) {
	IRI offered = kisaoQuery.searchById(supported);
	double curDist = kisaoQuery.distance(wanted, offered);

	if (curDist < minDist) {
		minDist = curDist;
		simAlgo = offered;
	}
	sim.setAlgorithm(new Algorithm(kisaoQuery.getId(simAlgo)));

}

 

Let me know if any questions.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s