Search in sources :

Example 6 with OptProblem

use of org.vcell.optimization.thrift.OptProblem in project vcell by virtualcell.

the class CopasiOptimizationSolver method solveRemoteApi.

public static OptimizationResultSet solveRemoteApi(ParameterEstimationTaskSimulatorIDA parestSimulator, ParameterEstimationTask parameterEstimationTask, CopasiOptSolverCallbacks optSolverCallbacks, MathMappingCallback mathMappingCallback) throws IOException, ExpressionException, OptimizationException {
    try {
        OptProblem optProblem = CopasiServicePython.makeOptProblem(parameterEstimationTask);
        boolean bIgnoreCertProblems = true;
        boolean bIgnoreHostMismatch = true;
        // e.g. vcell.serverhost=vcellapi.cam.uchc.edu:8080
        String serverHost = PropertyLoader.getRequiredProperty(PropertyLoader.vcellServerHost);
        String[] parts = serverHost.split(":");
        String host = parts[0];
        int port = Integer.parseInt(parts[1]);
        VCellApiClient apiClient = new VCellApiClient(host, port, bIgnoreCertProblems, bIgnoreHostMismatch);
        TSerializer serializer = new TSerializer(new TJSONProtocol.Factory());
        String optProblemJson = serializer.toString(optProblem);
        String optimizationId = apiClient.submitOptimization(optProblemJson);
        // 20 second minute timeout
        final long TIMEOUT_MS = 1000 * 20;
        long startTime = System.currentTimeMillis();
        OptRun optRun = null;
        while ((System.currentTimeMillis() - startTime) < TIMEOUT_MS) {
            if (optSolverCallbacks.getStopRequested()) {
                throw new RuntimeException(STOP_REQUESTED);
            }
            String optRunJson = apiClient.getOptRunJson(optimizationId);
            TDeserializer deserializer = new TDeserializer(new TJSONProtocol.Factory());
            optRun = new OptRun();
            deserializer.deserialize(optRun, optRunJson.getBytes());
            OptRunStatus status = optRun.status;
            if (status == OptRunStatus.Complete) {
                System.out.println("job " + optimizationId + ": status " + status + " " + optRun.getOptResultSet().toString());
                break;
            }
            if (status == OptRunStatus.Failed) {
                throw new RuntimeException("optimization failed, message=" + optRun.statusMessage);
            }
            System.out.println("job " + optimizationId + ": status " + status);
            try {
                Thread.sleep(1000);
            } catch (InterruptedException e) {
            }
        }
        System.out.println("done with optimization");
        OptResultSet optResultSet = optRun.getOptResultSet();
        int numFittedParameters = optResultSet.getOptParameterValues().size();
        String[] paramNames = new String[numFittedParameters];
        double[] paramValues = new double[numFittedParameters];
        for (int pIndex = 0; pIndex < numFittedParameters; pIndex++) {
            OptParameterValue optParamValue = optResultSet.getOptParameterValues().get(pIndex);
            paramNames[pIndex] = optParamValue.parameterName;
            paramValues[pIndex] = optParamValue.bestValue;
        }
        OptimizationStatus status = new OptimizationStatus(OptimizationStatus.NORMAL_TERMINATION, optRun.statusMessage);
        OptRunResultSet optRunResultSet = new OptRunResultSet(paramValues, optResultSet.objectiveFunction, optResultSet.numFunctionEvaluations, status);
        OptSolverResultSet copasiOptSolverResultSet = new OptSolverResultSet(paramNames, optRunResultSet);
        RowColumnResultSet copasiRcResultSet = parestSimulator.getRowColumnRestultSetByBestEstimations(parameterEstimationTask, paramNames, paramValues);
        OptimizationResultSet copasiOptimizationResultSet = new OptimizationResultSet(copasiOptSolverResultSet, copasiRcResultSet);
        System.out.println("-----------SOLUTION FROM VCellAPI---------------\n" + optResultSet.toString());
        return copasiOptimizationResultSet;
    } catch (Exception e) {
        e.printStackTrace(System.out);
        if (e.getMessage() != null && e.getMessage().equals(STOP_REQUESTED)) {
            throw UserCancelException.CANCEL_GENERIC;
        }
        throw new OptimizationException(e.getCause() != null ? e.getCause().getMessage() : e.getMessage());
    }
}
Also used : OptimizationException(cbit.vcell.opt.OptimizationException) TDeserializer(org.apache.thrift.TDeserializer) OptimizationResultSet(cbit.vcell.opt.OptimizationResultSet) OptParameterValue(org.vcell.optimization.thrift.OptParameterValue) OptSolverResultSet(cbit.vcell.opt.OptSolverResultSet) TJSONProtocol(org.apache.thrift.protocol.TJSONProtocol) OptRunStatus(org.vcell.optimization.thrift.OptRunStatus) OptRun(org.vcell.optimization.thrift.OptRun) OptResultSet(org.vcell.optimization.thrift.OptResultSet) OptimizationStatus(cbit.vcell.opt.OptimizationStatus) RowColumnResultSet(cbit.vcell.math.RowColumnResultSet) OptProblem(org.vcell.optimization.thrift.OptProblem) VCellApiClient(org.vcell.api.client.VCellApiClient) OptimizationException(cbit.vcell.opt.OptimizationException) IOException(java.io.IOException) ExpressionException(cbit.vcell.parser.ExpressionException) MathException(cbit.vcell.math.MathException) UserCancelException(org.vcell.util.UserCancelException) TSerializer(org.apache.thrift.TSerializer) OptRunResultSet(cbit.vcell.opt.OptSolverResultSet.OptRunResultSet)

