Some of the problems can be seen by running the "Designer specification" section of DemoScript.m in the SequentialExperimentDesign branch. There is a dataFilename parameter to the formPropensitiesGeneral method; since the code doesn't document any constraints on this name, I have been using trial-and-error to figure out how best to set this parameter for the SED codes (particularly in the model factory).
Here is the relevant code:
sed = SequentialExperimentDesigner();
sed.DataType = ExperimentalDataType.Empirical;
[~, dataFilename, ~] = fileparts(tempname(pwd));
addpath(genpath('..'));
sed.Model = DiscoverableModelFactory.createModel("GR", dataFilename);
Here is the MATLAB output:
Error using sym/matlabFunction>getOptions (line 812)
The value of 'File' is invalid. It must satisfy the function: isFile.
Error in sym/matlabFunction (line 154)
opts = getOptions(args);
^^^^^^^^^^^^^^^^
Error in ssit.Propensity>sym2mFun (line 850)
exprHandle = matlabFunction(symbolicExpression,'Vars',{states,parameters},'File',fn,'Sparse',false);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in ssit.Propensity.createAsHybridVec (line 401)
sym2mFun(signHybridFactor*expr_x, false, true, nonXTpars(:,1), speciesStoch, [], false, true, prefixNameLocal);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in SSIT/formPropensitiesGeneral (line 157)
ssit.Propensity.createAsHybridVec(sm, obj.stoichiometry,...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in DiscoverableModelFactory.createModel (line 119)
m = m.formPropensitiesGeneral(append(dataFilename,"_S",num2str(ind)),true);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Note that I had to make several changes first.
- The original line 119 in
DiscoverableModelFactory.m utilized array concatenation ([dataFilename,'_S',num2str(ind)]) to create a scalar prefixName. For whatever reason, the elements weren't being concatenated successfully, so I used the append method instead.
- Even after that fix, an analogous problem (a non-scalar argument) arose on line 222 in
Propensity.m, so I also changed that code to use append (see this commit).
- In (randomly) generating my temporary filename, I am also stripping out the path and extension so that no path delimiters are present.
My first guess, reading the error message, is that either no file has been created with the exact filename provided in the call to matlabFunction, or some incorrect value of fn is being passed.
Some of the problems can be seen by running the "Designer specification" section of
DemoScript.min theSequentialExperimentDesignbranch. There is adataFilenameparameter to theformPropensitiesGeneralmethod; since the code doesn't document any constraints on this name, I have been using trial-and-error to figure out how best to set this parameter for the SED codes (particularly in the model factory).Here is the relevant code:
Here is the MATLAB output:
Note that I had to make several changes first.
DiscoverableModelFactory.mutilized array concatenation ([dataFilename,'_S',num2str(ind)]) to create a scalarprefixName. For whatever reason, the elements weren't being concatenated successfully, so I used theappendmethod instead.Propensity.m, so I also changed that code to useappend(see this commit).My first guess, reading the error message, is that either no file has been created with the exact filename provided in the call to
matlabFunction, or some incorrect value offnis being passed.