Giter Site home page Giter Site logo

gamspy's People

Contributors

ahmed-alqershi9 avatar boxblox avatar clemensgams avatar ffiand avatar fproske avatar hbusul avatar jbroihan avatar mabdullahsoyturk avatar mbussieck avatar rschuchmann avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Forkers

zak-hc djimeneza2

gamspy's Issues

Space in Model name leads to compilation error

Hi, just a small bug I encountered: Trying to solve a model whose name contains a space leads to a compilation error, but there is no clear indication that the name is invalid. Also, it should not be possible to assign an invalid name in the first place.

A small example:

from gamspy import Container, Model, Sum, Sense

c = Container()
a = c.addSet("a", records=["a"])
var = c.addVariable("v", domain=a)
eq = c.addEquation("eq", domain=a)
eq[a] = var[a] >= 1

m = Model(container=c,
          name="with space",
          problem="LP",
          equations=c.getEquations(),
          sense=Sense.MIN,
          objective=Sum(a, var[a]))

m.solve()

This leads to the following error:

GamspyException: 

================================================================================
Error Summary
================================================================================
  58  solve with space using LP MIN autogenerated_8ef7b1ba_475c_4475_b4c7_a1462bf49f70_variable;
****                 $812
**** LINE      4 INPUT       [C:\Users\<user name redacted>\AppData\Local\Temp\tmp48vx2ty7\_job_35566420-2f8b-4031-ab1b-a3f87a5830fb.gms](file:///C:/Users/<user name redacted>/AppData/Local/Temp/tmp48vx2ty7/_job_35566420-2f8b-4031-ab1b-a3f87a5830fb.gms)
**** 812  Solve keys expected - USING MAX/MIN SCENARIO


Meaning of return code 2: There was a compilation error

Rust bindings to read and write gdx

Sorry I write the issue here, it was intended for https://github.com/GAMS-dev/gdx/ but there is no issue board in that repo. I was wondering if you are considering the implementation of a Rust API to work with GDX files. Maybe not a full GAMS interface but at least some handling tools would be great.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.