Skip to main content
Solved

Question about sets that involve the dollar symbol ‘$’

  • May 27, 2020
  • 1 reply
  • 130 views

Curious AIMMS-bot
AIMMSian
Forum|alt.badge.img+1

Hi all,

I would like to define a set of valid CAPEX units.  To this end, I wrote:

Set SI_Valid_CAPEX_Cost_Units {

    Definition: {

        data{$/kW,$/MJ}


    }

}

However, I obtain the compilation error “The symbol “$” is not expected.”  The error points to the line data{$/kW,$/MJ}

 

I can’t figure out why, since I defined another set this way:

Set PossibleUnits {

    Definition: data { g, kg, oz, j, kj, kcal };

}

 

Best answer by Curious AIMMS-bot

Alright ! I should put my elements between single quotes '$/kW' when declaring them, as follows:

data{'$/kW','$/MJ'}

With special characters, it is mandatory.

View original

1 reply

Curious AIMMS-bot
AIMMSian
Forum|alt.badge.img+1

Alright ! I should put my elements between single quotes '$/kW' when declaring them, as follows:

data{'$/kW','$/MJ'}

With special characters, it is mandatory.


Reply