public class MagpieServerHandler extends java.lang.Object implements MagpieServer.Iface
MagpieServer
Modifier and Type | Field and Description |
---|---|
static long |
MaxEntryEvaluations
Maximum number of entries to evaluate (precaution measure).
|
protected java.util.Map<java.lang.String,ModelPackage> |
ModelInformation
Information about each model
|
Constructor and Description |
---|
MagpieServerHandler() |
Modifier and Type | Method and Description |
---|---|
void |
addModel(java.lang.String name,
ModelPackage modelInfo)
Add a new model to the server handler
|
java.util.List<Entry> |
evaluateProperties(java.util.List<Entry> entries,
java.util.List<java.lang.String> props)
Compute the properties of each entry in a list.
|
protected static BaseEntryRanker |
getEntryRanker(java.lang.String method,
java.util.List<java.lang.String> options)
Get an entry ranker for a single property.
|
protected static BaseEntryGenerator |
getGenerator(java.lang.String command)
Given the first line of user command, get the entry generator.
|
java.util.Map<java.lang.String,ModelInfo> |
getModelInformation()
Get information about available models
|
protected static org.apache.commons.lang3.tuple.Pair<java.lang.String,BaseEntryRanker> |
getObjective(java.lang.String command)
Parse objective function command.
|
java.util.List<Entry> |
searchMultiObjective(double p,
java.util.List<java.lang.String> objs,
java.lang.String genMethod,
int numToList)
Search for optimal materials based on a multiple objectives in a
user-defined space.
|
java.util.List<Entry> |
searchSingleObjective(java.lang.String obj,
java.lang.String genMethod,
int numToList)
Search for optimal materials based on a single objective in a
user-defined space
_How to Define Objective Function_
The first word in the objective function input should be the name of the
property being optimized, followed by whether to minimize or maximize the
objective function, then the name of EntryRanker, and (finally) its options.
|
protected java.util.Map<java.lang.String,ModelPackage> ModelInformation
public static long MaxEntryEvaluations
public void addModel(java.lang.String name, ModelPackage modelInfo)
name
- Name of modelmodelInfo
- Information about modelpublic java.util.List<Entry> evaluateProperties(java.util.List<Entry> entries, java.util.List<java.lang.String> props) throws org.apache.thrift.TException, MagpieException
MagpieServer.Iface
evaluateProperties
in interface MagpieServer.Iface
entries
- [in] List of entries to be evaluatedprops
- [in] Names of properties to evaluateorg.apache.thrift.TException
MagpieException
public java.util.List<Entry> searchSingleObjective(java.lang.String obj, java.lang.String genMethod, int numToList) throws org.apache.thrift.TException, MagpieException
MagpieServer.Iface
searchSingleObjective
in interface MagpieServer.Iface
obj
- [in] Objective functiongenMethod
- [in] Definition of search spacenumToList
- [in] Number of top candidates to returnorg.apache.thrift.TException
MagpieException
protected static org.apache.commons.lang3.tuple.Pair<java.lang.String,BaseEntryRanker> getObjective(java.lang.String command) throws java.lang.Exception
command
- Command defining objective functionjava.lang.Exception
protected static BaseEntryGenerator getGenerator(java.lang.String command) throws java.lang.Exception
command
- First line of command sent to threadjava.lang.Exception
protected static BaseEntryRanker getEntryRanker(java.lang.String method, java.util.List<java.lang.String> options) throws java.lang.Exception
method
- Name of entry rankeroptions
- Options for entry rankerjava.lang.Exception
public java.util.List<Entry> searchMultiObjective(double p, java.util.List<java.lang.String> objs, java.lang.String genMethod, int numToList) throws org.apache.thrift.TException, MagpieException
MagpieServer.Iface
searchMultiObjective
in interface MagpieServer.Iface
p
- [in] Tradeoff Parameterobjs
- [in] Objective functionsgenMethod
- [in] Definition of search spacenumToList
- [in] Number of top candidates to returnorg.apache.thrift.TException
MagpieException
public java.util.Map<java.lang.String,ModelInfo> getModelInformation() throws org.apache.thrift.TException
MagpieServer.Iface
getModelInformation
in interface MagpieServer.Iface
org.apache.thrift.TException