Forum Discussion
FICO
1 year agoCommunity Manager
Error 11 when writing results to a database.
I am trying to insert results into a sqlite database using the following: SQLexecute("
INSERT INTO res_rm_markets_oper
(case_id, market, strat_node, oper_scenario, oper_period, bid_up, bid_down...
FICO
1 year agoCommunity Manager
The indexing sets of the two arrays that are used in the SQL statement are not entirely the same: when processing the following definition:
array(rm in RM_MARKETS, sn in ST_N, osc in SN_OP_SCENS(sn), op in O_PERS(osc))
the compiler will generate new sets for each of the 2 last indices, resulting in something like:
array(RM_MARKETS, ST_N, set of integer, set of integer)
such that they are not identical for the two arrays (even if in the end they have the same content).
A way of avoiding the issue could be to use globally defined sets for these indices and rely on a condition to select the requested values:
array(rm in RM_MARKETS, sn in ST_N, osc in I, op in J | i in SN_OP_SCENS(sn) and op in O_PERS(osc))
with I and J being the actual indexing sets of the target arrays (rm_bid_up and rm_bid_down). If they are not explicitly defined elsewhere in your model, they could be calculated as
I:= union(sn in ST_N) SN_OP_SCENS(sn)
J:= union(osc in I) O_PERS(osc)
Related Content
Related Content
How to write to an access database from mosel
I have created an access database and I am trying to connect to and then write to that database. I am working currently in the Workbench. My code is as follows: DBcxn := "mmodbc.odbc:LoadMax.accd...5 years agoPlace FICO® Xpress Optimization ForumFICO® Xpress Optimization Forum1 unread comment1 unread0Views0likes1CommentWhy Mosel result is not as optimal as Gams result?
Hi, I use both Gams and FICO Mosel to solve the same model, but the result from Mosel is not as optimal as the result from Gams. What might cause this difference? 1. It's a MIP problem 2. Set the ...9 years agoPlace FICO® Xpress Optimization ForumFICO® Xpress Optimization Forum7 unread comments7 unread0Views0likes7Comments
