02.04.2013 Views

Welcome to Adams/Solver Subroutines - Kxcad.net

Welcome to Adams/Solver Subroutines - Kxcad.net

Welcome to Adams/Solver Subroutines - Kxcad.net

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

50<br />

<strong>Adams</strong>/<strong>Solver</strong><br />

Input Arguments<br />

ID An integer variable that gives the identifier of the GSE statement requesting information<br />

from the GSE subroutine.<br />

Output Arguments<br />

SAMPLE_OFFSET A double-precision variable specifying time simulation time at which the<br />

sampling of the discrete states is <strong>to</strong> start.<br />

Example<br />

C<br />

C+=================================================================*<br />

C<br />

SUBROUTINE GSE_SET_SAMPLE_OFFSET (ID, SAMPLE_OFFSET)<br />

C<br />

C Inputs:<br />

C<br />

INTEGER ID<br />

C<br />

C Outputs:<br />

C<br />

DOUBLE_PRECISION STATIC_HOLD<br />

C<br />

C Discrete states are <strong>to</strong> be sampled at time at time = 1.23.<br />

C<br />

SAMPLE_OFFSET = 1.23<br />

RETURN<br />

END<br />

C<br />

C+=================================================================*<br />

C<br />

GSE_SET_STATIC_HOLD<br />

This subroutine is used <strong>to</strong> enforce the condition that continuous states are or are not allowed <strong>to</strong> change<br />

during a static or quasi-static simulation.<br />

See the definition of the STATIC_HOLD attribute in the documentation for the GSE statement.<br />

When the GSE is initialized <strong>Adams</strong>/<strong>Solver</strong> (C++) will look for a GSE_SET_STATIC_HOLD entry point<br />

in the GSE (if it was not explicitly specified using the ROUTINE=). If GSE_SET_STATIC_HOLD is<br />

present, then during initialization of the GSE this subroutine will be called.<br />

Note: The value returned by GSE_SET_STATIC_HOLD will override any STATIC_HOLD<br />

attribute setting that is specified in the GSE statement.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!