Guidelines for Coding

All the guidelines should be followed without fail for timely acceptance of code and award of the internship. Failure to do so might result in rejection of your work.

  1. Strictly use OpenModelica 1.9.6 and higher versions for coding.
  2. Donot use any alphas/betas/nightly builds versions for coding in TextBook Companion Internship. Use the stable release versions only.
  3. The codes should follow the naming convention as given below, the codes will not be approved if the naming convention is not followed as instructed. For example, 3rd solved problem from chapter 1 (Example 1.3) should be represented by code named as Ex1_3.mo.
  4. Use package, model, function, record Specialisations for each problem, as per need.
  5. Name of the code and name of the model/class should be same. If an example is named as Ex1_3.mo then the model should also be named as model Ex1_3.
  6. If problems have subparts, then code it as a package containing its subparts as models.
  7. The dependencies on other codes/functions (if any) should be mentioned as a comment clearly before starting the code.
  8. If the textbook contains significant errors(More than 2 % deviation in calculations/results), mention the same as a comment at the end such as
  • "The  answer may slightly vary due to  rounding off values"   
  • "The  answer provided in the textbook is wrong"
  1. Do not reproduce exact problem statements or text from the textbooks, in your code.
  2. Coding of examples by reproducing them from any other sources is not allowed. Any contributor found guilty of any such copying will be penalised.
  3. It is mandatory to specify units (if any) and description of all variables, parameters and constants during declaration.
  4. The units and description for the varibales must be mentioned in a manner that they are being compiled and displayed along side variable values under plotting perspective. A sample file is attached here for reference.
  5. Appropriate comments should be put up, wherever needed, which will make the code easily understandable. The comments should help in highlighting the flow of logic being used. For example, an equation like R = V/I can have comment as "Ohm's Law" along with it.
  6. The symbols used in the code should be same as those being used in the textbook.
  7. If any changes are made or any further information is added to the Simulation Setup window to run any particular code, please comment the same at the beginning of the code.
  8. Once you have completed coding, mail us at  contact-om(at)fossee(dot)in with complete details including your name and allotted book.