diff --git a/vcell-client/src/main/java/copasi/CopasiOptimizationSolver.java b/vcell-client/src/main/java/copasi/CopasiOptimizationSolver.java deleted file mode 100644 index 79d262b159..0000000000 --- a/vcell-client/src/main/java/copasi/CopasiOptimizationSolver.java +++ /dev/null @@ -1,265 +0,0 @@ -/* - * Copyright (C) 1999-2011 University of Connecticut Health Center - * - * Licensed under the MIT License (the "License"). - * You may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * - * http://www.opensource.org/licenses/mit-license.php - */ - -package copasi; - -import cbit.vcell.client.server.ClientServerInfo; -import cbit.vcell.modelopt.ParameterEstimationTask; -import cbit.vcell.opt.OptimizationException; -import cbit.vcell.opt.OptimizationResultSet; -import cbit.vcell.opt.OptimizationStatus; -import cbit.vcell.resource.PropertyLoader; -import com.fasterxml.jackson.databind.ObjectMapper; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; -import org.vcell.api.client.VCellApiClient; -import org.vcell.optimization.CopasiOptSolverCallbacks; -import org.vcell.optimization.CopasiUtils; -import org.vcell.optimization.ParameterEstimationTaskSimulatorIDA; -import org.vcell.optimization.jtd.*; -import org.vcell.util.ClientTaskStatusSupport; -import org.vcell.util.UserCancelException; - -import javax.swing.*; - - -public class CopasiOptimizationSolver { - - private final static Logger lg = LogManager.getLogger(CopasiOptimizationSolver.class); - - public static OptimizationResultSet solveLocalPython(ParameterEstimationTask parameterEstimationTask) - throws OptimizationException { - - try { - parameterEstimationTask.refreshMappings(); - OptProblem optProblem = CopasiUtils.paramTaskToOptProblem(parameterEstimationTask); - Vcellopt optRun = CopasiUtils.runCopasiParameterEstimation(optProblem); - OptimizationResultSet copasiOptimizationResultSet = CopasiUtils.toOptResults( - optRun,parameterEstimationTask, new ParameterEstimationTaskSimulatorIDA()); - return copasiOptimizationResultSet; - } catch (Exception e){ - throw new OptimizationException(e.getCause() != null ? e.getCause().getMessage() : e.getMessage(), e); - } - } - - private static final String STOP_REQUESTED = "stop requested"; - public static OptimizationResultSet solveRemoteApi( - ParameterEstimationTask parameterEstimationTask, - CopasiOptSolverCallbacks optSolverCallbacks, - ClientTaskStatusSupport clientTaskStatusSupport, - ClientServerInfo clientServerInfo) { - - // return solveLocalPython(parameterEstimationTask); - - try { - boolean bIgnoreCertProblems = PropertyLoader.getBooleanProperty(PropertyLoader.sslIgnoreCertProblems, false); - boolean bIgnoreHostMismatch = PropertyLoader.getBooleanProperty(PropertyLoader.sslIgnoreHostMismatch, false); - - String host = clientServerInfo.getApihost(); - int port = clientServerInfo.getApiport(); - String pathPrefixV0 = clientServerInfo.getPathPrefix_v0(); - // e.g. vcell.serverhost=vcellapi.cam.uchc.edu:443 - VCellApiClient apiClient = new VCellApiClient(host, port, pathPrefixV0, bIgnoreCertProblems, bIgnoreHostMismatch); - apiClient.authenticate(bIgnoreCertProblems); - - OptProblem optProblem = CopasiUtils.paramTaskToOptProblem(parameterEstimationTask); - - ObjectMapper objectMapper = new ObjectMapper(); - String optProblemJson = objectMapper.writeValueAsString(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(() -> { - try { - optIdHolder[0] = apiClient.submitOptimization(optProblemJson); - lg.info("submitted optimization jobID="+optIdHolder[0]); - if (optSolverCallbacks.getStopRequested()) { - apiClient.getOptRunJson(optIdHolder[0], optSolverCallbacks.getStopRequested()); - lg.info("user cancelled optimization jobID="+optIdHolder[0]); - } - } catch (Exception e) { - lg.error(e.getMessage(), e); - exceptHolder[0] = e; - } - }); - submitThread.setDaemon(true); - submitThread.start(); - - // - // wait here until either failure to submit or submitted and retrieved Job ID - // - while (optIdHolder[0] == null && exceptHolder[0] == null && !optSolverCallbacks.getStopRequested()) { - try { - Thread.sleep(200); - }catch (InterruptedException e){} - } - - // - // failed to submit, throw the exception now - // - if (exceptHolder[0] != null) { - throw exceptHolder[0]; - } - - - // - // loop to query status and collect results - // - final long TIMEOUT_MS = 1000 * 200; // 200 second timeout - long startTime = System.currentTimeMillis(); - if (clientTaskStatusSupport != null) { - clientTaskStatusSupport.setMessage("Waiting for progress..."); - } - Vcellopt optRun = null; - OptProgressReport latestProgressReport = null; - while ((System.currentTimeMillis() - startTime) < TIMEOUT_MS) { - // - // check for user stop request - // - boolean bStopRequested = optSolverCallbacks.getStopRequested(); - if (bStopRequested) { - lg.info("user cancelled optimization jobID="+optIdHolder[0]); - try { - apiClient.getOptRunJson(optIdHolder[0], bStopRequested); - lg.info("requested job to be stopped jobID="+optIdHolder[0]); - }catch (Exception e){ - lg.error(e.getMessage(), e); - }finally{ - if (latestProgressReport!=null){ - if (clientTaskStatusSupport != null) { - clientTaskStatusSupport.setProgress(100); - } - OptimizationResultSet copasiOptimizationResultSet = CopasiUtils.getOptimizationResultSet(parameterEstimationTask, latestProgressReport); - return copasiOptimizationResultSet; - } - } - throw UserCancelException.CANCEL_GENERIC; - } - - String optRunServerMessage = apiClient.getOptRunJson(optIdHolder[0], false); - if (optSolverCallbacks.getStopRequested()) { - throw UserCancelException.CANCEL_GENERIC; - } - if (optRunServerMessage.startsWith(VcelloptStatus.QUEUED.name() + ":")) { - if (clientTaskStatusSupport != null) { - clientTaskStatusSupport.setMessage("Queued..."); - } - - } else if (optRunServerMessage.startsWith(VcelloptStatus.FAILED.name()+":") || optRunServerMessage.toLowerCase().startsWith("exception:")){ - if (clientTaskStatusSupport != null) { - clientTaskStatusSupport.setMessage(optRunServerMessage); - } - - } else if (optRunServerMessage.startsWith(VcelloptStatus.RUNNING.name() + ":")) { - if (clientTaskStatusSupport != null) { - clientTaskStatusSupport.setMessage("Running (waiting for progress) ..."); - } - - } else { - // consider that optRunServerMessage is either a progress report (OptProgressReport) or a final solution (Vcellopt) - Object optObject = null; - try { - optObject = objectMapper.readValue(optRunServerMessage, Vcellopt.class); - }catch (Exception e){ - optObject = objectMapper.readValue(optRunServerMessage, OptProgressReport.class); - } - - if (optObject instanceof Vcellopt) { - // - // have final solution with progress report and analytics - // - optRun = (Vcellopt) optObject; - final OptProgressReport optProgressReport = optRun.getOptResultSet().getOptProgressReport(); - VcelloptStatus status = optRun.getStatus(); - if (optProgressReport != null){ - SwingUtilities.invokeLater(() -> optSolverCallbacks.setProgressReport(optProgressReport)); - } - if (status == VcelloptStatus.COMPLETE) { - lg.info("job " + optIdHolder[0] + ": status " + status + " " + optRun.getOptResultSet().toString()); - if (clientTaskStatusSupport != null) { - clientTaskStatusSupport.setProgress(100); - } - break; - } - if (status == VcelloptStatus.FAILED) { - String msg = "optimization failed, message=" + optRun.getStatusMessage(); - lg.error(msg); - throw new RuntimeException(msg); - } - lg.info("job " + optIdHolder[0] + ": status " + status); - }else if (optObject instanceof OptProgressReport){ - // - // have intermediate progress report - // - latestProgressReport = (OptProgressReport) optObject; - final OptProgressReport progressReport = latestProgressReport; - SwingUtilities.invokeLater(() -> { - try { - optSolverCallbacks.setProgressReport(progressReport); - } catch (Exception e) { - lg.error(optRunServerMessage, e); - } - if (clientTaskStatusSupport != null) { - int numFunctionEvaluations = 0; - if (progressReport.getProgressItems()!=null && progressReport.getProgressItems().size()>0){ - OptProgressItem lastItem = progressReport.getProgressItems().get(progressReport.getProgressItems().size()-1); - numFunctionEvaluations = lastItem.getNumFunctionEvaluations(); - } - clientTaskStatusSupport.setMessage("Running ..."); - } - }); - } - } - try { - Thread.sleep(2000); - }catch (InterruptedException e){} - } - if((System.currentTimeMillis()-startTime) >= TIMEOUT_MS) { - lg.warn("optimization timed out."); - throw new RuntimeException("optimization timed out."); - } - OptResultSet optResultSet = optRun.getOptResultSet(); - if(optResultSet == null) { - String msg = "optResultSet is null, status is " + optRun.getStatusMessage(); - lg.error(msg); - throw new RuntimeException(msg); - } - if(optResultSet != null && optResultSet.getOptParameterValues() == null) { - String msg = "getOptParameterValues is null, status is " + optRun.getStatusMessage(); - lg.error(msg); - throw new RuntimeException(msg); - } - if(clientTaskStatusSupport != null) { - clientTaskStatusSupport.setMessage("Done, getting results..."); - } - - OptimizationResultSet copasiOptimizationResultSet = CopasiUtils.optRunToOptimizationResultSet( - parameterEstimationTask, - optRun.getOptResultSet(), - new OptimizationStatus(OptimizationStatus.NORMAL_TERMINATION, optRun.getStatusMessage())); - lg.info("done with optimization"); - if (lg.isTraceEnabled()) { - lg.trace("-----------SOLUTION FROM VCellAPI---------------\n" + optResultSet.toString()); - } - - return copasiOptimizationResultSet; - }catch(UserCancelException e) { - throw e; - } catch (Exception e) { - lg.error(e.getMessage(), e); - throw new OptimizationException(e.getCause() != null ? e.getCause().getMessage() : e.getMessage(), e); - } - } - -} diff --git a/vcell-client/src/main/java/copasi/CopasiOptimizationSolverRemote.java b/vcell-client/src/main/java/copasi/CopasiOptimizationSolverRemote.java new file mode 100644 index 0000000000..6a4758ebb5 --- /dev/null +++ b/vcell-client/src/main/java/copasi/CopasiOptimizationSolverRemote.java @@ -0,0 +1,235 @@ +package copasi; + +import cbit.vcell.client.server.ClientServerInfo; +import cbit.vcell.modelopt.ParameterEstimationTask; +import cbit.vcell.opt.OptimizationException; +import cbit.vcell.opt.OptimizationResultSet; +import cbit.vcell.opt.OptimizationStatus; +import cbit.vcell.resource.PropertyLoader; +import com.fasterxml.jackson.databind.ObjectMapper; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.vcell.api.client.VCellApiClient; +import org.vcell.optimization.CopasiOptSolverCallbacks; +import org.vcell.optimization.CopasiUtils; +import org.vcell.optimization.jtd.*; +import org.vcell.util.ClientTaskStatusSupport; +import org.vcell.util.UserCancelException; + +import javax.swing.*; + +public class CopasiOptimizationSolverRemote { + private final static Logger lg = LogManager.getLogger(CopasiOptimizationSolverRemote.class); + + public static OptimizationResultSet solveRemoteApi( + ParameterEstimationTask parameterEstimationTask, + CopasiOptSolverCallbacks optSolverCallbacks, + ClientTaskStatusSupport clientTaskStatusSupport, + ClientServerInfo clientServerInfo) { + + // return solveLocalPython(parameterEstimationTask); + + try { + boolean bIgnoreCertProblems = PropertyLoader.getBooleanProperty(PropertyLoader.sslIgnoreCertProblems, false); + boolean bIgnoreHostMismatch = PropertyLoader.getBooleanProperty(PropertyLoader.sslIgnoreHostMismatch, false); + + String host = clientServerInfo.getApihost(); + int port = clientServerInfo.getApiport(); + String pathPrefixV0 = clientServerInfo.getPathPrefix_v0(); + // e.g. vcell.serverhost=vcellapi.cam.uchc.edu:443 + VCellApiClient apiClient = new VCellApiClient(host, port, pathPrefixV0, bIgnoreCertProblems, bIgnoreHostMismatch); + apiClient.authenticate(bIgnoreCertProblems); + + OptProblem optProblem = CopasiUtils.paramTaskToOptProblem(parameterEstimationTask); + + ObjectMapper objectMapper = new ObjectMapper(); + String optProblemJson = objectMapper.writeValueAsString(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(() -> { + try { + optIdHolder[0] = apiClient.submitOptimization(optProblemJson); + lg.info("submitted optimization jobID="+optIdHolder[0]); + if (optSolverCallbacks.getStopRequested()) { + apiClient.getOptRunJson(optIdHolder[0], optSolverCallbacks.getStopRequested()); + lg.info("user cancelled optimization jobID="+optIdHolder[0]); + } + } catch (Exception e) { + lg.error(e.getMessage(), e); + exceptHolder[0] = e; + } + }); + submitThread.setDaemon(true); + submitThread.start(); + + // + // wait here until either failure to submit or submitted and retrieved Job ID + // + while (optIdHolder[0] == null && exceptHolder[0] == null && !optSolverCallbacks.getStopRequested()) { + try { + Thread.sleep(200); + }catch (InterruptedException e){} + } + + // + // failed to submit, throw the exception now + // + if (exceptHolder[0] != null) { + throw exceptHolder[0]; + } + + + // + // loop to query status and collect results + // + final long TIMEOUT_MS = 1000 * 200; // 200 second timeout + long startTime = System.currentTimeMillis(); + if (clientTaskStatusSupport != null) { + clientTaskStatusSupport.setMessage("Waiting for progress..."); + } + Vcellopt optRun = null; + OptProgressReport latestProgressReport = null; + while ((System.currentTimeMillis() - startTime) < TIMEOUT_MS) { + // + // check for user stop request + // + boolean bStopRequested = optSolverCallbacks.getStopRequested(); + if (bStopRequested) { + lg.info("user cancelled optimization jobID="+optIdHolder[0]); + try { + apiClient.getOptRunJson(optIdHolder[0], bStopRequested); + lg.info("requested job to be stopped jobID="+optIdHolder[0]); + }catch (Exception e){ + lg.error(e.getMessage(), e); + }finally{ + if (latestProgressReport!=null){ + if (clientTaskStatusSupport != null) { + clientTaskStatusSupport.setProgress(100); + } + OptimizationResultSet copasiOptimizationResultSet = CopasiUtils.getOptimizationResultSet(parameterEstimationTask, latestProgressReport); + return copasiOptimizationResultSet; + } + } + throw UserCancelException.CANCEL_GENERIC; + } + + String optRunServerMessage = apiClient.getOptRunJson(optIdHolder[0], false); + if (optSolverCallbacks.getStopRequested()) { + throw UserCancelException.CANCEL_GENERIC; + } + if (optRunServerMessage.startsWith(VcelloptStatus.QUEUED.name() + ":")) { + if (clientTaskStatusSupport != null) { + clientTaskStatusSupport.setMessage("Queued..."); + } + + } else if (optRunServerMessage.startsWith(VcelloptStatus.FAILED.name()+":") || optRunServerMessage.toLowerCase().startsWith("exception:")){ + if (clientTaskStatusSupport != null) { + clientTaskStatusSupport.setMessage(optRunServerMessage); + } + + } else if (optRunServerMessage.startsWith(VcelloptStatus.RUNNING.name() + ":")) { + if (clientTaskStatusSupport != null) { + clientTaskStatusSupport.setMessage("Running (waiting for progress) ..."); + } + + } else { + // consider that optRunServerMessage is either a progress report (OptProgressReport) or a final solution (Vcellopt) + Object optObject = null; + try { + optObject = objectMapper.readValue(optRunServerMessage, Vcellopt.class); + }catch (Exception e){ + optObject = objectMapper.readValue(optRunServerMessage, OptProgressReport.class); + } + + if (optObject instanceof Vcellopt) { + // + // have final solution with progress report and analytics + // + optRun = (Vcellopt) optObject; + final OptProgressReport optProgressReport = optRun.getOptResultSet().getOptProgressReport(); + VcelloptStatus status = optRun.getStatus(); + if (optProgressReport != null){ + SwingUtilities.invokeLater(() -> optSolverCallbacks.setProgressReport(optProgressReport)); + } + if (status == VcelloptStatus.COMPLETE) { + lg.info("job " + optIdHolder[0] + ": status " + status + " " + optRun.getOptResultSet().toString()); + if (clientTaskStatusSupport != null) { + clientTaskStatusSupport.setProgress(100); + } + break; + } + if (status == VcelloptStatus.FAILED) { + String msg = "optimization failed, message=" + optRun.getStatusMessage(); + lg.error(msg); + throw new RuntimeException(msg); + } + lg.info("job " + optIdHolder[0] + ": status " + status); + }else if (optObject instanceof OptProgressReport){ + // + // have intermediate progress report + // + latestProgressReport = (OptProgressReport) optObject; + final OptProgressReport progressReport = latestProgressReport; + SwingUtilities.invokeLater(() -> { + try { + optSolverCallbacks.setProgressReport(progressReport); + } catch (Exception e) { + lg.error(optRunServerMessage, e); + } + if (clientTaskStatusSupport != null) { + int numFunctionEvaluations = 0; + if (progressReport.getProgressItems()!=null && progressReport.getProgressItems().size()>0){ + OptProgressItem lastItem = progressReport.getProgressItems().get(progressReport.getProgressItems().size()-1); + numFunctionEvaluations = lastItem.getNumFunctionEvaluations(); + } + clientTaskStatusSupport.setMessage("Running ..."); + } + }); + } + } + try { + Thread.sleep(2000); + }catch (InterruptedException e){} + } + if((System.currentTimeMillis()-startTime) >= TIMEOUT_MS) { + lg.warn("optimization timed out."); + throw new RuntimeException("optimization timed out."); + } + OptResultSet optResultSet = optRun.getOptResultSet(); + if(optResultSet == null) { + String msg = "optResultSet is null, status is " + optRun.getStatusMessage(); + lg.error(msg); + throw new RuntimeException(msg); + } + if(optResultSet != null && optResultSet.getOptParameterValues() == null) { + String msg = "getOptParameterValues is null, status is " + optRun.getStatusMessage(); + lg.error(msg); + throw new RuntimeException(msg); + } + if(clientTaskStatusSupport != null) { + clientTaskStatusSupport.setMessage("Done, getting results..."); + } + + OptimizationResultSet copasiOptimizationResultSet = CopasiUtils.optRunToOptimizationResultSet( + parameterEstimationTask, + optRun.getOptResultSet(), + new OptimizationStatus(OptimizationStatus.NORMAL_TERMINATION, optRun.getStatusMessage())); + lg.info("done with optimization"); + if (lg.isTraceEnabled()) { + lg.trace("-----------SOLUTION FROM VCellAPI---------------\n" + optResultSet.toString()); + } + + return copasiOptimizationResultSet; + }catch(UserCancelException e) { + throw e; + } catch (Exception e) { + lg.error(e.getMessage(), e); + throw new OptimizationException(e.getCause() != null ? e.getCause().getMessage() : e.getMessage(), e); + } + } +} diff --git a/vcell-client/src/main/java/org/vcell/optimization/gui/ParameterEstimationRunTaskPanel.java b/vcell-client/src/main/java/org/vcell/optimization/gui/ParameterEstimationRunTaskPanel.java index cae54d899f..d66c778925 100644 --- a/vcell-client/src/main/java/org/vcell/optimization/gui/ParameterEstimationRunTaskPanel.java +++ b/vcell-client/src/main/java/org/vcell/optimization/gui/ParameterEstimationRunTaskPanel.java @@ -40,13 +40,13 @@ import cbit.vcell.resource.PropertyLoader; import cbit.vcell.solver.Simulation; import cbit.vcell.solver.ode.ODESolverResultSet; +import copasi.CopasiOptimizationSolverRemote; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.vcell.util.gui.GeneralGuiUtils; import org.vcell.client.logicalwindow.LWContainerHandle; import org.vcell.client.logicalwindow.LWNamespace; import org.vcell.optimization.CopasiOptSolverCallbacks; -import copasi.CopasiOptimizationSolver; import org.vcell.optimization.CopasiUtils; import org.vcell.optimization.ParameterEstimationTaskSimulatorIDA; import org.vcell.optimization.jtd.OptProgressItem; @@ -1168,7 +1168,7 @@ public void run(Hashtable hashTable) throws Exception { // OptimizationResultSet optResultSet = CopasiOptimizationSolver.solveLocalPython(parameterEstimationTask); ClientServerInfo clientServerInfo = TopLevelWindowManager.activeManager().getRequestManager().getClientServerInfo(); optSolverCallbacks.setProgressReport(new OptProgressReport()); - OptimizationResultSet optResultSet = CopasiOptimizationSolver.solveRemoteApi(parameterEstimationTask, optSolverCallbacks, getClientTaskStatusSupport(), clientServerInfo); + OptimizationResultSet optResultSet = CopasiOptimizationSolverRemote.solveRemoteApi(parameterEstimationTask, optSolverCallbacks, getClientTaskStatusSupport(), clientServerInfo); hashTable.put(ORS_KEY, optResultSet); } diff --git a/vcell-core/src/main/java/org/vcell/optimization/CopasiOptimizationSolver.java b/vcell-core/src/main/java/org/vcell/optimization/CopasiOptimizationSolver.java new file mode 100644 index 0000000000..816b6fcff3 --- /dev/null +++ b/vcell-core/src/main/java/org/vcell/optimization/CopasiOptimizationSolver.java @@ -0,0 +1,36 @@ +/* + * Copyright (C) 1999-2011 University of Connecticut Health Center + * + * Licensed under the MIT License (the "License"). + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * + * http://www.opensource.org/licenses/mit-license.php + */ + +package org.vcell.optimization; + +import cbit.vcell.modelopt.ParameterEstimationTask; +import cbit.vcell.opt.OptimizationException; +import cbit.vcell.opt.OptimizationResultSet; +import org.vcell.optimization.jtd.OptProblem; +import org.vcell.optimization.jtd.Vcellopt; + + +public class CopasiOptimizationSolver { + public static OptimizationResultSet solveLocalPython(ParameterEstimationTask parameterEstimationTask) + throws OptimizationException { + + try { + parameterEstimationTask.refreshMappings(); + OptProblem optProblem = CopasiUtils.paramTaskToOptProblem(parameterEstimationTask); + Vcellopt optRun = CopasiUtils.runCopasiParameterEstimation(optProblem); + OptimizationResultSet copasiOptimizationResultSet = CopasiUtils.toOptResults( + optRun,parameterEstimationTask, new ParameterEstimationTaskSimulatorIDA()); + return copasiOptimizationResultSet; + } catch (Exception e){ + throw new OptimizationException(e.getCause() != null ? e.getCause().getMessage() : e.getMessage(), e); + } + } + +} diff --git a/vcell-client/src/main/java/copasi/modelopt/OptimizationService.java b/vcell-core/src/main/java/org/vcell/optimization/OptimizationService.java similarity index 93% rename from vcell-client/src/main/java/copasi/modelopt/OptimizationService.java rename to vcell-core/src/main/java/org/vcell/optimization/OptimizationService.java index 3c06d5e3b3..af7eeaef9a 100644 --- a/vcell-client/src/main/java/copasi/modelopt/OptimizationService.java +++ b/vcell-core/src/main/java/org/vcell/optimization/OptimizationService.java @@ -1,8 +1,6 @@ -package copasi.modelopt; +package org.vcell.optimization; import cbit.vcell.modelopt.ParameterEstimationTask; -import org.vcell.optimization.CopasiOptSolverCallbacks; -import copasi.CopasiOptimizationSolver; import org.vcell.util.Issue; import org.vcell.util.IssueContext; diff --git a/vcell-client/src/main/java/copasi/modelopt/ProfileLikelihood.java b/vcell-core/src/main/java/org/vcell/optimization/ProfileLikelihood.java similarity index 97% rename from vcell-client/src/main/java/copasi/modelopt/ProfileLikelihood.java rename to vcell-core/src/main/java/org/vcell/optimization/ProfileLikelihood.java index cfaa38d566..7a693c8deb 100644 --- a/vcell-client/src/main/java/copasi/modelopt/ProfileLikelihood.java +++ b/vcell-core/src/main/java/org/vcell/optimization/ProfileLikelihood.java @@ -1,4 +1,4 @@ -package copasi.modelopt; +package org.vcell.optimization; import java.io.File; import java.util.ArrayList; import java.util.Arrays; diff --git a/vcell-client/src/test/java/copasi/CopasiOptimizationSolverTest.java b/vcell-core/src/test/java/org/vcell/optimization/CopasiOptimizationSolverTest.java similarity index 99% rename from vcell-client/src/test/java/copasi/CopasiOptimizationSolverTest.java rename to vcell-core/src/test/java/org/vcell/optimization/CopasiOptimizationSolverTest.java index 2e0fb576c5..e513fdc40c 100644 --- a/vcell-client/src/test/java/copasi/CopasiOptimizationSolverTest.java +++ b/vcell-core/src/test/java/org/vcell/optimization/CopasiOptimizationSolverTest.java @@ -1,4 +1,4 @@ -package copasi; +package org.vcell.optimization; import cbit.vcell.biomodel.BioModel; import cbit.vcell.mapping.MappingException; @@ -15,7 +15,6 @@ import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.Test; -import org.vcell.optimization.CopasiUtils; import org.vcell.optimization.jtd.OptProblem; import org.vcell.optimization.jtd.Vcellopt; import org.vcell.util.ClientTaskStatusSupport;