[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
CAPE-OPEN • View topic - Vector parameters in SciLab Unit Operation?
Page 1 of 1

Vector parameters in SciLab Unit Operation?

PostPosted: 09 May 2020, 18:32
by cocofan
My question is regarding the input/output parameters in COCO custom models, e.g., SciLab or MATLAB CAPE-OPEN Unit Operations. Is there any way to define a parameter as a vector with its size being the number of components? For example, in a membrane module you may need to ask the user to enter permeance, which is defined per component and you don't know in advance how many components exist (so you don't know how many scalar parameters you should define).
As an alternative, is it possible to define such parameters as a new property in the thermo package (so it is automatically populated for every component)?
Any solution or workaround to this issue would be appreciated!

Re: Vector parameters in SciLab Unit Operation?

PostPosted: 10 May 2020, 08:49
by jasper
The parameters that are exposed by a property package, that is up to the property package. Apart from that parameter support for property packages is virtually non-existent.

If you want to automatically populate all unit operations of your particular type, I suppose you can have machinery that is specific to your unit operation (perhaps a centrally located data file with data for all compounds?).

The Scilab CAPE-OPEN unit operation currently does not allow for exposing array parameters. Can you illustrate how you would use such a parameter? Is it just so that the user can change it?

Re: Vector parameters in SciLab Unit Operation?

PostPosted: 10 May 2020, 15:54
by cocofan

Re: Vector parameters in SciLab Unit Operation?

PostPosted: 11 May 2020, 07:52
by jasper

Re: Vector parameters in SciLab Unit Operation?

PostPosted: 11 May 2020, 19:58
by cocofan

Re: Vector parameters in SciLab Unit Operation?

PostPosted: 11 May 2020, 20:49
by jasper
Glad to hear it works.