setResource function

Set resource dynamics