This function constructs a conditional expression node of type "when",
representing GAMS-style conditional terms using the $ operator,
if ... else ... statements in Julia/JuMP, if ... in ... in Python/Pyomo,
etc.
Examples
ast_when(
condition = ast_symbol("i_active(i)"),
then = ast_variable("x", c("i"))
)
#> <AST when>
#> condition:
#> <AST symbol> i_active(i)
#> then :
#> <AST variable> x
#> dims: i
#> otherwise :
#> NULL