Example 7 with OptProblem

use of org.vcell.optimization.thrift.OptProblem in project vcell by virtualcell.

the class OptServerImpl method runNextWaitingOptProblem.

public void runNextWaitingOptProblem() {
    OptRunContext optRunContext = null;
    synchronized (optRunContexts) {
        for (int i = 0; i < optRunContexts.size(); i++) {
            if (optRunContexts.get(i).optRunStatus == OptRunStatus.Queued) {
                optRunContext = optRunContexts.get(i);
                optRunContext.optRunStatus = OptRunStatus.Running;
                System.err.println("OptServerImpl - starting optimizationId " + optRunContext.optimizationId);
                break;
            }
        }
    }
    try {
        if (optRunContext != null) {
            OptProblem optProblem = CopasiServicePython.readOptProblem(optRunContext.getOptProblemBinaryFile());
            CopasiServicePython.writeOptProblem(optRunContext.getOptProblemBinaryFile(), optProblem);
            CopasiServicePython.runCopasiPython(optRunContext.getOptProblemBinaryFile(), optRunContext.getOptRunBinaryFile());
            OptRun optRun = CopasiServicePython.readOptRun(optRunContext.getOptRunBinaryFile());
            System.out.println("ran optRun id " + optRunContext.optimizationId + ": status=" + optRun.statusMessage + ": (" + optRun.getOptResultSet().toString() + ")");
            synchronized (optRunContexts) {
                optRunContext.optRunStatus = OptRunStatus.Complete;
                System.err.println("OptServerImpl - optimizationId " + optRunContext.optimizationId + " status=" + OptRunStatus.Complete);
            }
        }
    } catch (Exception e) {
        e.printStackTrace();
        synchronized (optRunContexts) {
            optRunContext.optRunStatus = OptRunStatus.Failed;
            System.err.println("OptServerImpl - optimizationId " + optRunContext.optimizationId + " status=" + OptRunStatus.Failed);
        }
    }
}
Also used : OptProblem(org.vcell.optimization.thrift.OptProblem) OptRun(org.vcell.optimization.thrift.OptRun) IOException(java.io.IOException)

Example 8 with OptProblem

use of org.vcell.optimization.thrift.OptProblem in project vcell by virtualcell.

the class OptimizationServerResource method getOptRun.

