Ok, so say I have been designated a SID to follow after takeoff, the SID has strict rules for climbing for example at 4000ft at a certain waypoint, then 5000ft next one and so on. Then after takeoff atc instructs me let say for example "climb FL 150". Should I just forget the published restrictions and shoot up or obey the restrictions until past the last restriction point and then just climb to assigned FL? And if I follow the restrictions, say the ATC directs starts all of a sudden giving me vectors (which take me off my published SID lateral route) out of the terminal area, can I at that point forget about the alt restrictions since I am not even flying the published SID anymore?
Thanks!