Skip to content
This repository has been archived by the owner on Aug 24, 2020. It is now read-only.

Commit

Permalink
Version 7.3.0
Browse files Browse the repository at this point in the history
Version 7.3.0
  • Loading branch information
msevestre committed Jun 12, 2018
2 parents 543d08b + 12eb35b commit b6c0948
Show file tree
Hide file tree
Showing 59 changed files with 763 additions and 436 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@
[submodule "lib/DCI"]
path = lib/DCI
url = https://github.com/Open-Systems-Pharmacology/DCI.git
[submodule "lib/Schema"]
path = lib/Schema
url = https://github.com/Open-Systems-Pharmacology/OSPSuite.SimModel.Schema.git
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ nuget restore packages.config -PackagesDirectory packages
```
* create the package and setup
```
rake create_setup[7.1.0]
rake create_setup[7.2.0]
```

## Code Status
[![Build status](https://ci.appveyor.com/api/projects/status/6wssc33akfebg3yk/branch/master?svg=true&passingText=master%20-%20passing)](https://ci.appveyor.com/project/open-systems-pharmacology-ci/r-toolbox/branch/master)
[![Build status](https://ci.appveyor.com/api/projects/status/6wssc33akfebg3yk/branch/develop?svg=true&passingText=develop%20-%20passing)](https://ci.appveyor.com/project/open-systems-pharmacology-ci/r-toolbox/branch/develop)

## Code of conduct
Everyone interacting in the Open Systems Pharmacology community (codebases, issue trackers, chat rooms, mailing lists etc...) is expected to follow the Open Systems Pharmacology [code of conduct](https://github.com/Open-Systems-Pharmacology/Suite/blob/master/CODE_OF_CONDUCT.md).
Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
environment:
app_version: '7.2.0'
app_version: '7.3.0'
R_INSTALL_DIR: 'C:\ProgramData\R\'
R_TOOLS_INSTALL_DIR: 'C:\ProgramData\RTools\'

Expand Down
2 changes: 1 addition & 1 deletion lib/DCI
Binary file removed lib/DCIR/DCIR6_0.dll
Binary file not shown.
Binary file removed lib/DCIR/DCIR6_0.lib
Binary file not shown.
Binary file removed lib/DCIR/DCIR6_0.pdb
Binary file not shown.
Binary file added lib/DCIR/x64/DCIR6_1.dll
Binary file not shown.
Binary file added lib/DCIR/x64/DCIR6_1.lib
Binary file not shown.
Binary file added lib/DCIR/x64/DCIR6_1.pdb
Binary file not shown.
Binary file added lib/DCIR/x86/DCIR6_1.dll
Binary file not shown.
Binary file added lib/DCIR/x86/DCIR6_1.lib
Binary file not shown.
Binary file added lib/DCIR/x86/DCIR6_1.pdb
Binary file not shown.
1 change: 1 addition & 0 deletions lib/Schema
Submodule Schema added at ba10b2
8 changes: 4 additions & 4 deletions packages.config
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="OSPSuite.FuncParser" version="2.0.0.1" />
<package id="OSPSuite.SimModelSolver_CVODES282" version="2.0.0.1" />
<package id="OSPSuite.SimModel" version="2.2.0.6"/>
<package id="OSPSuite.SimModelComp" version="2.2.0.6"/>
<package id="OSPSuite.FuncParser" version="3.0.0.6"/>
<package id="OSPSuite.SimModelSolver_CVODES282" version="3.0.0.7" />
<package id="OSPSuite.SimModel" version="3.0.0.16"/>
<package id="OSPSuite.SimModelComp" version="3.0.0.16"/>
</packages>
8 changes: 6 additions & 2 deletions rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,10 @@ def add_component_files_to_archive
copy_files 'OSPSuite.SimModelComp', 'xml'
end

copy_depdencies lib_dir, decompressed_lib_dir do
copy_schema_xsd
end

command_line = %W[a #{zip_archive} #{decompressed_dir}]
zip command_line
end
Expand Down Expand Up @@ -124,8 +128,8 @@ def copy_setup_files
end

copy_depdencies lib_dir, toolbox_src_dir do
copy_dci_dll
copy_dcir_dll
copy_files File.join('DCI','x86'), 'dll'
copy_files File.join('DCIR','x86'), 'dll'
end

copy_depdencies src_dir, toolbox_R_dir do
Expand Down
4 changes: 2 additions & 2 deletions setup/NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
exportPattern("^[^\\.]")
useDynLib(DCIR6_0, .registration = TRUE)
useDynLib(DCIR6_0, RDCI_Configure, RDCI_DestroyAllComponents, RDCI_DestroyComponent, RDCI_GetInputTable, RDCI_GetInputTables, RDCI_GetLastError, RDCI_GetOutputTable, RDCI_GetOutputTables, RDCI_GetParameterTable, RDCI_GetParameterTables, RDCI_Help, RDCI_Invoke, RDCI_LoadComponent, RDCI_LoadInputTable, RDCI_LoadParameterTable, RDCI_LongInf, RDCI_LongNaN, RDCI_LongNegInf, RDCI_ProcessData, RDCI_ProcessMetaData, RDCI_SaveInputTable, RDCI_SaveOutputTable, RDCI_SaveParameterTable, RDCI_SetInputTable, RDCI_SetInputTables, RDCI_SetOutputTable, RDCI_SetOutputTables, RDCI_SetParameterTable, RDCI_SetParameterTables)
useDynLib(DCIR6_1, .registration = TRUE)
useDynLib(DCIR6_1, RDCI_Configure, RDCI_DestroyAllComponents, RDCI_DestroyComponent, RDCI_GetInputTable, RDCI_GetInputTables, RDCI_GetLastError, RDCI_GetOutputTable, RDCI_GetOutputTables, RDCI_GetParameterTable, RDCI_GetParameterTables, RDCI_Help, RDCI_Invoke, RDCI_LoadComponent, RDCI_LoadInputTable, RDCI_LoadParameterTable, RDCI_LongInf, RDCI_LongNaN, RDCI_LongNegInf, RDCI_ProcessData, RDCI_ProcessMetaData, RDCI_SaveInputTable, RDCI_SaveOutputTable, RDCI_SaveParameterTable, RDCI_SetInputTable, RDCI_SetInputTables, RDCI_SetOutputTable, RDCI_SetOutputTables, RDCI_SetParameterTable, RDCI_SetParameterTables)
2 changes: 1 addition & 1 deletion src/code/MobiSettings.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ MobiSettings <- function(libraryName = "MoBiToolboxForR")
Sys.setenv(path = paste(libpath, Sys.getenv("path"), sep =";"))
MobiSettings <- list("SimModelSchema" = paste(libpath,"\\OSPSuite.SimModel.xsd", sep=""),
"SimModelComp" = paste(libpath, "\\OSPSuite_SimModelComp.xml", sep=""),
"RInterface" = paste(libpath,"\\DCIR6_0.dll", sep=""));
"RInterface" = paste(libpath,"\\DCIR6_1.dll", sep=""));
}
}

Expand Down
21 changes: 18 additions & 3 deletions src/code/findTableIndex.R
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,33 @@ findTableIndex <- function(path_id = numeric(0), tableID = numeric(0), isReferen
indx <- 1:counts
if (path_id != '*')
{
# As escaping of certain symbols in path names had to be done manually in previous releases but is performed
# automatically now, a warning message is displayed when manual escaping is detected. This warning message
# should be removed in future.
for (symbol in c("\\(", "\\)", "\\[", "\\]")){
if (grepl(symbol, path_id, fixed = TRUE)){
warning(paste(path_id, ": Escaping of the characters '(', ')', '[', and '[' in path names should not be done manually!"), immediate. = TRUE )
break
}
}
searchValue <- path_id
searchValue <- gsub('|', '\\|', searchValue, fixed = TRUE)
searchValue <- gsub('&', '\\&', searchValue, fixed = TRUE)
searchValue <- gsub('(', '\\(', searchValue, fixed = TRUE)
searchValue <- gsub(')', '\\)', searchValue, fixed = TRUE)
searchValue <- gsub('[', '\\[', searchValue, fixed = TRUE)
searchValue <- gsub(']', '\\]', searchValue, fixed = TRUE)
searchValue <- gsub('*', '.*', searchValue, fixed = TRUE)
searchValue <- paste("^", searchValue, "$", sep="")
searchPathes <- Table$Path

indx <- grep(searchValue, searchPathes, perl = TRUE)
}
} else
{
indx <- 0
}
# If no parameter found, return a zero-lenght integer vector to match the behavior of which().
# This way, a not found parameter should be recognized by checking for (length(indx) == 0)
else{
indx <- integer(0);
}
}
return(indx)
Expand Down
3 changes: 2 additions & 1 deletion src/code/getObserverFormula.R
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ getObserverFormula <- function(path_id = "*", options = {}, DCI_Info = {})

if (length(indx) == 0)
{
stop(paste("Observer with path_id", path_id, "does not exist for specified type", options$Type))
warning(paste("Observer with path_id", path_id, "does not exist for specified type", options$Type))
return(list(Value = NULL, Index = NULL));
}

if (toupper(options$Type) != "REFERENCE")
Expand Down
18 changes: 17 additions & 1 deletion src/code/getParameter.R
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ getParameter <- function(path_id = "*", options = {}, DCI_Info = {})

if (length(indx) == 0)
{
stop(paste("Parameter with path_id", path_id, "does not exist for specified parameter type", options$Type))
warning(paste("Parameter with path_id", path_id, "does not exist for specified parameter type", options$Type))
return(list(Value = NULL, Index = NULL));
}

if (toupper(options$Type) != "REFERENCE")
Expand Down Expand Up @@ -116,6 +117,21 @@ getParameter <- function(path_id = "*", options = {}, DCI_Info = {})
id <- Table$ID[i]
x <- ParameterTable$Time[which(ParameterTable$ID == id)]
y <- ParameterTable$Value[which(ParameterTable$ID == id)]

# for parameter type current search also readonly options if not found in variable options
if ((length(x) == 0) & (toupper(options$Type) == "CURRENT"))
{
iParameterTable = which(names(DCI_Info$InputTab) == "AllTableParameters");
if (toupper(options$Type) != "REFERENCE")
{
ParameterTable <- DCI_Info$InputTab[[iParameterTable]]
} else {
ParameterTable <- DCI_Info$ReferenceTab[[iParameterTable]]
}
x <- ParameterTable$Time[which(ParameterTable$ID == id)]
y <- ParameterTable$Value[which(ParameterTable$ID == id)]
}

newy <- approx(x=x, y=y, xout=options$TimeProfile, method="linear", rule=2)$y
if (length(options$TimeProfile) > 1)
{
Expand Down
3 changes: 2 additions & 1 deletion src/code/getSpeciesInitialValue.R
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ getSpeciesInitialValue <- function(path_id = "*", options = {}, DCI_Info = {})
}
if (length(indx) == 0)
{
stop(paste("Initial value with path_id", path_id, "does not exist for specified type", options$Type))
warning(paste("Table parameter with path_id", path_id, "does not exist for specified parameter type", options$Type))
return(list(Value = NULL, Index = NULL));
}

if (toupper(options$Type) != "REFERENCE")
Expand Down
3 changes: 2 additions & 1 deletion src/code/getTableParameter.R
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ getTableParameter <- function(path_id = "*", options = {}, DCI_Info = {})

if (length(indx) == 0)
{
stop(paste("Parameter with path_id", path_id, "does not exist for specified parameter type", options$Type))
warning(paste("Table parameter with path_id", path_id, "does not exist for specified parameter type", options$Type))
return(list(ID = NULL, Time = NULL, Value = NULL, RestartSolver = NULL));
}

if (toupper(options$Type) != "REFERENCE")
Expand Down
6 changes: 3 additions & 3 deletions src/code/initSimulation.R
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ CheckXML <- function(XML)
return(0)
}

initSimulation <- function(XML = "", ParamList = numeric(0), whichInitParam = "", further_options = "", Version = "6_0", SimulationNumber = 1)
initSimulation <- function(XML = "", ParamList = numeric(0), whichInitParam = "", further_options = "", Version = "6_1", SimulationNumber = 1)
{
DCI_Info <- list()
if (XML == "")
Expand All @@ -84,9 +84,9 @@ initSimulation <- function(XML = "", ParamList = numeric(0), whichInitParam = ""
stop ("No parameters can be initialized. Please provide either 'ParamList' or 'whichInitParam' with one the following valid keywords: all, none, allNonFormula.")
}

# load DCIR6_0-DLL
# load DCIR6_1-DLL

if (length(grep("DCIR6_0", names(getLoadedDLLs()), fixed =TRUE)) ==0)
if (length(grep("DCIR6_1", names(getLoadedDLLs()), fixed =TRUE)) ==0)
{
dyn.load(DCI_Info$MOBI_SETTINGS$RInterface)
}
Expand Down
Binary file removed src/lib/DCI6_0.dll
Binary file not shown.
Binary file removed src/lib/DCIR6_0.dll
Binary file not shown.
Binary file removed src/lib/SPSuite.FuncParser.dll
Binary file not shown.
Loading

0 comments on commit b6c0948

Please sign in to comment.