private OptRun getOptRun(User vcellUser) {
    // }else{
    try {
        String optimizationId = (String) getRequestAttributes().get(VCellApiApplication.OPTIMIZATIONID);
        VCellApiApplication application = ((VCellApiApplication) getApplication());
        OptRunContext optRunContext = application.getOptServerImpl().getOptRunContextByOptimizationId(optimizationId);
        if (optRunContext == null) {
            throw new ObjectNotFoundException("optimization id '" + optimizationId + "' not found");
        }
        switch(optRunContext.getStatus()) {
            case Complete:
                {
                    OptRun optRun = CopasiServicePython.readOptRun(optRunContext.getOptRunBinaryFile());
                    return optRun;
                }
            case Queued:
            case Running:
            case Failed:
                {
                    OptProblem optProblem = CopasiServicePython.readOptProblem(optRunContext.getOptProblemBinaryFile());
                    OptRun optRun = new OptRun();
                    optRun.setOptProblem(optProblem);
                    optRun.setStatus(optRunContext.getStatus());
                    optRun.setStatusMessage(optRunContext.getStatus().name());
                    return optRun;
                }
            default:
                {
                    throw new RuntimeException("unexpected optimization status '" + optRunContext.getStatus() + "'");
                }
        }
    } catch (PermissionException e) {
        e.printStackTrace();
        throw new ResourceException(Status.CLIENT_ERROR_UNAUTHORIZED, "permission denied to requested resource");
    } catch (ObjectNotFoundException e) {
        e.printStackTrace();
        throw new ResourceException(Status.CLIENT_ERROR_NOT_FOUND, "optimization not found");
    } catch (Exception e) {
        throw new ResourceException(Status.SERVER_ERROR_INTERNAL, e.getMessage());
    }
// }
}
Also used : PermissionException(org.vcell.util.PermissionException) OptRunContext(org.vcell.optimization.OptServerImpl.OptRunContext) OptProblem(org.vcell.optimization.thrift.OptProblem) ObjectNotFoundException(org.vcell.util.ObjectNotFoundException) OptRun(org.vcell.optimization.thrift.OptRun) VCellApiApplication(org.vcell.rest.VCellApiApplication) ResourceException(org.restlet.resource.ResourceException) PermissionException(org.vcell.util.PermissionException) ObjectNotFoundException(org.vcell.util.ObjectNotFoundException) ResourceException(org.restlet.resource.ResourceException)

Example 9 with OptProblem

use of org.vcell.optimization.thrift.OptProblem in project vcell by virtualcell.

the class CopasiOptimizationSolver method solveLocalPython.

