Presented research investigates two essential production planning problems - Capacitated Lot Sizing Problem (CLSP) and Discrete Lot Sizing and Scheduling Problem (DLSP) - that are affected by uncertain demand. In particular, a manufacturer possesses information about upper and lower bounds of potential demand, and information about market is updated online, meaning that the new information about demand comes into the system gradually over the time (e.g. at the end of each planning period).Worst-case analysis, competitive analysis and robust optimization techniques were applied to the uncertain CLSP and DLSP. Theorems that define the worst case demand scenario and the formula for competitive ratio were formulated and proved for the specific CLSP structures. Corresponding Robust Counterparts and Affinely Adjustable Robust Counterparts (AARCs) were successfully constructed for the initial uncertain problems. The AARCs were considered for the optimization of the worst-case demand scenario and weighted sum of several demand scenarios respectively. All constructed models were applied to the lot sizing problem with the real data and evaluated based on the demand scenario simulation. The interrelation between the magnitude of uncertainty and the distance of the obtained solution from the optimal one was analyzed. An original technique was proposed to achieve the integrality of decision variables from the initial mixed integer CLSP and DLSP. It is capable to ensure integrality restrictions on a prescribed part of the decision variables in the context of affinely adjustable decision rules. The implemented method is competitive and can be used in other applications of robust optimization.