Add function for get cost order.
Add Constraint.
Rewrited shema (add one table).