public static OptimizationResultSet solveLocalPython(ParameterEstimationTaskSimulatorIDA parestSimulator, ParameterEstimationTask parameterEstimationTask, CopasiOptSolverCallbacks optSolverCallbacks, MathMappingCallback mathMappingCallback) throws IOException, ExpressionException, OptimizationException {
    File dir = Files.createTempDirectory("parest", new FileAttribute<?>[] {}).toFile();
    try {
        String prefix = "testing_" + Math.abs(new Random().nextInt(10000));
        File optProblemThriftFile = new File(dir, prefix + ".optprob.bin");
        File optRunFile = new File(dir, prefix + ".optrun.bin");
        // 
        // Setup Python COPASI opt problem and write to disk
        // 
        OptProblem optProblem = CopasiServicePython.makeOptProblem(parameterEstimationTask);
        CopasiServicePython.writeOptProblem(optProblemThriftFile, optProblem);
        // 
        // run Python COPASI opt problem
        // 
        CopasiServicePython.runCopasiPython(optProblemThriftFile, optRunFile);
        if (!optRunFile.exists()) {
            throw new RuntimeException("COPASI optimization output file not found:\n" + optRunFile.getAbsolutePath());
        }
        OptRun optRun = CopasiServicePython.readOptRun(optRunFile);
        OptResultSet optResultSet = optRun.getOptResultSet();
        int numFittedParameters = optResultSet.getOptParameterValues().size();
        String[] paramNames = new String[numFittedParameters];
        double[] paramValues = new double[numFittedParameters];
        for (int pIndex = 0; pIndex < numFittedParameters; pIndex++) {
            OptParameterValue optParamValue = optResultSet.getOptParameterValues().get(pIndex);
            paramNames[pIndex] = optParamValue.parameterName;
            paramValues[pIndex] = optParamValue.bestValue;
        }
        OptimizationStatus status = new OptimizationStatus(OptimizationStatus.NORMAL_TERMINATION, optRun.statusMessage);
        OptRunResultSet optRunResultSet = new OptRunResultSet(paramValues, optResultSet.objectiveFunction, optResultSet.numFunctionEvaluations, status);
        OptSolverResultSet copasiOptSolverResultSet = new OptSolverResultSet(paramNames, optRunResultSet);
        RowColumnResultSet copasiRcResultSet = parestSimulator.getRowColumnRestultSetByBestEstimations(parameterEstimationTask, paramNames, paramValues);
        OptimizationResultSet copasiOptimizationResultSet = new OptimizationResultSet(copasiOptSolverResultSet, copasiRcResultSet);
        System.out.println("-----------SOLUTION FROM PYTHON---------------\n" + optResultSet.toString());
        return copasiOptimizationResultSet;
    } catch (Throwable e) {
        e.printStackTrace(System.out);
        throw new OptimizationException(e.getCause() != null ? e.getCause().getMessage() : e.getMessage());
    } finally {
        if (dir != null && dir.exists()) {
            FileUtils.deleteDirectory(dir);
        }
    }
}
Also used : OptimizationException(cbit.vcell.opt.OptimizationException) OptProblem(org.vcell.optimization.thrift.OptProblem) OptimizationResultSet(cbit.vcell.opt.OptimizationResultSet) OptParameterValue(org.vcell.optimization.thrift.OptParameterValue) OptSolverResultSet(cbit.vcell.opt.OptSolverResultSet) Random(java.util.Random) OptRun(org.vcell.optimization.thrift.OptRun) OptResultSet(org.vcell.optimization.thrift.OptResultSet) OptimizationStatus(cbit.vcell.opt.OptimizationStatus) OptRunResultSet(cbit.vcell.opt.OptSolverResultSet.OptRunResultSet) File(java.io.File) FileAttribute(java.nio.file.attribute.FileAttribute) RowColumnResultSet(cbit.vcell.math.RowColumnResultSet)

Example 10 with OptProblem

use of org.vcell.optimization.thrift.OptProblem in project vcell by virtualcell.

the class CopasiOptimizationSolver method solveRemoteApi.

