Skip to content

Segmentation fault using if-then-else with strings #487

Description

@elKei24

The following example gives me a segmentation fault:

var bool: b;
var string: s = if b then "foo" else "bar" endif;

I came across this because I have a model with some choices for the solver to make and some variables that depending on the choice do not matter any more. I do not want these irrelevant variables in my output any more, like this:

var bool: b; var 0..10: i; var 5..15: j;
output [ if b then "i=\(i)" else "j=\(j)" endif ];
solve maximize if b then i else j endif;

I guess this is not possible so far, right?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    resolvedIssue is resolved and the feature or fix will be part of next release

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions