Java solver api. You can use VariableFactory.