public static OptimizationResultSet solveRemoteApi(ParameterEstimationTaskSimulatorIDA parestSimulator, ParameterEstimationTask parameterEstimationTask, CopasiOptSolverCallbacks optSolverCallbacks, MathMappingCallback mathMappingCallback, ClientTaskStatusSupport clientTaskStatusSupport) throws IOException, ExpressionException, OptimizationException {
    try {
        if (clientTaskStatusSupport != null) {
            clientTaskStatusSupport.setMessage("Generating opt problem...");
        }
        OptProblem optProblem = CopasiServicePython.makeOptProblem(parameterEstimationTask);
        boolean bIgnoreCertProblems = true;
        boolean bIgnoreHostMismatch = true;
        // e.g. vcell.serverhost=vcellapi.cam.uchc.edu:443
        String serverHost = PropertyLoader.getRequiredProperty(PropertyLoader.vcellServerHost);
        String[] parts = serverHost.split(":");
        String host = parts[0];
        int port = Integer.parseInt(parts[1]);
        VCellApiClient apiClient = new VCellApiClient(host, port, bIgnoreCertProblems, bIgnoreHostMismatch);
        TSerializer serializer = new TSerializer(new TJSONProtocol.Factory());
        String optProblemJson = serializer.toString(optProblem);
        if (clientTaskStatusSupport != null) {
            clientTaskStatusSupport.setMessage("Submitting opt problem...");
        }
        // Submit but allow user to get out from restlet blocking call
        final String[] optIdHolder = new String[] { null };
        final Exception[] exceptHolder = new Exception[] { null };
        Thread submitThread = new Thread(new Runnable() {

            @Override
            public void run() {
                try {
                    optIdHolder[0] = apiClient.submitOptimization(optProblemJson);
                    if (optSolverCallbacks.getStopRequested()) {
                        apiClient.getOptRunJson(optIdHolder[0], optSolverCallbacks.getStopRequested());
                    }
                } catch (Exception e) {
                    // TODO Auto-generated catch block
                    e.printStackTrace();
                    exceptHolder[0] = e;
                }
            }
        });
        submitThread.setDaemon(true);
        submitThread.start();
        while (optIdHolder[0] == null && exceptHolder[0] == null && !optSolverCallbacks.getStopRequested()) {
            Thread.sleep(200);
        }
        if (exceptHolder[0] != null) {
            throw exceptHolder[0];
        }
        if (optSolverCallbacks.getStopRequested()) {
            throw UserCancelException.CANCEL_GENERIC;
        }
        // 200 second timeout
        final long TIMEOUT_MS = 1000 * 200;
        long startTime = System.currentTimeMillis();
        OptRun optRun = null;
        if (clientTaskStatusSupport != null) {
            clientTaskStatusSupport.setMessage("Waiting for progress...");
        }
        while ((System.currentTimeMillis() - startTime) < TIMEOUT_MS) {
            String optRunJson = apiClient.getOptRunJson(optIdHolder[0], optSolverCallbacks.getStopRequested());
            if (optSolverCallbacks.getStopRequested()) {
                throw UserCancelException.CANCEL_GENERIC;
            }
            if (optRunJson.startsWith(OptRunStatus.Queued.name() + ":")) {
                SwingUtilities.invokeLater(new Runnable() {

                    @Override
                    public void run() {
                        optSolverCallbacks.setEvaluation(0, 0, 0, optSolverCallbacks.getEndValue(), 0);
                    }
                });
                if (clientTaskStatusSupport != null) {
                    clientTaskStatusSupport.setMessage("Queued...");
                }
            } else if (optRunJson.startsWith("Failed:") || optRunJson.startsWith("exception:") || optRunJson.startsWith("Exception:")) {
                SwingUtilities.invokeLater(new Runnable() {

                    @Override
                    public void run() {
                        optSolverCallbacks.setEvaluation(0, 0, 0, optSolverCallbacks.getEndValue(), 0);
                    }
                });
                if (clientTaskStatusSupport != null) {
                    clientTaskStatusSupport.setMessage(optRunJson);
                }
            } else if (optRunJson.startsWith(OptRunStatus.Running.name() + ":")) {
                SwingUtilities.invokeLater(new Runnable() {

                    @Override
                    public void run() {
                        try {
                            StringTokenizer st = new StringTokenizer(optRunJson, " :\t\r\n");
                            if (st.countTokens() != 4) {
                                System.out.println(optRunJson);
                                return;
                            }
                            // OptRunStatus mesg
                            st.nextToken();
                            int runNum = Integer.parseInt(st.nextToken());
                            double objFunctionValue = Double.parseDouble(st.nextToken());
                            int numObjFuncEvals = Integer.parseInt(st.nextToken());
                            SwingUtilities.invokeLater(new Runnable() {

                                @Override
                                public void run() {
                                    optSolverCallbacks.setEvaluation(numObjFuncEvals, objFunctionValue, 1.0, null, runNum);
                                }
                            });
                        } catch (Exception e) {
                            System.out.println(optRunJson);
                            e.printStackTrace();
                        }
                    }
                });
                if (clientTaskStatusSupport != null) {
                    clientTaskStatusSupport.setMessage("Running...");
                }
            } else {
                // File f = new File("/home/vcell/fake_share_apps_vcell3/users/ParamOptemize_"+optimizationId+"/ParamOptemize_"+optimizationId+"_optRun.bin");
                // byte[] filesbytes = FileUtils.readFileToByteArray(f);
                // optRunJson.getBytes();
                byte[] jsonbytes = Base64.getDecoder().decode(optRunJson);
                // System.out.println(filesbytes.length+" "+jsonbytes.length);
                // for (int i = 0; i < filesbytes.length; i++) {
                // if(filesbytes[i] != jsonbytes[i]) {
                // System.out.println("differ at "+i);
                // break;
                // }
                // }
                TDeserializer deserializer = new TDeserializer(new TBinaryProtocol.Factory());
                // TDeserializer deserializer = new TDeserializer(new TJSONProtocol.Factory());
                optRun = new OptRun();
                deserializer.deserialize(optRun, jsonbytes);
                OptRunStatus status = optRun.status;
                String statusMessage = optRun.getStatusMessage();
                if (statusMessage != null && (statusMessage.toLowerCase().startsWith(OptRunStatus.Complete.name().toLowerCase()))) {
                    final OptRun or2 = optRun;
                    SwingUtilities.invokeLater(new Runnable() {

                        @Override
                        public void run() {
                            // Double endValue = null;
                            // for (org.vcell.optimization.thrift.CopasiOptimizationParameter cop : or2.getOptProblem().getOptimizationMethod().getOptimizationParameterList()) {
                            // if (cop.getParamType().name().equals(CopasiOptimizationParameterType.Number_of_Generations.name())
                            // || cop.getParamType().name().equals(CopasiOptimizationParameterType.IterationLimit.name())){
                            // endValue = cop.getValue();
                            // break;
                            // }
                            // }
                            optSolverCallbacks.setEvaluation((int) or2.getOptResultSet().getNumFunctionEvaluations(), or2.getOptResultSet().objectiveFunction, 1.0, null, or2.getOptProblem().numberOfOptimizationRuns);
                        }
                    });
                // }
                }
                if (status == OptRunStatus.Complete) {
                    System.out.println("job " + optIdHolder[0] + ": status " + status + " " + optRun.getOptResultSet().toString());
                    if (clientTaskStatusSupport != null) {
                        clientTaskStatusSupport.setProgress(100);
                    }
                    break;
                }
                if (status == OptRunStatus.Failed) {
                    throw new RuntimeException("optimization failed, message=" + optRun.statusMessage);
                }
                System.out.println("job " + optIdHolder[0] + ": status " + status);
            }
            try {
                Thread.sleep(2000);
            } catch (InterruptedException e) {
            }
        }
        if ((System.currentTimeMillis() - startTime) >= TIMEOUT_MS) {
            throw new RuntimeException("optimization timed out.");
        }
        System.out.println("done with optimization");
        OptResultSet optResultSet = optRun.getOptResultSet();
        if (optResultSet == null) {
            throw new RuntimeException("optResultSet is null, status is " + optRun.getStatusMessage());
        }
        if (optResultSet != null && optResultSet.getOptParameterValues() == null) {
            throw new RuntimeException("getOptParameterValues is null, status is " + optRun.getStatusMessage());
        }
        if (clientTaskStatusSupport != null) {
            clientTaskStatusSupport.setMessage("Done, getting results...");
        }
        int numFittedParameters = optResultSet.getOptParameterValues().size();
        String[] paramNames = new String[numFittedParameters];
        double[] paramValues = new double[numFittedParameters];
        for (int pIndex = 0; pIndex < numFittedParameters; pIndex++) {
            OptParameterValue optParamValue = optResultSet.getOptParameterValues().get(pIndex);
            paramNames[pIndex] = optParamValue.parameterName;
            paramValues[pIndex] = optParamValue.bestValue;
        }
        OptimizationStatus status = new OptimizationStatus(OptimizationStatus.NORMAL_TERMINATION, optRun.statusMessage);
        OptRunResultSet optRunResultSet = new OptRunResultSet(paramValues, optResultSet.objectiveFunction, optResultSet.numFunctionEvaluations, status);
        OptSolverResultSet copasiOptSolverResultSet = new OptSolverResultSet(paramNames, optRunResultSet);
        RowColumnResultSet copasiRcResultSet = parestSimulator.getRowColumnRestultSetByBestEstimations(parameterEstimationTask, paramNames, paramValues);
        OptimizationResultSet copasiOptimizationResultSet = new OptimizationResultSet(copasiOptSolverResultSet, copasiRcResultSet);
        System.out.println("-----------SOLUTION FROM VCellAPI---------------\n" + optResultSet.toString());
        return copasiOptimizationResultSet;
    } catch (UserCancelException e) {
        throw e;
    } catch (Exception e) {
        e.printStackTrace(System.out);
        throw new OptimizationException(e.getCause() != null ? e.getCause().getMessage() : e.getMessage());
    }
}
Also used : OptimizationException(cbit.vcell.opt.OptimizationException) TDeserializer(org.apache.thrift.TDeserializer) OptimizationResultSet(cbit.vcell.opt.OptimizationResultSet) UserCancelException(org.vcell.util.UserCancelException) OptParameterValue(org.vcell.optimization.thrift.OptParameterValue) OptSolverResultSet(cbit.vcell.opt.OptSolverResultSet) TJSONProtocol(org.apache.thrift.protocol.TJSONProtocol) OptRunStatus(org.vcell.optimization.thrift.OptRunStatus) OptRun(org.vcell.optimization.thrift.OptRun) OptResultSet(org.vcell.optimization.thrift.OptResultSet) OptimizationStatus(cbit.vcell.opt.OptimizationStatus) RowColumnResultSet(cbit.vcell.math.RowColumnResultSet) OptProblem(org.vcell.optimization.thrift.OptProblem) VCellApiClient(org.vcell.api.client.VCellApiClient) OptimizationException(cbit.vcell.opt.OptimizationException) IOException(java.io.IOException) ExpressionException(cbit.vcell.parser.ExpressionException) MathException(cbit.vcell.math.MathException) UserCancelException(org.vcell.util.UserCancelException) TSerializer(org.apache.thrift.TSerializer) StringTokenizer(java.util.StringTokenizer) TBinaryProtocol(org.apache.thrift.protocol.TBinaryProtocol) OptRunResultSet(cbit.vcell.opt.OptSolverResultSet.OptRunResultSet)

