how to write the condition (A or B) and C

If you are talking about constraints in the optimization sense (equations + inequations), this is called disjunctive programming, it is kind of a large subtopic of optimization. Some tools:

LogMIP: https://www.gams.com/latest/docs/userguides/mccarl/logmip.htm
EMP: https://www.gams.com/latest/docs/userguides/mccarl/extended_mathematical_programs.htm

or learn to do it yourself ! :slight_smile: http://www.minlp.org/pdf/GBDEWOGrossmann.pdf

good luck!