Writing Program and Solver Status using Dex: values rather than labels

  • 29 August 2023
  • 3 replies

Badge +1

While writing the suffices ProgramStatus and SolverStatus from a MathematicalProgram identifier to an Excel file using DEX I get numeric values rather than the lables indicated in this table:


Is there any way to write these labels rather than the corresponding numeric values?

Otherwise, where could I find the corresponding mapping between the numeric values and the labels (status) referred in the previous table?


Best answer by gdiepen 30 August 2023, 20:45

View original

3 replies

Userlevel 5
Badge +7

Not sure what code you are using to write the values, but one way you could force it to be a string is to use something like:


formatstring(“%e”, mpProblem.ProgramStatus)

Badge +1

 Thank you @gdiepen for your inputs.

I am using DEX to write the values into an Excel file. The code is the following:

<ExcelSheetMapping name="Summary">
<ColumnMapping name="Program Status" maps-to="MathematicalProgram.ProgramStatus" />
<ColumnMapping name="Solver Status" maps-to="MathematicalProgram.SolverStatus" />

Note that I believe I cannot use formatstring(“%e”, MathematicalProgram.ProgramStatus) in DEX

Userlevel 5
Badge +7

What are the numbers that you see being written to Excel? Are those the ordinal values of these elements by any chance?

I think you might need somebody from AIMMS help out to really fix it (or provide the way it should work).


As a work-around, you could create two parameters:

spMathematicalProgramProgramStatus with definition formatstring(“%e”, MathematicalProgram.ProgramStatus)

spMathematicalProgramSolverStatus with definition formatstring(“%e”, MathematicalProgram.SolverStatus)

and write those two items to the excel file?


Didn't find what you were looking for? Try searching on our documentation pages:

AIMMS Developer & PRO | AIMMS How-To | AIMMS SC Navigator