Aggregations

OptProblem (org.vcell.optimization.thrift.OptProblem)12 IOException (java.io.IOException)8 OptRun (org.vcell.optimization.thrift.OptRun)7 TDeserializer (org.apache.thrift.TDeserializer)6 File (java.io.File)4 OptRunStatus (org.vcell.optimization.thrift.OptRunStatus)4 RowColumnResultSet (cbit.vcell.math.RowColumnResultSet)3 OptSolverResultSet (cbit.vcell.opt.OptSolverResultSet)3 OptRunResultSet (cbit.vcell.opt.OptSolverResultSet.OptRunResultSet)3 OptimizationException (cbit.vcell.opt.OptimizationException)3 OptimizationResultSet (cbit.vcell.opt.OptimizationResultSet)3 OptimizationStatus (cbit.vcell.opt.OptimizationStatus)3 TException (org.apache.thrift.TException)3 TSerializer (org.apache.thrift.TSerializer)3 TBinaryProtocol (org.apache.thrift.protocol.TBinaryProtocol)3 TJSONProtocol (org.apache.thrift.protocol.TJSONProtocol)3 VCellApiClient (org.vcell.api.client.VCellApiClient)3 OptParameterValue (org.vcell.optimization.thrift.OptParameterValue)3 OptResultSet (org.vcell.optimization.thrift.OptResultSet)3 MathException (cbit.vcell.math.MathException)2