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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

C<br />

C Inputs:<br />

C<br />

INTEGER ID<br />

C<br />

C Outputs:<br />

C<br />

INTEGER NS<br />

C<br />

C This GSE has two internal states.<br />

NS = 2<br />

<strong>Welcome</strong> <strong>to</strong> <strong>Adams</strong>/<strong>Solver</strong> <strong>Subroutines</strong><br />

RETURN<br />

END<br />

C<br />

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

C<br />

GSE_SET_SAMPLE_OFFSET<br />

This subroutine is used <strong>to</strong> specify the simulation time at which the sampling of the discrete states is <strong>to</strong><br />

start.<br />

See the definition of the SAMPLE_OFFSET 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_SAMPLE_OFFSET entry<br />

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

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

called.<br />

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

SAMPLE_OFFSET attribute setting that is specified in the GSE statement.<br />

This user-defined subroutine is new for <strong>Adams</strong>/<strong>Solver</strong> (C++) v2006r1 and gives the GSE the ability <strong>to</strong><br />

set the SAMPLE_OFFSET attribute itself. That is, the formulation of a GSE can be changed without<br />

changing the corresponding <strong>Adams</strong> model (.amd).<br />

Calling Sequence and Structure<br />

SUBROUTINE GSE_SET_SAMPLE_OFFSET (ID, SAMPLE_OFFSET)<br />

49

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

Saved successfully!

Ooh no, something went wrong!